Some abbreviations and utility funcs (Share yours please!)

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.


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)

I keep mine here:

some highlights:
Arpeggiated chords (up and down)

rolled :: Pattern b -> Pattern b
rolled = rolledWith id

rolled' :: Pattern b -> Pattern b
rolled' = rolledWith reverse

Thanks to @luluganeta

accBy x = accelerate (2 **| (x |/ 12) - 1) -- accelerate by x semitones

There's a couple of others in there that I've been meaning to test, I must do that :slight_smile:

1 Like