-- Octobre Jaune
resetCycles

do
setcps (117/60/4)
let gF1 =  (# djfbus 1 (range 0.05 0.95 "^49"))
let gF2 = (# djfbus 2 (range 0.05 0.95 "^50"))
let gF3 = (# djfbus 3 (range 0.05 0.95 "^51"))
let gMask = (midiOn "^41" (mask "t . <f t f <f t>> <t f f <t f>>"))
let gMute = (midiOn "^73" (mask "f*16"))
let gMute2 = (midiOn "^74" (mask "f*16"))
let gMute3 = (midiOn "^75" (mask "f*16"))
let gM1 = gMask . gMute
let gM2 = gMask . gMute2
let gM3 = gMask . gMute3
d1 $ gM2 $ gF1 -- KICK SOUTENANT
  $ midiOn "^42" (<| "k k k <k!3 [<~ k> k]>")
  $ "[hardkick_rha:60,jazz]"
  -- # bandf 200
  # lpf 1300
d2 $ gM1 $ gF1 -- Snare glitch+perc
  $ midiOn "^43" (struct "~ t ~ t*<1!3 2>")
  $ midiOff "^43" (struct "~ t")
  $ fix (whenmod 4 3 (ply "4 [4 <1 2>]") . (|* gain 0.8) . (# rel 0.1)) "clap"
  $ fix ((# n 2) . (# pan 0.2) . (# note "-24")) "glitch"
  $ "glitch"
  # begin 0.02
  # end 0.35
  # pan 0.8
d3 $ gM1 $ gF1 -- Hats reguliers mais varies
  $ midiOn "^44" (ply 2)
  $ midiOn "^76" (struct "t(3,8). t(5,8)")
  $ someCyclesBy "<1!8 0!56>" (mask "f . t f")
  $ "~ h ~ h ~ h*<1!7 2> ~ h"
  # drumFrom "rolandtr909" "hh:2"
  # hpf 5000
  |* gain (range 0.85 1 (fast 4 sine + (slow 2 perlin)))
d6 $ gM1 $ gF1
  $ "~ rampleS0"
  # n "<6!6 7 7>"
  # pan 0.8
d8 $ gM1 $ gF1
  $ midiOn "^92" (ply 2)
  $ whenmod 4 3 (ply 2)
  $ chop 16
  $ midiOn "^36" (loopAt 2 . (# n 40))
  $ midiOn "^56" (loopAt 1 . (# n 40))
  $ loopAt 2
  $ "jungle_breaks:18"
  # cut 8
d4 $ gM3 $ gF2 -- MATRIX BASS
  $ slow 2
  $ midiOn "^57" (# freeze 0.1)
  $ midiOn "^89" (slice 8 "0*[8 16]")
  $ note "<[f@3 <cs!3 [cs ds]>] c>"
  # "90s_matrix:0"
  # cut 4
  # tremoloratebus 41 (range 0 (slow 4 "<2 4 8 16>") "^53")
  # tremolodepthbus 42 (range 0 0.9 "^53")
  # combbus 43 (range 0 0.5 "^17")
  # ampbus 44 (range 1 1.25 "^17")
  # distortbus 45 (range 0 0.5 "^33")
  # pan "<0.8!32 0.2!32>"
  # gain 0.8
d5 $ gM3 $ gF2 -- ACID bassline
  $ midiOn "^90" ( -- Echoes of future FIXME SUPERPOSITION NOT REPLACE
    superimpose ((# cut 51) . superimpose ((# cut 52) . (|+ note 12))
    . (|+ note "[12,<~!8 24!8>]")
    . (|* gain 0.9) . (# room 0.2) . (# sz 0.9)) . (# cut 51))
  $ midiOn "^58" (# freezebus 51 0.1)
  $ note (  "f@2 f <gs!2 gf!2>@2 <gs!2 g!2> <g!2 gs <gs gs5>>@2"
    - 12
    )
  # distortbus 52 (range 0 2.5 "^54")
  # "90s_matrix:4"
  # pan "<0.2!32 0.8!32>"
  -- # octave 3
  # cut 5
  -- # midiG' "^82" 0 1.9
d7 $ gF3 $ gM3
  $ midiOn "^91" (|- note "c'maj'2")
  $ note (
  (slow 8 $ "<[<f4 as5>]!2 [<ef3!2 [ef4!3 f4] f4>]!2>")
  + "0([3 <3!3 5>],8) . 0(<3!7 [3 5]>,8)"
  )
  # "superfork"
  # room (slow 16 $ range 0 0.2 saw)
  # delay (slow 32 $ range 0 0.5 saw)
  # octersubbus 71 (range 0 2 "^55")
  # octersubsubbus 72 (range 0 2 "^55")
  # pan (slow 16 $ (saw + 0.2 * perlin))
-- c bf g
d10 -- RISE!
  $ fix (
    loopAt 4
    . (# "risers:4")
    . (# pan 0.2)
    . (# room 0.4)
    -- . (# gain 0)
    . (# cut 81)) "r1"
  $ fix (-- laser rise
    loopAt 8
    . (# "risers:11")
    . (|* gain 0.9)
    . (# pan 0.9)
    . (# room 0.4)
    . (# drybus 82 (slow 4 $ range 0.5 1.2 saw))
    . (# sz 0.8)
    . (# cut 82)) "r2"
  $ "[<~ ~ ~ <r1!3 ~>>,<~!24 ~!8 r2 ~!7>]"
  -- # midiG' "^20" 0 1.3

-- risers:3 annonce
-- risers:4
once $ "risers:11"
  # gain 0.7
  # end 0.85
  # cut 9

once $ "rampleS0:6" # cut 4

once
  $ fix (# drumFrom "rolandtr909" "cp:1") "cp"
  $ "[psr:1,cp]" # gain 0.8

  ef-f. f-e e-es.. es-e-es-f......

once $ drumFrom "rolandtr808" "bd:4"
