Skip to content

Instantly share code, notes, and snippets.

@juliancheal
Created October 26, 2016 22:49
Show Gist options
  • Save juliancheal/fca3998a0696dd7f075e385f4e7d9efe to your computer and use it in GitHub Desktop.
Save juliancheal/fca3998a0696dd7f075e385f4e7d9efe to your computer and use it in GitHub Desktop.
Simple Tune in Sonic Pi controlling three analog synths
require 'drb/drb'
DRb.start_service
synth = DRbObject.new_with_uri('druby://localhost:9999')
use_bpm 135
live_loop :drums do
2.times do
synth.note(36,:volca_beats)
sleep 0.5
end
synth.note(38,:volca_beats)
puts synth.note(43,:volca_beats).inspect
end
live_loop :keys do
sync :drums
notes = ring(:As, :Fs, :Gs, :Gs)
notes.each do |n|
tick
synth.note(note(n, octave: 2),:volca_keys)
sleep 0.75
end
sleep 1
end
live_loop :minibrute do
sync :drums
notes = ring(:As, :Fs, :Gs)
notes.each do |n|
tick
synth.note(note(n, octave: 3),:minibrute)
sleep 1.5
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment