Skip to content

Instantly share code, notes, and snippets.

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