User:Crantila/FSC/Synthesizers/SuperCollider/Exporting

Non-Real-Time Synthesis
SuperCollider allows you to synthesze audio output to an audio file. Doing this requires using OSC commands on the server, the "DiskOut" UGen, the "Buffer" UGen, and other relatively advanced concepts. The built-in help file located contains some help with the DiskOut UGen, and links to other useful help files. This method is not further discussed here.

Tutorial: Recording SuperCollider's Output
Since SuperCollider outputs its audio signals to the JACK sound server, any other JACK-aware program has the opportunity to record, process, and use them. This portion of the tutorial will help you to record SuperCollider's output in Ardour. Due to the advanced nature of SuperCollider, the text assumes that you have a basic knowledge of how to work with Ardour. If not, you may find it helpful to refer to the Ardour chapter of the Musicians' Guide.

This procedure will help you to use Ardour to record SuperCollider's output.
 * 1) Close unnecessary applications and stop unnecessary processes, which will help to reduce the risk of a buffer underrun, which would cause an audible break in audio.  If you are viewing this document in a web browser, you may want to copy-and-paste it into a simple text editor, or GEdit, if you are already using that.
 * 2) Use QjackCtl to set up JACK with the right audio interface and configuration options.
 * 3) In order to get a clean start, restart the SuperCollider interpreter in GEdit, then start the server.
 * 4) Open Ardour with a new session, and set up the rulers and timeline as desired.  Seconds is usually the most appropriate unit with which to measure a SuperCollider recording.
 * 5) Add a stereo track (or however many channels desired), and rename it it "SuperCollider."
 * 6) Use Ardour (the "Track/Bus Inspector" window) or QjackCtl to connect the "SuperCollider" track to SuperCollider's outputs.
 * 7) You'll want to make sure that the SuperCollider output is also connected to your audio interface, so that you can hear the program as you progress.  This is an example of !!multi-plexing!!.   Changes to your audio interface's volume control will not affect the recording in Ardour.
 * 8) Arm the track and transport in Ardour.  When you are ready, start the transport.  It is not important to start SuperCollider as quickly as possible, since you can cut out the silence after the recording is made.
 * 9) Switch to GEdit and play the program that you want to record.  If you make a mistake while starting the program, that's okay.  We can always edit the recording after it's recorded.
 * 10) Listen to the recording as it goes along.  Use QjackCtl to make sure that you don't encounter a buffer underrun, and Ardour to make sure that you don't record a distorted signal.
 * 11) When SuperCollider has finished playing your program, switch to Ardour, and stop the transport.
 * 12) After the recording finishes, use Ardour to cut out extra portions of audio that were recorded, but which you don't want in the exported file.
 * 13) When you are ready to export, use the Ardour menu: 'Session > Export > Export session to audio file'
 * 14) The audio file will be created in the "export" sub-directory of the session's directory.