Usually used in the Start() method of a game object script, this will initialize the RTcmix process associated with objno, getting it set for use.
This function is called once within the OnAudioFilterRead() method in a game object script. data is passed in from this method.
Used to check for 'bangs' scheduled inside the RTcmix engine. These are scheduled by the MAXBANG() RTcmix instrument. This function also runs in the OnAudioFilterRead() method of a game object script. It returns "1" if a scheduled 'bang' is present.
This function is also called within the OnAudioFilterRead() method in a game object script. The farray is filled with the scheduled MAXMESSAGE() values.
It returns the number of values present at the current time to be read.
Here is an example of how these values may be retreived:
float[] vals; int nvals = RTcmix.checkvalsRTcmix (out vals, objno); if (nvals > 0) { Debug.Log (vals [0]); Debug.Log (vals [2]); }
This will cause RTcmix output messages to be printed in the Unity console if the RTcmix scorefile command print_on() is set in the score. NOTE: At present, this will only work for one objno at a time. It is called within the game object OnAudioFilerRead() method.
Used to dynamically modify parameters of executing RTcmix instruments using the PField system. This is called from an interactive method outside the OnAudioFilterRead() method in a game object (such as the Update() method).
For RTcmix scores that use the "$n" (i.e. $1, $2, etc.) feature for altering RTcmix scores, this will substitute the values listed in the function in order for each of the "$n" variables.
A string with the substituted values is returned.
For example, the simple RTcmix score
Upon receupt of the RTcmix score, the RTcmix engine will synthesis/process sound samples immediately, with time "0" being the time that the score was sent. This assumes that initRTcmix() has been called already and that the game object OnAudioFilterRead() method is working. Be sure to designate the game object as an "Audio Source" in the Unity game editor.
This will remove all currently executing and future RTcmix instruments and scorefile commands from the RTcmix engine queue.