# Motoquencer example with fadermode

# This example lets you select one of 8 possible fader modes with the help of 8 buttons of a P2B8.

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

# CONTROLLER 1:
#   P1.1: [SPEED]
#   B1.1: [Pitch] CV / Pitch
#   B1.2: [RCV] Randomize CV
#   B1.3: [GPROP] Gate propability
#   B1.4: [REP] Repeats
#   B1.5: [GPAT] Gate pattern
#   B1.6: [RAT] Ratchets
#   B1.7: [GATE] Gates (faders are binary toggle switches)
#   B1.8: [SKIP] Skip steps (faders are binary toggle switches)

[p2b8]
[m4]

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

[buttongroup]
    button1 = B1.1
    button2 = B1.2
    button3 = B1.3
    button4 = B1.4
    button5 = B1.5
    button6 = B1.6
    button7 = B1.7
    button8 = B1.8
    led1 = L1.1
    led2 = L1.2
    led3 = L1.3
    led4 = L1.4
    led5 = L1.5
    led6 = L1.6
    led7 = L1.7
    led8 = L1.8
    output = _FADERMODE

# -------------------------------------------------
# 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
    fadermode = _FADERMODE
    cv = O1
    gate = O5
