RTcmix Scorefile Commands
RTcmix scorefile commands are used to set up and control the execution
of RTcmix. They also include a number of 'utility' commands for
algorithmic music-creation work using the default
Minc scorefile parser.
RTcmix commands generally return values that are type "double".
Although these commands are designed to be used within an RTcmix
scorefile, they can also be used as part of an 'imbedded' application,
working in conjunction with the
RTcmix object.
The following commands are currently included in the RTcmix distribution
(categorized below, alphabetical listing in the frame on the left):
General
- Minc -- overview of the default Minc scorefile parsing language
- rtsetparams -- set basic audio parameters (sampling rate, number of channels, etc.)
- load -- load an instrument into RTcmix for use
- rtinput -- open a soundfile or input device for reading
- rtoutput -- open a soundfile for writing
- set_option -- turn on and off various RTcmix options
- bus_config -- configure and connect the inputs and outputs of RTcmix instruments
- reset -- set the control function/envelope update rate
- control_rate -- set the control function/envelope update rate
- exit -- terminate RTcmix
- f_arg -- return a floating-point argument to the CMIX command
- i_arg -- return an integer argument to the CMIX command
- n_arg -- return the number of arguments to the CMIX command
- s_arg -- return a string argument to the CMIX command
- print -- print a value
- print_off -- stop printing of RTcmix stats to the screen
- print_on -- allow printing of RTcmix stats to the screen
- str_num -- print a concatented list of "atring"/# pairs
- stringify -- return a pointer to a string argument
- system -- execute Terminal or Shell commands from within RTcmix
Soundfile/Audio Information
- CHANS -- return # of channels of input soundfile
- DUR -- return duration of input soundfile
- LEFT_PEAK -- return peak amplitude for left channel of input soundfile
- PEAK -- report peak amplitude for input soundfile
- RIGHT_PEAK -- return peak amplitude for right channel of input soundfile
- SR -- return sampling rate of input soundfile
- getamp -- retrieve amplitude value from an LPC analysis file
- getpch -- retrieve pitch value from an LPC analysis file
Math/Data/Numerical Conversion
- abs -- absolute value of argument
- ampdb -- convert decibels to amplitude
- dbamp -- convert amplitude to decibels
- boost -- return amplitude multiplier for stereo compensation
- log -- return the log10 of the argument
- pow -- raise (exponentiate) one argument by the other
- max -- return maximum value of params
- min -- return minimum value of params
- mod -- return result of modulus operation
- round -- return nearest integer to the argument
- trunc -- truncate a value to integer portion
- wrap -- modulus-like command
- translen -- calculate duration from a transposition value (oct.pc)
Pitch-Specification Conversion
- cpsmidi -- convert from midi note # to frequency (Hz)
- cpsoct -- convert from linear octaves to Hz specification
- cpspch -- convert from oct.pc to Hz specification
- midipch -- convert oct.pc to midi note #
- octpch -- convert from Hz specification to linear octaves
- octpch -- convert from oct.pc to linear octaves
- pchcps -- convert from Hz to oct.pc specification
- pchmidi -- convert from midi note # to oct.pc
- pchoct -- convert from linear octaves to oct.pc
Random-Number Commands
- irand -- return a random number within a specified range
- pickrand -- return a random choice from a specified set of numbers
- pickwrand -- return a weighted random choice from a specified set of numbers
- rand -- return a random number between -1.0 and 1.0
- random -- return a random number between -0.0 and 1.0
- srand -- set the initial seed value for the RTcmix psuedo-random number generator
Function-table (Envelope/Control)
- makegen -- fill a function table slot using a gen routine:
gen1 -- fill a function table slot with samples from a soundfile
gen2 -- fill a function table slot with specified values
gen3 -- fill a function table slot with numbers from a binary data file
gen4 -- create a function table using line segments with adjustable curvature
gen5 -- create a function table using exponential line segments
gen6 -- create a function table using straight line segments
gen7 -- create a function table using value/#-of-points/value specifications
gen9 -- create a function table using partial-#/amplitude/phase specifications
gen10 -- create a function table using harmonic amplitudes
gen17 -- create a function table using Chebyshev polynomials
gen18 -- create a function table using straight line segments
gen20 -- create a function table using random numbers
gen24 -- create a function table using time/value pairs
gen25 -- fill a function table slot with a Hanning or Hamming window function
- addgens -- add two function table slots together to create a new one
- copygen -- copy a function table slot to another
- invertgen -- invert the values in a fuinction table slot
- multgens -- multiply two function table slots together to create a new one
- offsetgen -- add a value to every number in a function table slot
- quantizegen -- quantize the values in a function table slot
- reversegen -- reverse the order of the numbers in a function table slot
- scalegen -- multiply every number in a function table slot by a value
- shiftgen -- change the phase (starting value) of a function table slot
- fdump -- dump the data from a function table slot to a terminal/file
- fplot -- show a plot of a function table slot
- infile -- open an input data file for use with
gen2 or
gen3
- sampfunc -- return a specific value from a function table slot
- sampfunci -- return an interpolated value from a function table slot
- setexp -- create function table slot #1 with exponential segments, specified in time/value pairs
- setline -- create function table slot #1 with linear segments, specified in time/value pairs
- setline_size -- set the size of function table slot #1 for
setexp and
setline
There are a few older, disk-based cmix commands that are not documented
here (commands like open, input, output, etc.). They
have all been superceded by RTcmix commands, and it isn't guaranteed
that they work very well. See the source code if you are Seriously
Interested.