sets:
- patches:
  - name: Jazz Combo
    0: # MIDI channel 1 (channels indexed from 0)
      soundfont: FluidR3_GM.sf2
      program: 0
      bank: 0
    1: {bank: 0, program: 33, soundfont: FluidR3_GM.sf2} # MIDI channel 2, compact form
    9: {bank: 128, program: 0, soundfont: FluidR3_GM.sf2} # drums
    router_rules:
    - {type: cc, chan: [0, 15, 1, 0], par1: [64, 64, 1, 0]} # sustain pedal routing
  - name: Back to the EP
    0: {bank: 0, program: 5, soundfont: FluidR3_GM.sf2}
    # unspecified channels will remain at previous settings
    router_rules:
    - {type: cc, chan: [0, 15, 1, 0], par1: [0, 127, 1, 0]}  # 1-1 routing
    - {type: cpress} # no parameters defaults to 1-1 routing
  - name: Kill The Bass Player
    0: {bank: 0, program: 38, soundfont: FluidR3_GM.sf2}
    router_rules:
    - {type: cc}
    - {type: note, chan: [0, 0, 1, 0], par1: [24, 127, 1, -24]} # 2x octave pedal for nastiness
  - name: Keytar Bear
    0: {bank: 8, program: 28, soundfont: FluidR3_GM.sf2}
    router_rules:
    - {type: cc}
  - name: Prince Horns
    0:
      bank: 0
      program: 62
      soundfont: FluidR3_GM.sf2
      cc: {7: 60} # a CC value that is sent to this channel when the patch is loaded
    router_rules:
    - {type: cc}
  - name: Sick Leads
    0: {bank: 0, program: 0, soundfont: ModWaves.sf2}
    1: {bank: 0, program: 1, soundfont: ModWaves.sf2}
    router_rules:
    - clear # clears any previous routing
    - {type: note, chan: [0, 15, 1, 0], par1: [0, 127, 1, 0], par2: [0, 127, 0, 127]} # ignore velocity like a retro synth
    - {type: pbend}
    - {type: cc}
    - {type: kpress} # key aftertouch
    - {type: cpress} # channel aftertouch
    - {type: cc, chan: [0, 0, 0, 0], par1: [20, 20, 0, 74]} # knob to filter cutoff frequency
    - {type: cc, chan: [0, 0, 0, 0], par1: [21, 21, 0, 70]} # knob to filter resonance
    - {type: cc, chan: [0, 0, 0, 1], par1: [20, 20, 0, 74]} # filter cutoff frequency (for square)
    - {type: cc, chan: [0, 0, 0, 1], par1: [21, 21, 0, 70]} # filter resonance (for square)
    - {type: cc, chan: [0, 0, 0, 0], par1: [19, 19, 0, 7]}
  router_rules:   # these apply to all patches in this set
  - {type: note}
  - {type: prog}
  - {type: pbend}
  - {type: cc, chan: [0, 0, 0, 0], par1: [19, 19, 0, 7]} # route a knob on my controller to volume CC
  - {type: cc, chan: [0, 0, 0, 1], par1: [19, 19, 0, 7]} # also send it to midi channel 2
  - {type: cc, chan: [0, 0, 0, 9], par1: [19, 19, 0, 7]} # and midi channel 10
# each set can have its own reverb/chorus parameters
  reverb_width: 0.5
  reverb_roomsize: 0.2
  reverb_level: 0.9

- patches: # here begins a second set (access via "choose bank" on stompbox)
  - name: Beethoven
    0: {bank: 0, program: 6, soundfont: FluidR3_GM.sf2}
  - name: Big Church
    0: {bank: 0, program: 19, soundfont: FluidR3_GM.sf2}
    router_rules:
    - default # overrides with default 1-1 routing for all types
  router_rules: # these rules apply only to this set
  - {type: note}
  - {type: prog}
  - {type: pbend}
  - {type: cc, chan: [0, 15, 1, 0], par1: [64, 64, 1, 0]}
  reverb_width: 3.5
  reverb_roomsize: 0.8
#  reverb_level: 0.9 # unspecified parameters remain at current values
  
- patches: # yet another set
  - name: Ahh Choir
    0: {bank: 0, program: 52, soundfont: FluidR3_GM.sf2}
  - name: Metal Pad
    0: {bank: 0, program: 93, soundfont: FluidR3_GM.sf2}
  - name: Breath Noise
    0: {bank: 0, program: 121, soundfont: FluidR3_GM.sf2}
  # no router rules for set or patch --> default 1-1 routing
  
# global settings
settings:
  fluidsettings: {audio.period-size: 64, audio.periods: 3} # settings passed to fluidsynth
  gain: 0.4
  sfdirs: [/home/pi/, /usr/share/sounds/sf2/] # directories to search for soundfonts
