# LFO Motor Bank

# This patch implements a bank of four independent LFOs that
# are controlled by four motor faders. For each LFO you can set
# the speed, the level, wether it should be bipolar or unipolar and
# the waveform.
# 
# Also there are 6 presets that can be changed with a knob.
# 
# This circuit illustrates the use of the fadermatrix circuit.
# the four LFOs with the parameters speed, level, bipolar
# and waveform form a 4X4 matrix. With the eight buttons
# you can either select one "row" - i.e. one of the LFOS -
# and control all of its four parameters. Or you can select
# one "column" and control one parameter - e.g. the level -
# for all four LFOs at once.

# OUTPUTS:
#   O1: [LFO1] 
#   O2: [LFO2] 
#   O3: [LFO3] 
#   O4: [LFO4] 

# CONTROLLER 2:
#   P2.1: [PST] Preset (there are 6)
#   B2.1: [1] LFO 1
#   B2.2: [SPD] Speed
#   B2.3: [2] LFO 2
#   B2.4: [LVL] LFO Voltage Range
#   B2.5: [3] LFO 3
#   B2.6: [BIP] Bipolar / Unipolar
#   B2.7: [4] LFO 4
#   B2.8: [WAVE] Waveform

[m4]
[p2b8]

# -------------------------------------------------
# Buttons, Faders
# -------------------------------------------------

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

[fadermatrix]
    preset = P2.1 * 6
    rowcolumn = _ROWCOLUMN
    notches3 = 2
    notches4 = 5
    ledcolor1 = 0.2
    ledcolor2 = 0.4
    ledcolor3 = 0.6
    ledcolor4 = 0.8
    output11 = _SPEED_1
    output12 = _LEVEL_1
    output13 = _BIPOLAR_1
    output14 = _WAVEFORM_1
    output21 = _SPEED_2
    output22 = _LEVEL_2
    output23 = _BIPOLAR_2
    output24 = _WAVEFORM_2
    output31 = _SPEED_3
    output32 = _LEVEL_3
    output33 = _BIPOLAR_3
    output34 = _WAVEFORM_3
    output41 = _SPEED_4
    output42 = _LEVEL_4
    output43 = _BIPOLAR_4
    output44 = _WAVEFORM_4

# -------------------------------------------------
# LED-Test
# -------------------------------------------------

[copy]
    input = 0.4
    output = L1.1

[copy]
    input = 0.6
    output = L1.2

[copy]
    input = 0.8
    output = L1.3

[copy]
    input = 1
    output = L1.4

# -------------------------------------------------
# LFOs
# -------------------------------------------------

[lfo]
    hz = _SPEED_1 * 20
    level = _LEVEL_1
    bipolar = _BIPOLAR_1
    waveform = _WAVEFORM_1
    output = O1

[lfo]
    hz = _SPEED_2 * 20
    level = _LEVEL_2
    bipolar = _BIPOLAR_2
    waveform = _WAVEFORM_2
    output = O2

[lfo]
    hz = _SPEED_3 * 20
    level = _LEVEL_3
    bipolar = _BIPOLAR_3
    waveform = _WAVEFORM_3
    output = O3

[lfo]
    hz = _SPEED_4 * 20
    level = _LEVEL_4
    bipolar = _BIPOLAR_4
    waveform = _WAVEFORM_4
    output = O4
