Skip to content

Instantly share code, notes, and snippets.

@hopbit
Last active November 1, 2018 09:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hopbit/28607277ea42f4cd48505491ac945029 to your computer and use it in GitHub Desktop.
Save hopbit/28607277ea42f4cd48505491ac945029 to your computer and use it in GitHub Desktop.
this should show the difference in syncing cues across multiple live loops (Sonic Pi v3.1.0 vs 2.11.1)
# Use Sonic Pi v2.x to run below snippet.
# If You use v3.x + then it'll sound other than intended.
# More info: https://github.com/samaaron/sonic-pi/issues/1979
set_volume! 1
use_bpm 125
live_loop :beats do
8.times do
sample :bd_haus, amp: 0.5
sleep 1
end
end
live_loop :sample_loop do
##| stop
sync :beats
4.times do
sample :loop_industrial, beat_stretch: 2, amp: 0.2
sleep 2
end
end
notes = (scale :gs3, :minor_pentatonic)
live_loop :background do
##| stop
sync :beats
use_synth :beep
32.times do
play notes.choose, release: 0.125, amp: 0.3, cutoff: 70
sleep 0.25
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment