Submit
Browse
Anonymous
Login
RSS
SuperCollider Code
Fork Code: How to Record Multichannel Output in SuperCollider
name
code content
// ========================================== // How to Record Multichannel Output in SuperCollider // ========================================== // Example - recording 4 output channels *as separate mono files*. // Code below also picks a custom path and file name to save them (adjust accordingly to your machine) // This code sets your SuperCollider Server to 4-channel output s.options.numOutputBusChannels = 4; s.reboot; // You can see the 4 channels here: s.meter; // Create 4 recorders (needs to be done just once in a session): ~recs = Recorder.new(s).dup(4) // START ALL MONO RECORDERS (chans 0, 1, 2, 3) ( var basicPath = "/home/ruviaro/Desktop/"; // customize this ~recs.do({ arg thisRecorder, index; var fileName = "test" ++ index ++ ".wav"; thisRecorder.record( path: basicPath ++ fileName, bus: index, numChannels: 1 // mono ); }) ) // Start making some sound (below, 4 channels of sound) ( { var snd; snd = LFTri.ar( freq: [100, 204, 310, 405], mul: LFPulse.ar([1, 2, 3, 4]) ); // snd = Splay.ar(snd); Out.ar(0, snd * 0.2); }.play; ) // Stop all recorders ~recs.do({ arg thisRecorder; thisRecorder.stopRecording }) s.freeAll; // ===================== // NOTE: if you don't care about recording each channel as a separate mono file, then the code is way simpler. // Start recording (a single 4-channel file will be saved in the default recordings directory): s.record(numChannels: 4); // Stop recording s.stopRecording;
code description
This example shows how to record 4 output channels *as separate mono files*. Also shows how to pick a custom path and file name for the files. File type chosen is "wav" (instead of default "aiff").
use markdown for formating
category tags
comma separated, i.g. "wild, siren" (do not enter default SC class names, please)
ancestor(s)
comma separated identificators, i.g. "1-C,1-1,1-4M,1-x"
Private?
the code will be accessible by direct url and not visible in public activity
signup to submit public code without captcha
comment of change