Note lists are text files with a
.txt extension. Data in a note list is space-delimited.
Each line of text is called a statement. Each statement starts with a text identifier, traditionally
known as an “opcode”.
There are two kinds of statements. header and body. Body statements have timing information; header statements do not.
The header-statement opcodes are:
orch— statements have one text parameter, the orchestra file path. A note list must contain exactly one
orchstatement, which must be the first statement in the file.
set— statements have one text parameter and one numeric parameter. A note list may not contain more than one
setstatement of any specific type.
set ratestatement, the numeric parameter controls the sampling rate. A note list may contain at most one
set ratestatement. If no
set ratestatement is present, the orchestra's default sampling rate is used.
set bitsstatement, the numeric parameter controls the number of bits per sample. The numeric value may be either 16 or 32. The Sound engine always represents samples in memory as double-precision floating-point numbers, and all calculations are taken to this accuracy. However the WAV file format used to store audio signals stores values either as short (16-bit) integers or long (32-bit) integers. A note list may contain at most one
set bitsstatement. If no
set bitsstatement is present, the orchestra's default sample quantization is used.
set normstatement, the numeric parameter controls wavefile normalization. The parameter value may be either 0 (normalization declined) or 1 (normalization accepted). Normalization means that sample values are originally written to a temporary file with 32-bit accuracy, and that during this first pass, the largest sample magnitude is detected. The sample values are then reprocessed in a second pass, which rescales values so that the largest sample magnitude is 32767. Normalization thus optimizes the signal-to-noise ratio of the final WAV file.
set normstatement. If no
set normstatement is present, the wavefile will not be normalized.
set tracestatement, the numeric parameter controls whether or not the output text includes a trace of score events. The parameter value may be either 0 (trace declined) or 1 (trace accepted). A note list may contain at most one
set tracestatement. If no
set tracestatement is present, score events will not be traced.
name— statements have one text parameter, the filename (minus the .wav extension) which which will receive the audio signal. The output file will be created in the same directory as the note list; if a .wav file of the same name already exists, the older file will be overwritten. A note list may contain at most one
namestatement. If no
namestatement is present, the notelist name will be used.
file— statements have three numeric parameters and one text parameter. A note list may contain any number of
filestatements, or none, but each
filepresent must have a unique ID.
The required order for header statements is:
The note-list body opcodes are:
start— statements have one numeric parameter, the note list starting time in seconds. The
startstatement is optional, the intent being to test a snippet that will be incorporated into a longer note list. There may be at most one
startstatement in every note list.
note— statements have only numeric parameters, of which the first six have fixed definitions. A note list may contain any number of
notestatements, but each
notemust have a unique ID.
notestatements. When two notes with the same voice ID's play simultaneously, calculations are performed first for the note with the lower note ID.
ramp— statements have six numeric parameters, all of which have fixed definitions. A note list may contain any number of
rampstatements, but each contour's
rampstatements must fill the time period from 0 to the note-list end time without overlaps.
rampstatements provided for any voice will affect all voices concerned.
rampstart time, in seconds. This parameter must be a non-negative decimal number, rounded to the nearest hundredth.
rampduration, in seconds. This parameter must be a positive decimal number, rounded to the nearest hundredth.
ramporigin, which is decimal. If the contour identified by parameters 2 and 3 has an exponential calculation mode, then this parameter must be positive; otherwise the parameter is optionally restricted using limits set within the orchestra.
rampgoal, which is decimal. If the contour identified by parameters 2 and 3 has an exponential calculation mode, then this parameter must be positive; otherwise the parameter is not optionally restricted using limits set within the orchestra.
end— statements have one numeric parameter, the note list ending time in seconds. There must be exactly one
endstatement in every note list.
The suggested order for body statements is:
|© Charles Ames||Page created: 2014-03-06||Last updated: 2017-08-15|