Skip to content

Instantly share code, notes, and snippets.

@mohayonao
Created October 18, 2013 14:05
Show Gist options
  • Save mohayonao/7042028 to your computer and use it in GitHub Desktop.
Save mohayonao/7042028 to your computer and use it in GitHub Desktop.
def = Synth.def (freq=440, amp=1)->
amp *= Line.kr(0.75, 0, 10, doneAction:2)
Out.ar(0, SinOsc.ar([freq, freq * 1.25]) * amp)
l = Task.loop ->
freq = Math.random() * 880 + 220
s = def.play()
Task.each [1,4,3,2,8,4,3,2], (x, i)->
s.set freq:freq * x, amp:1-(i/8)
@wait 250
.play()
@wait 750
.play()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment