Skip to content

Instantly share code, notes, and snippets.

@Softwave
Created September 25, 2015 21:23
Show Gist options
  • Save Softwave/e242577d83383041164d to your computer and use it in GitHub Desktop.
Save Softwave/e242577d83383041164d to your computer and use it in GitHub Desktop.
require 'osc-ruby'
@client ||= OSC::Client.new('localhost', 9177)
@client.send(OSC::Message.new("/shader" , "/Users/Discovery/Shaders/test.glsl"))
live_loop :mainloop do
with_fx :reverb, room: 1, reps: 4 do
use_synth :prophet
ns = (scale :c3, :minor_pentatonic, num_octaves: 4).take(4)
ss = (scale :c3, :minor_pentatonic, num_octaves: 4).take(4)
4.times do
play ns.choose, detune: 12, release: 8, amp: 2, amp: rand + 0.5, cutoff: rrand(70, 120), amp: 2
@client.send(OSC::Message.new("/decaying-uniform", "shiggle", 9.9, 2.0))
sleep 4
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment