Degrade effect for Sonic Pi
Our old friend Tidal has a function I quite like -
Tidal is a pattern based language and degrade simply drops an event from a pattern 50% of the time.
input: [1,1,1,1,1,1,1,1] -> degrade(input)
|# Live coding example for Retune conference 2014|
|# 1) Press Run (Cmd+R) to start|
|# 2) Make changes (e.g. comment in/out various lines in :beats & :amen)|
|# 3) Press Run again (changes will only be audible from next queue point)|
|# compute loop length (4 bars), bar & quarter note durations|
|dur = sample_duration :loop_compus|
|bar = dur / 4|
|quart = dur / 16|
I'm stealing/playing around with ideas from the tidal language here.
Tidal is more focussed on creating loop based music and manipulating samples. It has a good (although initially scary looking) DSL for this purpose.
every 6 (density 2) $ jux (iter 8) $ every 8 rev $ every 5 (0.25 <~) $ sound "[808a/4*16, 808a/2 [808a/3 ~ ~ 808b] [~ 808b/3 808b/3 ~] [~], [~ ~ ~ [~ 808b/2]]/2]" |+| speed "[1 1 1 [1.5 0.8] 1 1 1 [1 0.5]]/8"
|;; Beginning with some of the ideas in Sam Aaron's example,|
|;; let's see about trying to get rid of the limitation on sequence|
|;; I'd like to create a composition outside the server in "beat space"|
|;; (play note N at beat B). This should allow for composing notes via|
|;; an abstraction that a library like Leipzig  provides. But,|