# Minimal Motoquencer example

# This example uses all your existing M4 fader to create a super simple step sequencer. The steps are quantized to a lydian C major scale. You can feel these notes as artifical notches in the faders. An LFO is used as an internal clock. The number of steps is the same as the number of faders. Since just one M4 is declared in the patch, you will get four steps. If you have more M4s, simply add them to the patch.

# OUTPUTS:
#   O1: [CV] V/Oct CV output
#   O5: [Gate] Gate output for triggering a voice

# CONTROLLER 1:
#   P1.1: [SPEED]
#   B1.1: [1-4] Show steps 1-4
#   B1.2: [5-8] Show steps 5-8
#   B1.3: [9-12] Show steps 9-12
#   B1.4: [13-16] Show steps 13-16

[p2b8]
[m4]

# -------------------------------------------------
# Buttons
# -------------------------------------------------

[buttongroup]
    button1 = B1.1
    button2 = B1.2
    button3 = B1.3
    button4 = B1.4
    led1 = L1.1
    led2 = L1.2
    led3 = L1.3
    led4 = L1.4
    output = _PAGE

# -------------------------------------------------
# LFO and Sequencer
# -------------------------------------------------

# Master clock
[lfo]
    hz = 20 * P1.1
    square = _CLOCK

# This motoquencer has as many steps as you have M4 faders
[motoquencer]
    clock = _CLOCK
    page = _PAGE
    numsteps = 16
    cv = O1
    gate = O5
