setcps 0.4

----
-- Instrumental
----

d4 $ s "~ cp"
# room 0.6
# size 0.5
# dry 1
# gain 0.7

d1 -- batterie
$ superimpose -- kick!
(every 4 (off 0.125 id))
. whenmod 64 56 (# gain 0)
. whenmod 32 16 (fast 2)
. (# s "jazz")
. (# cps 0.5)
$ whenmod 32 30 (# gain 0)
$ whenmod 32 24 (# gain (slow 4 $ tri))
$ whenmod 32 16 (# gain 0.5)
$ whenmod 32 9 (# gain 0)
$ whenmod 32 8 (# gain tri)
$ every 8 ((slow 8 $ "0 <0.125 0.25>") ~>)
$ s "d d"
# s "drum"
# gain 0.8

d1 -- techno!
$ s "j j j <[~ k] <k [~ k]>>"
# s "jazz"

d3 -- hihat 3/5 sur 8
$ every 8 ( -- caisse metal variations
  sometimes (# n 2) . (# gain 0.45) . (
    stut (slow 4 $ "<4 8>") (slow 4 $ "[0.8|0.9]") (1/16)) -- echos varies
    )
$ euclid (slow 4 $ "<3 .. 5>") 8
$ s "bshihat"
# n (wchoose [(0,5),(1,4),(2,1)])
# gain (slow 16 $ cosine * 0.4 + 0.3)

d5 -- basse grille blues
-- $ whenmod 128 96 (superimpose (# crush 5) . (|- gain 0.1)) --electronoise
-- $ whenmod 64 32 (# gain (slow 32 $ tri / 4 + 0.6))
$ s
-- "b"
"b b? <b? b> b?"
# note (scale "major" (
  whenmod 64 48 (7 -) -- renversement
  "<0 3 4 0> 3 0 <0 0 4 4>"
  ))
# s "bassWarsaw"
|- note 24
# legato 1.5

d6 -- aigu fou blues
$ degradeBy (slow 4 $ "<0,0.05 .. 0.5>")
$ off (5/16) (# velocity 0.3)
$ superimpose ((# gain 0.6) . (# s "cheapPiano1"))
$ s (slow 1 $ "<b [b b? <~ b> <~ b?>] b*4 <b*8 [b*4 b]>>")
# note (scale "major" (
  whenmod 64 48 (7 -) -- renversement
  "<0 3 4 0> 3 0 <0 0 4 4>" -- base blues
))
# s "superpiano/2"
# velocity (slow 32 $ sine * 0.3 + 0.3)

-- . . . . . . . .
-- 10110101101

d7 -- piano aigu
$ whenmod 64 60 (degradeBy "0") -- de retour!
$ whenmod 64 56 (degradeBy "0.8") -- le reste suit
$ whenmod 64 48 (degradeBy "0.8 0.2") -- le debut part?
$ whenmod 64 32 (superimpose (|+ note "5,12")) -- accord quinte
$ whenmod 64 16 (off 0.25 (|- velocity 0.1)) -- echo rebond
$ note
"[0 ~ 0] [3 ~ 5] [~ ~ 0] [3 ~ 5]" +
"<0 5 7 0> 5 0 <0 0 7 7>"
# s "superpiano"
# velocity (slow 64 $ sine * 0.4 + 0.4)

----


d8 $ s "superfork(<[5|5|3] 5>,8)"
# note (scale "major" (
"<0 3 4 0> 3 0 <0 0 4 4>"
+ 7
))
-- "<12 <17 [17 17 17 <17 12> <12 17>]>>"
# legato 2
# gain (slow 23 $ sine * 0.5 + 0.2)



--
---  sandbox
--

d6 -- piano main gauche blues semi-reguliere
-- $ swing 2
-- $ whenmod 64 48 (degradeBy "0 1 0.75 1")
-- $ whenmod 64 32 (degradeBy "0 0.5 0.25 0.5")
$ every 4 (degrade)
-- $ off (
  -- slow 4 $ ("<0.0625 0.0625 0.0625 0.5625>")
  -- ) (|+ note "0,12")
$ superimpose (# s "superpiano") . (# n "0 3 5 7") . (|- velocity 0.1)
$ s
"<p p p p*2> [p p] <p p p*2 p> [p p]"
# note (scale "major" (
  whenmod 64 48 (7 -) -- renversement
  "<0 3 4 0> 3 0 <0 0 4 4>"
  + (slow 8 $ "<[1 <0 2> <5 0> <0 0 -2 7>]>") -- impro variations
))
# s "superpiano"
# velocity 0.5
# sustain 2
|- note 24
# gain 0.75

-- lead rythme?
d1 $ s "{a a a a a ~ . ~ a ~ ~ a ~ }"
# note (every 8 (12 -) "1 3 1 3 6 ~ . 8" + "<0 12>")
|- note 12
# s "supermandolin"
