an open-source digital signal processing and sound synthesis language
about · links · contact

Scorefile Commands and Functions

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 'embedded' application, working in conjunction with the RTcmix object.

Arrange by: Topic  ·  Alphabetical

General

  • Minc -- overview of the default Minc scorefile parsing language
  • rtsetparams -- set basic audio parameters (sampling rate, number of channels, etc.)
  • len -- return the length of the argument
  • 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
  • include -- embed one scorefile within another
  • index -- return the index of an item in a list
  • 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 values
  • makeinstrument - create handle for CHAIN
  • printf -- print formatted values
  • print_off -- stop printing of RTcmix stats to the screen
  • print_on -- allow printing of RTcmix stats to the screen
  • stringify -- return a pointer to a string argument
  • system -- execute Terminal or Shell commands from within RTcmix
  • type -- return the Minc data-type of its argument

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
  • filechans -- return # of channels of a named soundfile
  • filedur -- return duration of a named soundfile
  • filepeak -- return peak amplitude of a named soundfile
  • filesr -- return sampling rate of a named 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

  • cpslet -- convert from text-string note letter representation to frequency (Hz)
  • 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 #
  • octcps -- convert from Hz specification to linear octaves
  • octlet -- convert from text-string note letter representation to linear octaves
  • octmidi -- convert from midi note # to linear octaves
  • octpch -- convert from oct.pc to linear octaves
  • pchcps -- convert from Hz to oct.pc specification
  • pchlet -- convert from text-string note letter representation 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
  • trand -- return a random integer within a specified range
  • spray_init -- initialize a random number "spray can"
  • get_spray -- retrieve a value from a "spray table"

Envelope/Control (Function tables, Interface connections, PField variables)

  • makeconnection -- create PField connection to an interface or device
      mouse -- connect to the mouse position
      midi -- connect to MIDI controller
      datafile -- open and read data from an existing file
      inlet -- connect to a Max/MSP rtcmix~ object inlet
  • maketable -- create a table using the table-handle scheme:
      textfile -- fill a table with values from a text file
      soundfile -- fill a table with samples taken from a soundfile
      literal -- fill a table with specified values
      datafile -- fill a table with values from a binary data file
      curve -- fill a table using line segments with adjustable curvature
      expbrk -- fill a table using exponential line segments
      line -- fill a table using straight line segments
      linebrk -- fill a table using a linear break-point function (value/#-of-points/value)
      spline -- fill a table using a spline curve
      wave3 -- fill a table with 1 cycle of a waveform specified using partial-#/amplitude/phase
      wave -- fill a table with 1 cycle of a waveform using harmonic amplitudes
      cheby -- fill a table using a Chebyshev polynomial
      random -- fill a table using random numbers
      window -- fill a table with a Hanning or Hamming window function
  • modtable -- modify a table given a table-handle:
      normalize -- scale table to fit within a specified value
      reverse -- reverse the order of values in a table
      shift -- shift the order of values in a table
      draw -- insert new values into a table at run-time
  • add -- add to a table-handle table given constant or another table-handle table
  • copytable -- copy and optionally resize a table from a table-handle
  • div -- divide the values in a table-handle table by a constant or another table-handle table
  • dumptable -- print the contents of a table given a table-handle
  • makeLFO -- set up a low-frequency oscillator for PField control use
  • makeconverter -- use a conversion program to change PField data format
  • makefilter -- establish a filter to transform PField variable data:
      clip -- limit data to a specified range
      constrain -- use pfield data values to select within a table-handle table
      delay -- delay data values by a specified amount
      fitrange -- expand data to a specified range
      invert -- 'invert' (mirror) data around an axis of symmetry
      map -- modify data through a transfer-function table
      quantize -- round data to nearest integer multiples of a quantum value
      smooth -- apply a simple averaging filter to an incoming data stream
  • makemonitor -- display or record PField control data
  • makerandom -- set up a periodic random-number generator for PField control use
  • mul -- multiply a table given a table-handle by a constant or another table-handle table
  • plottable -- plot the contents of a table given a table-handle
  • samptable -- return a value (specific or interpolated) from a table given a table-handle
  • sub -- subtract values from a table-handle table given a constant or another table-handle table
  • tablelen -- return the size of a table from a table-handle
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.