Skip to content

Instantly share code, notes, and snippets.

@RemyPorter
Created July 6, 2017 12:34
Show Gist options
  • Save RemyPorter/8722879386ed51dbb84afcfd936f4b3a to your computer and use it in GitHub Desktop.
Save RemyPorter/8722879386ed51dbb84afcfd936f4b3a to your computer and use it in GitHub Desktop.
s0 = (scale :C, :chromatic, num_octaves: 3).shuffle
s1 = s0.rotate(2)
s2 = s1.rotate(3)
amps = (line 0, 1, steps: 64)
use_synth :piano
use_synth_defaults stereo_width: 0.2
with_fx :bpf, centre: :C+6, res: 0.5 do
with_fx :bitcrusher, bits: 16, sample_rate: 5000 do
with_fx :echo, phase: 1, decay: 4 do
live_loop :zero do
play s0.tick, cutoff: s1.tick + 12, amp: amps.tick if spread(3,13).tick and one_in(2)
sleep 0.25
end
live_loop :one do
play s1.tick, cutoff: s2.tick + 12, amp: amps.rotate(10).tick if spread(5,7).tick and one_in(6)
sleep 0.25
end
live_loop :two do
play s2.tick, amp: amps.rotate(30).tick if spread(9,11).tick and one_in(7)
sleep 0.5
end
live_loop :perc do
sample :loop_amen, onset: rand_i(4), rate: choose([-1,1]) if spread(1,5).tick and one_in(6)
sample :loop_industrial, onset: rand_i(5) if spread(1,5).rotate.tick and one_in(4)
sample :loop_mika, onset: rand_i(4) if spread(3,7).tick and one_in(7)
sample :drum_cowbell, amp: 0.6 if spread(5,9).tick and one_in(4)
sleep 0.25
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment