Skip to content

Instantly share code, notes, and snippets.

@KeithHanson
Created June 23, 2020 00:43
Show Gist options
  • Save KeithHanson/a9f4c41150ae89696ee3502ef311867d to your computer and use it in GitHub Desktop.
Save KeithHanson/a9f4c41150ae89696ee3502ef311867d to your computer and use it in GitHub Desktop.
Fun with rubyisms in SonicPi
# Welcome to Sonic Pi
bpm = 90
live_loop :reloader do
class Hello
def self.ping(context)
context.sample :elec_ping, amp: 0.3
end
end
sleep 0.1
end
live_loop :metronome2 do
sync :reloader
use_bpm bpm
Hello.ping(self)
sleep 1
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment