Score encapsulates a list of timed OSC commands and provides some methods for using it, as well as support for the creation of binary OSC files for non-realtime synthesis. See Non-Realtime Synthesis (NRT) for more details.
The list should be in the following format, with times in ascending order. Bundles are okay.
For NRT synthesis the final event should a dummy event, after which synthesis will cease. It is thus important that this event be timed to allow previous events to complete.
Score scheduling defaults to TempoClock. A setting of TempoClock.default.tempo = 1
(60 beats per minute), may be used to express score events in seconds if desired.
returns a new Score object with the supplied list.
list |
as *new, but reads the list in from a text file.
path |
a String indicating the path of the file. The file must contain a valid SC expression. |
as *new but immediately plays it. (See also the instance method below.)
list |
the list. |
server |
If no value is supplied it will play on the default Server. |
as *play, but reads the list from a file.
a convenience method to create a binary OSC file for NRT synthesis. Does not create an instance.
list |
the list. |
oscFilePath |
a String containing the desired path of the OSC file. |
clock |
Use clock as a tempo base. |
as *write but reads the list from a file.
path |
a path to a file with a list. |
oscFilePath |
a String containing the desired path of the OSC file. |
clock |
Use clock as a tempo base. |
a convenience method to synthesize list in non-realtime. This method writes an OSC file to oscFilePath (you have to do your own cleanup if desired) and then starts a server app to synthesize it. For details on valid headerFormats and sampleFormats see SoundFile. Use TempoClock.default
as a tempo base. Does not return an instance.
list |
the list. |
oscFilePath |
the path to which the binary OSC file will be written. |
outputFilePath |
the path of the resultant soundfile. |
inputFilePath |
an optional path for an input soundfile. |
sampleRate |
the sample rate at which synthesis will occur. |
headerFormat |
the header format of the output file. The default is 'AIFF'. |
sampleFormat |
the sample format of the output file. The default is 'int16'. |
options |
an instance of ServerOptions. If not supplied the options of the default Server will be used. |
completionString | |
duration | |
action |
A function to be evaluated once the NRT server has finished rendering its score. |
play the list on server, use clock as a tempo base and quantize start time to quant. If server is nil, then on the default server. TempoClock.default
if clock is nil. now if quant is 0.
stop playing.
create a binary OSC file for NRT synthesis from the list. Use clock as a tempo base. TempoClock.default
if clock is nil.
get or set the list.
adds bundle to the list.
sort the score time order. This is recommended to do before recordNRT or write when you are not sure about the packet order.
synthesize the score in non-realtime. For details of the arguments see *recordNRT above.
save the score list as a text file to path.
From the command line, the file can then be rendered from within the build directory:
Score also provides methods to do all this more directly: