Skip to content

Instantly share code, notes, and snippets.

@samaaron
Last active September 1, 2015 09:16
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samaaron/60bdd8795100383c613e to your computer and use it in GitHub Desktop.
Save samaaron/60bdd8795100383c613e to your computer and use it in GitHub Desktop.
# Both live loops play in total rhythmical sync.
# Notice that they are both using the same seed
# One in Ruby and the other in the synthdef ;-)
# Note: needs Sonic Pi v2.7 to work correctly
live_loop :foo do
use_random_seed 10
64.times do
play :e5, release: 0.1 if rand < 0.2
sleep 0.125
end
end
live_loop :bar do
with_fx :slicer, probability: 0.2, seed: 10, phase: 0.125 do
synth :prophet, release: 8, note: :e2, cutoff: 70
sleep 8
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment