Skip to content

Instantly share code, notes, and snippets.

@0atman
Created May 5, 2020 07:06
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 0atman/bfda10a19692289d67dcfb1d5648f998 to your computer and use it in GitHub Desktop.
Save 0atman/bfda10a19692289d67dcfb1d5648f998 to your computer and use it in GitHub Desktop.
Simple sonic pi metronome
live_loop :metronome do
cue tick
128.times do
t = tick
bar = ((t - 1) / 4) + 1
beat = (t - 4 * bar) + 4
cue String(bar) + "/" + String(beat)
sleep 1
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment