Non-Realtime Synthesis (NRT):
Filter:
Guides | Server > NRT | External Control > OSC

Non-Realtime Synthesis (NRT)

Non-realtime synthesis with binary files of OSC commands

Non-Realtime Synthesis

SuperCollider 3 supports non-realtime synthesis through the use of binary files of OSC commands.

First create an OSC command file (i.e. a score)

then on the command line (i.e. in Terminal):

The command line arguments are:

If you do not need an input sound file, then put "_" for the file name as in the example above.

For details on other valid arguments to the scsynth app see Server-Architecture.

This could be executed in SC as:

A more powerful option is to use the Score object, which has convenience methods to create OSC command files and do nrt synthesis.

You can then use Score.write to convert the above to the OSC command file as follows:

Score also provides methods to do nrt synthesis directly:

Analysis using a Non-Realtime server

An NRT server may also be used to extract analytical data from a sound file. The main issues are:

Suppressing audio file output
In macOS and Linux environments, use /dev/null for the output file path. In Windows, use NUL.
Retrieving analytical data.
The easiest way is to allocate a buffer at the beginning of the NRT score, and use BufWr to fill the buffer. At the end of the score, write the buffer into a temporary file. Then you can use SoundFile on the language side to access the data. See the example.