-- /home/pln/Work/Art/GLITCHWAVE/outputs/digital_flow.gif
-- L'Été a MauerPark <3
do
setcps (120/60/4)
-- resetCycles
let gF =  (# djfbus 1 (range 0.05 0.95 "^49"))
let gMute = (midiOn "^73" (mask "f*16"))
let gM = gMask . gMute
let gLPF = whenmod     64 48 (# lpfbus 4 (slow 16 $ range 20000 200  saw))
let gLPFSoft = whenmod 64 48 (# lpfbus 5 (slow 16 $ range 20000 2000 saw))
let chorus = pF "chorus"
let lagamount = pF "lagamount"
let dec = pF "dec"
let sus = pF "sus"
let cutoff = pF "cutoff"
d1 $ gF $ gM1
  $ fix (|* gain 0.9)"kick:4"
  $ midiOn  "^41" (struct "t t t t") -- Le Run
  $ midiOff "^41" (struct "~ <t!3 ~>") -- L'attente
  $ "[techno:0,808bd:2,909,kick:4]"
  # rel 0.5
  # att 0.015
  # lpf 4000
  # gain 1.5
d2 $ gF $ gMute -- Clap timer
  $ midiOn "^42" ((|* gain "0 1 0.8 1") . (<| "~ c <~!3 [~ c]> c"))
  $ midiOff "^42" ((|* gain "1 0.8") . (<| "c . ~ ~ ~ <~!3 c>"))
  $ drumFrom "[sakatadpm48,rolandr8]" "cp"
  # lpf 2000
  # gain 1.6
d7 $ gF3 $ gM3 -- High Cello Dauphin
  $ midiOn "^91" (ply 2)
  $ midiOn (1 - "^35") (struct "t . f")
  $ struct "t@2 t*<1 2 1 <4 1>> t*<1 2 4 8>"
  $ midiOn "^59" (|- note 12)
  $ note (
    "<[g4 c ef@14] [<c g> ef g@14] <[g4 c ef@14] [c5 bf5 g5@14]> [c ef d@13 ~]>"
    )
  # "[cbow:3]"
  # cut 7
  # room 0.2
  # pan 0.9
  # crushbus 71 (range 16 2.5 "^55")
  -- # midiG' "^83" 0 1.2
  # gain 1.2
d3 $ gF $ gMute
  $ midiOff "^43" (mask "t([8 4 <4 <8 16>>],16)")
  -- FIXME(#94) d3 drives more controls than the grid gives it (BT3 only — BL1-3 are the family mutes). ^76 now belongs to another orbit, so this step STILL FIRES ACROSS COLUMNS — turning ^76 for its new owner also moves this. NOT commented out: this is a `$`-step and something above it is a partial application waiting for it, so removing it would stop the whole block compiling. Fold it onto d3's own control with gSel.
  -- FIXME(#94) d3 drives more controls than the grid gives it (BT3 only — BL1-3 are the family mutes). ^76 now belongs to another orbit, so this step STILL FIRES ACROSS COLUMNS — turning ^76 for its new owner also moves this. NOT commented out: this is a `$`-step and something above it is a partial application waiting for it, so removing it would stop the whole block compiling. Fold it onto d3's own control with gSel.
  $ midiOn "^76" (struct "t*[8 <8 16> <16 8 8 16> <16 [32 <64 128>]>]")
  $ fix ((|* gain (slow 32 $ range 0.3 1.3 saw))) "oh"
  $ "~ h ~ h ~ h*<1!3 2 1 1 2 2> ~ h*<1!7 2>" # drumFrom "sakatadpm48" "[hh,oh]"
  # n "0!3 <0!3 1>"
  -- # midiG' "^80" 0 1.6
  # gain 1.1
d4 $ gF2 $ gM3 $ slow 2 -- Basse Germanique
  $ midiOn "^76" (rev)
  $ midiOn "^44" (struct "t*<16 32>") -- Basse folle
  $ (0.125 <~) -- Calage :)
  $ someCyclesBy ("^32") ( -- Pattern complet
    (mask "<t!2 f t f f t t> f t@14") . (|* room 1.2)
    ) --
  $ fix ((midiOff "^76" (# silence)) . (|* gain 0.65) . (|+ note 24) . (|* gain "<0.93!3 [0.92 0.85]>") . (# cut 5))
  "bass2"
  $ note (
    "<[g4 c ef@14] [<c g> ef g@14] <[g4 c ef@14] [c5 bf5 g5@14]> [c ef d@13 ~]>"
    - 24
    )
  # "[bass2:1,bassWarsaw]"  
  # room 0.2
  # pan 0.4
  # crushbus 41 (range 16 2.5 "^52")
  # octersubbus 42 (range 0 5 "^32")
  # gain 1.6
  # cut 4
d5 $ gF3 $ gM3 -- Leads reponse TODO moins carre?
  $ midiOn "^57" (struct "t*<16 32>") -- Basse folle
  $ midiOn "^89" (|+ note 12)
  -- $ sometimesBy "^18" (bite 4 "[0, [~ 2]]")
  -- $ someCyclesBy "<f!3 t>" (mask "t f!15". (# legato 2))
  -- $ someCyclesBy "^17" (
    -- (mask "<t!2 f t f f t t> f t@14") . (|* room 1.2)
    -- ) --
  -- $ whenmod 32 24 (ply "2 <2!4 4!4>")
  $ arp "<up!6 down downup>"
  $ note (
    "<ef4 g4 <ef g> d>" + "c'maj'4"
    - 12
    )
  # "FMRhodes1"
  # legato 2
  # room 0.2
  # pan 0.33
  # modIndex (range 0.1 16 "^33")
  # crushbus 51 (range 16 3.5 "^53")
  -- # midiG' "^82" 0 1.5
d8 $ gM $ gF -- Breaks divins
  $ midiOn "^92" (off "e" id)
  $ midiOff "^60" (("e" ~>) . mask "t(<4 [4!3 8]>,16)")
  $ chop 16
  $ someCyclesBy "^36" (loopAt 1 . (# n 34))
  $ someCyclesBy "^56" (chop 8 . loopAt 1 . (# "fbreak120:3"))
  $ loopAt 2
  $ "jungle_breaks:1"
  # cut 8
  # pan "[<0.35!3 0.65> <0.65!3 0.35>]*4"
  # gain 1.3
d9 $ gF3 -- Nano-angels chorus of machines
  $ sometimesBy "^19" (superimpose (
    (# cut 101)
    . (arp "up")
    . (|+ note (
      "<[0,0] [0,7] [0,9] [0,7,9,12]>"
      ))
    . (|+ pan 0.1)
  ))
  $ midiOff "^58" (mask "t([0 2],4)")
  $ note (
    slow 2 "<bf4 d5 <bf4 ef> [bf4 a4@3]>"
    + "[0,[0*<1 1 2 <2 1>> .  0 12*<1 2>]]"
    )
  # "moogBass"
  # dec 0.2
  # sus 1
  # att (range 0.001 2 "^16")
  # rel (range 0.2  10 "^17")
  # room 0.2
  # lesliebus 102 (range 0 2 "^18")
  # chorus (range 0 2 "^19")
  # sz 0.6 # dry 2
  # legato 2
  # pan 0.64
  # cut 10
  # gain 1.5
