setcps 0.5

-- mask: degrade onoff
-- ply: nice repeat each
-- squiz
-- djf: nice low/high split
do
  let maskDown = "t(<8 6 4 2>,8)"
  let maskUp = "t(<8 6 4 2>,8)"
  let melody = (scale "lydian" ("c4'maj" + "<2 4 6 9>"))
  d1
    $ mask (slowcat [
      maskDown, maskDown, maskDown, maskDown,
      maskUp, maskUp, maskUp, maskUp
      ])
    $ sometimesBy "0 1" (off 0.5 id)
    $ ply "1.02" $ s "reverbkick(3,8) snare:23"
    # djf (slow 8 $ sine * 0.8)
    # gain 0.8
  d3
    $ whenmod 16 12 (hurry 2)
    $ whenmod 16 12 degrade
    $ ply "<[8 . 16 <8 16> 8] [16 8]>"
    $ s "dr"
    # room 0.1 # sz 0.2
  d4
    -- $ euclid "<3 <<5? 5> 2>>" 8
    $ mask "f(<<0 2> 4 8>,8,[1|3|5|7])"
    $ iter 4 $ arp "<updown downup>"
    $ note (melody
      - 12
    )
    # s "superfork"
    # sustain 1
  d5
    $ chew 4 "0<2 (5,4)> . 1(3,8) [2 3]"
    $ slow 2
    $ superimpose (arpeggiate)
    $ note (melody
      - 12
    )
    # s "supersaw"
    # voice 0.1
    # gain 0.6
  d6
    $ always (|+ note "0 . <[-2 -4] [5 0]>")
    $ sometimesBy "<0 0 0.25 0.5>" (off (3/16) (# squiz 1))
    $ often (off (2/16) id)
    $ mask "t f*<7 3 1>"
    $ arp "updown"
    $ note (melody + 12)
    # s "superpiano"
    # velocity 0.7
