Abbreviations and other utility functions
Wanted to share some of the abbreviations and funcs I use. Share yours in the replies! Maybe we can have some consensus and 'normalize' some.
Abbreviations
let ar a r = attack a # release r
oc = octave
o = orbit
dist = distort
g = gain
l = legato
sp = speed
acc = accelerate
sh = shape
sup = superimpose
deg = degrade
degby = degradeBy
degBy = degradeBy
lAt = loopAt
lat = lAt
Utility functions
These ones just make coding easier:
let sinosc min max frq = (fast frq $ range min max sine)
triosc min max frq = (fast frq $ range min max tri)
sqrosc min max frq = (fast frq $ range min max square)
sawosc min max frq = (fast frq $ range min max saw)
randosc min max = (range min max rand)
delay' a t fb = delay a # delayt t # delayfb fb
striateAt str at f = slow at $ striate str $ f
CPS stuff
Btw someone please correct my Haskell, I'm fairly sure this ain't it, but it works lol.
let currentcps = 0
getcps = streamGetcps tidal
getbpm = do
currentcps <- streamGetcps tidal
return (currentcps*60*4)
getbpm' m = do
currentcps <- streamGetcps tidal
return (currentcps*60*m)
setbpm bpm = setcps (bpm/60/4)
setbpm' bpm m = setcps (bpm/60/m)