d1 $ "dr*8" # gain "^80"

do
-- region Nova Utils
let gG a = (gain ("^77" * a)) -- gain Global
let gM' l h a = (gG (range l h a)) -- gain Modéré
let gM a = (gM' 0.2 0.8 a) -- gain Modéré doux
let gLPF = (# lpf (min 10000 ((range 200 20000 ("^49")))))
let gHPF = (# hpf (max 0 (min 7500 ((range "-7500" 7500 ("^49"))))))
let gDJF = (gLPF . gHPF)
let novaOn  ch pat = (sometimesBy ch pat)
let novaOff ch pat = sometimesBy (1 - ch) (pat)
-- endregion Nova Utils
let gDelayD = (# delay (range 0 5 "^13"))
let gDelayFB = (# delayfb (range 0 0.9 "^14"))
let gRoom = ((|+ room (range 0 0.5 "^29")) . (# dry 0.99))
let gSize = (|+ size (min 0 (range "-0.5" 0.5 "^29")))
let gDelay = (gDelayD . gDelayFB . (# delayt 0.25) . (# orbit 2))
let g = (gDJF . gRoom)
let chords = "<[a5,c5,e5] [e4,g4,b4]>"
setcps (80/60/4)
d1
  $ g
  $ sometimesBy (range 0 1 "^50 ^51 ^52 ^53") (# silence)
  $ slice 16 (run 16)
  $ "fbreak80:4"
  -- $ note (scale "aeolian" $ run 4)
  -- # "superpiano" # velocity 0.8
  # gM' 0 1.3 "^79"
  # room 0.6 # size 0.5 # dry 1
  # cut 1
d3
  $ novaOn "^44" (fast "2 <2 [4 2]>")
  $ "dr*8"# gM' 0 1 "^80"
