SuperCollider
From Noah.org
Revision as of 14:48, 1 July 2016 by Root (talk | contribs) (→Record into a buffer for later processing)
Record Microphone into a buffer for later processing
// IXI tutorial #4 // Record into an 8 second mono buffer. b = Buffer.alloc(s, 44100 * 8.0, 1); ( SynthDef(\recBuf,{ arg out=0, bufnum=0; var in; in = AudioIn.ar(1); RecordBuf.ar(in, bufnum); }).load(s); ) // record into the buffer x = Synth(\recBuf, [\out, 0, \bufnum, b.bufnum]); x.free; // play it back using the playBuf synthdef created above z = Synth(\playBuf, [\bufnum, b.bufnum]) z.free; // save buffer to disk as an AIFF soundfile. b.write("myBufRecording.aif", "AIFF", 'int16');