Skip to content

Instantly share code, notes, and snippets.

@mohayonao
Created October 19, 2013 07:43
Show Gist options
  • Save mohayonao/7052755 to your computer and use it in GitHub Desktop.
Save mohayonao/7052755 to your computer and use it in GitHub Desktop.
s = Synth.def (freq)->
mod = SinOsc.ar(MouseX.kr(8000, 0.5))
Out.ar(0, SinOsc.ar(freq, mod))
.play()
Task.loop ->
t = Task.each [0, 2, 4, 5, 7, 9, 11, 12], (x)->
s.set freq: 440 * Math.pow(2, x/12)
@wait 500
.play()
@wait t
.play()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment