Skip to content

Instantly share code, notes, and snippets.

@Sciss
Created July 20, 2016 17:06
Show Gist options
  • Select an option

  • Save Sciss/1031a50c501f6688342070c6959937aa to your computer and use it in GitHub Desktop.

Select an option

Save Sciss/1031a50c501f6688342070c6959937aa to your computer and use it in GitHub Desktop.
val b = Buffer(s)
b.alloc(numFrames = 44100 * 10)
b.zero()
play {
val sig = PlayBuf.ar(numChannels = 1, buf = b.id, loop = 1)
// val in = WhiteNoise.ar(0.1)
val in = SinOsc.ar(XLine.kr(400, 1000, 10)) * 0.1
RecordBuf.ar(in = in, buf = b.id, offset = 44100 * 5, loop = 1)
val ref = SinOsc.ar(1000) * 0.1
Out.ar(0, Seq(sig, ref))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment