# -*- mode: snippet -*-
# name: hsetup
# group: haddeo
# key: hsetup
# expand-env: (yas-indent-line 'fixed)
# --
let bpm b = cps (b/60)
    withmod a b c d = (whenmod a b . within (c, d))
    every' n o f = when ((== (o-1)) . (`mod` n)) f
    msil = mapM_ ($ silence)
    tmod s e = (# nudge (scale 0 s $ fmap (**e) saw1))
    swing a = within (0.1, 0.4) (a ~>) . within (0.6, 0.9) (a ~>)
    d'drum = d1
    d'bass = d3
    d'bass2 = d2
    d'wax = d4
    d'nim = d5
    d'hi = d6
    d'fx1 = d8
    d'fx2 = d9
    d'fx3 = d10
    -- given bpm = 105
    tmod' s e = tmod (s*(1/(105/60))) e
    mt i = slow 16 $ tmod' 0.5 3 $ density 16 $ i
