resetCycles
setcps (60/60/4)

-- DIGITAL DREAMS OF MINITEL REVIVAL
-- Techno numérico-mélancolique résolvable
do
let mel = "c <f d'min'2> <d <c'min d'maj>> <af <e'maj'2 e'min'2 af'maj'2>> <g!12 c5!4>@4"
d1 -- BEAT
  -- $ slow 2-- TODO Resolve :)
  $ whenmod 64 32 (# djf (slow 32 $ range 0.5 0 isaw))
  $ fast 2 $ (<| "k k k <k <k k*2 k [~ k]>>") -- TECHNO <3
  $ "jazz" # gain 0.5
d2 -- Drums résolus
  -- $ slow 2 $ (|* gain 0.85) -- TODO Resolve :)
  $ whenmod 4 2 (often (mask "t [<t t?>!7 t]"))
  $ whenmod 64 32 (# djf (slow 32 $ range 0.5 1 saw))
  $ superimpose (
    (# "glitch:2")
    . (# legato 1)
    . (|* gain (slow 16 $ range 0.5 0.75 saw))
  )
  $ "[d ~!3 . d*<12!3 16>]"
  # "[snare:20,glitch:0]"
  # gain (slow 16 $ range 0.3 0.45 saw)
d4 -- Cymbales fantômes
  -- $ ((|* gain 0.8) . (# room 0.4))-- TODO Resolve :)
  $ rarely ((swing 2 . (|* gain 0.75)))
  $ juxBy 0.9 ((|* gain 0.9) . (|+ room 0.4))
  $ sometimesBy "<t!8 f!32 t!16>" (mask "<f!7 t>")
  $ "~ ~ ~ [c <~ c> <~ c> <~ ~ c ~>]" # "h2ogmcy"
  # gain 0.35
  # n "<[<0 1 2 3 4>]!16 [<6 7 8 9 10>]!16>"
  # room (slow 8 $ range 0.3 0.65 saw) # size 0.7
  # legato 4
d5 -- Rhodes nappes
  $ (|* gain 0.7)
  $ whenmod 64 32 (|* gain (slow 32 $ range 1 0.5 isaw))
  $ off 1 ( -- Lower
    whenmod 64 32 (chop 4)
    . (|+ pan 0.2)
    . (|- note 12)
    . (# room 0.5)
  )
  $ off 1 ( -- Mid
    stut 4 0.9 "<e!6 s!2>"
    . (|* gain 0.95)
    . (|+ pan 0.2)
    . (|- note 12)
  )
  $ note mel
  # "FMRhodes1"
  # gain 0.65
  # room 0.2
  # pan 0.4
  # legato 2
d6 -- Rhodes lead folie minitel
  -- $ degradeBy "0 0.95!7" . (|* gain 0.8) -- TODO Resolve :)
  $ sometimesBy "<t!8 f!56>" (degradeBy "t f [f t] f")
  $ scramble 8
  $ ply 4
  $ note mel
  # octave "<5 5 [5|6] 6>"
  # "FMRhodes2"
  # room (slow 32 $ range 0.1 0.4 perlin)
  # size 0.2
  # gain (slow 32 $ range 0.6 0.85 sine)

once $ note ("af") # "FMRhodes1" # gain 0.8 # room 0.2
once $ note ("d'min'2") # "FMRhodes1" # gain 0.95
once $ note ("c'maj'2") # "FMRhodes1" # gain 0.95
once $ note ("e'maj'2") # "FMRhodes1" # gain 0.95
once $ note ("c f d af g@2") # "FMRhodes1" # gain 0.95 # cut 1
