Skip to content

Instantly share code, notes, and snippets.

@mohayonao
Last active December 25, 2015 22:49
Show Gist options
  • Save mohayonao/7052247 to your computer and use it in GitHub Desktop.
Save mohayonao/7052247 to your computer and use it in GitHub Desktop.
def = Synth.def (freq=440)->
mod = SinOsc.ar(freq * 3, 0, Line.kr(0, 2, 1, doneAction:2))
amp = Line.kr(1, 0, 1) * 0.5
Out.ar(0, SinOsc.ar(freq, mod) * amp)
Task.loop ->
f = Math.random() * 440 + 220
def.play().set freq:f
def.play().set freq:f * 0.667
@wait 400
.play()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment