All core opcodes are listed here with their online help text. The online help text is also visable in the program by creating the object, selecting it and then pressing F1.
Runtime errors are not listed. If needed, the range of the objects is mentioned in the helptext.
Use PAGE_UP or PAGE_DWN to add or remove more input channels (mono, stereo). You can not change the number of inputs when the writing has started.
Doubleclick on the object to enter the target filenames.
StandAlone usage: the command 'reset' cleans the list completely. At startup audioToDisk has the file '../noname.wav' as default; if anything is added for the first time, then this default is overwritten, any next file is added normally to the list, also after resetting.
The control inputs are for:
1: select (not zero) a filename number (1 = first, 2=second, etc) and start recording, or stop (zero) it. A checkBox is best suitable to record to one file only.
2: audio format: 1=native, 2=wav, 3=aiff
clipClap truncates the input numbers between boundaries.
Default is: -1 and 1. Note that at each output, the audio is truncated between -1 and 1 anyway (as prescribed by MPEG-4 Structured Audio).Press PAGE_UP/PAGE_DOWN to switch from/to audio/control functionality.
The control inputs are for:
1: set the upper bound (default: 1)
2: set the lower bound (default: =1)
3: (if available) get output.
midiIn represents a MIDI input hardware device.
midiMessage creates or extracts a 1, 2 or 3 bytes MIDI message from or into a single value.
In CPS, hardware MIDI devices work with 'midiMessages'. It is usefull to have the midiMessage abstraction, because it simplifies playing several MIDI messages to the same midiOut object (without introducing 'invisable wires'). It can also save network bandwidth, if CPS is used for sending and receiving MIDI messages on a network. Because this object acts like 3 floats (each with a size of a byte, 0/255), you only have to change the values that you want to be changed for playing back an event more than once.
You can switch between creating or extracting MIDI messages by selecting this object and pressing PAGE_UP or PAGE_DOWN. If midiMessage has four inputs, it is used to create a midiMessage; the fourth input is then used to trigger midiMessage to give output. If it has 4 outputs, it is used for extracting a 'midiMessage'; the fourth output always gives a trigger when one, two or three bytes have come out.
Note that you can not use midiMessage just to pack three value's in it, because only valid midi Messages are parsed back into a single 'midiMessage', and not always values come out (a MIDI message can consist of only two or only one byte).
keyboard is a simple graphic keyboard.With the presetManager you can store settings and recall them later.
This object only works on the Windows platform.
float is an object in which you can store one value.
Select this object and press PAGE_UP/PAGE_DOWN to get more or less read-out in- and outputs.
The control inputs are for:
1: set the value
others: get the value. Depending on in which input you have put a signal, you get output at a certain output. For example, if you put a value in the second input, then the float's value comes out the first output. If you put something in the third input, then the float's value comes out the second output. Etc.
With gate you can select one input out of several inputs.
Select this object and press PAGE_UP or PAGE_DOWN to switch from/to audio/control functionality and to get more or less outputs.
Doubleclick on this object to set the switching value's (default: 0, 1, 2, 3, 4, 5, 6, 7). 'gate' has a 'switch' build-in, similar to the 'switch' object.
The control input is for:
1: set the value that will be used for switching.
All other inputs are for 'gating'. Notice that the first value is not in use when using it on controlrate, because the first controlinput is for setting the switch value. This also means that the gate is not set by default to the first audio input when using the gate on audio functionality!
Use 'order' to force a certain order in the processing.With switch you can switch an input to a specific output.
Select this object and press PAGE_UP or PAGE_DOWN to switch from/to audio/control functionality and to get more or less outputs.
Doubleclick on this object to set the switching value's (default: 0, 1, 2, 3, 4, 5, 6, 7). If none of the case's fitted, the output comes out the last output.
'switch' is not capable of switching tables.
The control inputs are for:
1: set the value that will be used for switching.
2: (if on control functionality) set the output value and get output.
timer gives output after a certain interval of time.
The inputs are for:
1: the delay (ms, default: 1000)
2: on(1) or off(1)
A negative time makes the timer stop (also when it is 'on' according to the second input),
and zero makes the timer to output as much as possible.
The output is not preciseously in time; it can differ several milliseconds from the timing that you asked for. If you want to process audio in time with accurate precision, use a 'k-rate' object.
localTime gives at request information about the current (local) time.
The outputs return the current time in seconds, minuts, hours, which day, which month, which year (minus 1900).
CD is a simple CD player.
Platform dependent (MSWindows): there is no special object needed for reading data from CD; you can read from a data CD directly by using the normal file system. This object also works for SCSI CD-ROM drives.
The control inputs are for:
1: start (1) or stops (0) the CD player.
2: start this track.
3: set which drive it represents (0='D:' (default), 1='E:', etc.).
This object only works on the Windows platform.
getinterqual returns the interpolation quality.
The interpolation is used when looking up values in delays and tables.
getbuffersize tells you what the audio buffersize is.
If the buffersize changes, 'getbuffersize' automaticly fires the buffersize.
You can set the buffersize in the 'Globals' menu.
s_rate returns the current samplerate (default: 44100).
If the samplerate changes, 's_rate' automaticly fires the samplerate.
You can set the samplerate in the 'Globals' menu.
k_rate returns the current krate (default: 86.13).
The krate is the frequency of the k-rate in Hertz (that is, the samplerate divided by the buffersize). If the samplerate or the buffersize changes, 'k_rate' automaticly fires the new krate.
You can set the samplerate and the buffersize in the 'Globals' menu.
In a numberField you can type a number. You can 'drag' inside the numberField to change (and put out) it's value, and you can also click on it and then type a new value.
You can save a text in 'comment' to clearify a patch. Doubleclick on the object to enter or change the text.
audioControl converts an audio signal to a control signal.
'k-rate' returns a trigger at control rate, each time an audio buffer is processed.
You can use 'k-rate' for updating value's which do not need to be updated after every sample, but only once after a buffer. MPEG-4 Structured Audio objects that work on controlrate should get a k-rate signal; these are all objects that begin with a 'k', for example koscil, kline, kexpon, kphasor, etc. All objects that begin with a 'k' and also work with time, like 'kpoissonrand', only work in the grid of time when connected to a k-rate input.
The k-rate object is the same as the MPEG-4 SA 'decimate' object, except the decimate object also returns a sample value fromout the audio input. Also, their concepts are different; 'k-rate' is ment for putting objects in the scheduling of audio; decimate is only for snapping audio value's.
Use downsamp if you do not want to snap an audio value but if you want to follow the shape of the audio signal (as an envelope follower). Use audioControl and controlAudio for processing audio on sampleprecision.
When the audio gets into the k-rate input, at that point all following k-rate traffic is written down to the SAOL file when saving as .saol file; so with k-rate you also decide the layout of your .saol file.
decimate returns an audio value at control rate, each time an audio buffer is processed.
upsamp translates a control value into a continuous audio value.
samphold gates a signal with a controlrate signal.
Press PAGE_UP or PAGE_DOWN to switch from/to audio/control functionality.
The control inputs are for:
1: gate open (not 0) or closed (0)
2: (if available) input signal.
sblock captures audio and puts it in a table.
The standard MPEG-4 SA 'sblock' copies the captured audio in a table, each time a buffer of audio comes in the sblock object. The table is filled from zero to the buffersize, always on that position. The table must therefore be at least as big as the buffersize. A zero is always returned (officially on both audio and control rate, but in CPS only at controlrate).
If you select sblock and press PAGE_UP, you get the (advanced) CPS version of sblock. You can decide from where to where you want to record the audio in the table, and you can start or stop capturing. With '-1' as the 'from' argument, sblock uses the table as a circular buffer and keeps writing in it. Also, the last position of where in the table is written, is returned at controlrate and at audiorate (to put in the sblockOut object).
The control inputs are for:
1: the table for storing the audio
2: start (0) or stop (not 0) capturing
3: 'from' where capturing must be done
4: up 'to' where capturing must be stored in the table.
oscil is an oscillator which uses the table as the source.
No table properties (like basefreq) are used, it simply uses the complete table as one loop.
The control inputs are for:
1: the table.
2: how many times to loop the table (-1=continuously, default)
3: (if active) the input if working on sampleprecision (with audioControl and controlAudio).
The audio input is for setting the frequency.
Select this object and press PAGE_UP or PAGE_DOWN to switch to or from audio-functionality or control-functionality.
loscil loops a table, using the table as a wavetable source.
The control inputs are for:
1: the table
2: the base frequency (if not provided, the table base frequency is used).
3: the start loop point (if not provided, the table start loop point is used).
4: the end loop point (if not provided, the table end loop point is used).
The audio input is for the frequency.
Because you can give basefreq and loopstart and loopend arguments different than the table's arguments, the table's arguments are only taken (or, seen as 'provided') when the table is being connected. If you use a table with an other generator than 'wave', then you must set the samplerate of the table (with 'ftsetsr') because loscil resamples to the correct samplerate.
doscil plays back a table once using it as a wavetable.
If the table is not a 'sample', then you must set the samplerate before doscil gives output. Playback is corrected according to the samplerate of the table and the current samplerate.
The control inputs are for:
1: the table.
2: play the sample.
koscil is an controlrate oscillator using the table as the source.
The control inputs are for:
1: the table.
2: the frequency (how many times to loop around table in a second).
3: how many times to loop the table (-1=continuously, default).
4: get the output, to be connected to a 'k-rate' object.
'sinus' is a sinus oscillator.
The first controlinput is for setting the frequency. You cannot set the frequency at audiorate; use a table (with the 'harm' generator) and oscil if you want to do this.
If you use 'sinus' with an envelope, make the last segment to go to 0 Hertz for eliminating the click on the end, because envelope generators can give a slightly bigger/smaller value at the end of a segment.
Note that a sinus does not always produce silence when the frequency is zero, the output value just doesn't change.
pluck is a simple implementation of the Karplus-Strong algoritm; the sound is generated by repeated sampling and smoothed by taking the average of the buffer.
The control inputs are for:
1: the bufferlength of the internal buffer. Retriggering the size means replucking the object; the table data is then added to the data that was already present.
2: the table which is used for starting up the sound. Try out different tables for different timbres.
3: the attenuation level (default: 1)
4: at which interval, in samples, the buffer will be 'averaged'. The smaller this parameter, the longer the sound will sound.
The audio input is for the frequency (default: 6000).
'buzz' produces a band-limited pulse train, formed by adding together cosine overtones.
The control inputs are for setting:
1: (nharm) the number of harmonics used, starting from 'lowharm'. Warning: don't set this parameter too high, because it influences your CPU usage very much (default: 10).
2: (lowharm) the lowest harmonic used. 0 (default) is the fundamental.
3: (rolloff) the multiplicative rolloff, which defines the spectral shape. If negative, then the partials alternate in phase; if higher than 1 or lower then -1, then partials increase in amplitude (default: 0.6).
'joystick' represents a simple joystick hardware device.
The first control input is for selecting which joystick to use (0 or 1, default: 0). You can not set the treshold of the joystick, you can do this manually after readout (for example by bitshifting the output).
Do not make several joystick objects for one single hardware joystick. In opposite to midi and audio hardware objects, this is possible, but then there is no guarentee that all joystick objects will receive the same information.
The control outputs are defined as follows: 1: X-position, 2: Y-position, 3: Z-position, 4: which button (1 or 2, or both: 3) is pushed or unpushed (0). The resulution of the position is 0 to 65535. You might need to calibrate your joystick before proper usage.
This object only works on the Windows platform.
mouseMoved returns the coordinates of the mouse when the mouse has moved.
This object does not function in standAlone mode.
mousePressed notifies when the a mouse button is pressed.
This object does not function in standAlone mode.
keyPressed returns the pressed key when a key is pressed.
This object does not function in standAlone mode.
keyReleased returns the released key when a key is released.
This object does not function in standAlone mode.
Select the object and press PageUp/PageDown to switch from/to control/audio/table functionality. All objects of this type are pluriformal.
You can evaluate the control/table-version of these objects by giving input to the third input. In CPS, objects that need more than one value, have an extra input (called 'get') which makes the object fire it's output. In this way you are always sure of what happens when you give input to objects.
If the object is in table-functionality (if it has only control inputs), it acts the same as with control-functionality, except that the output-connector becomes the 4th (last) input-connector. If you put something in the (third) get-input, then the calculation is done for the complete tables, if they are all present (two input tables and one output table). The quantity is the smallest table size.
If you attach more than one wire to control-inputs of the same object fromout the same controloutput, then the data will enter the left inputs first and the right inputs last (first 'set', than 'get').
At controlrate, comparison operators return the second (or right) input at the first output when the evaluation is true, otherwise the second input is returned at the second output. At audiorate, a one is returned if the comparison is true, otherwise a zero is returned.
+
sums all inputs together. If you press PAGE_UP more than three times, you get more audio inputs, or a combination of audio and control inputs (where the control input acts like an 'upsamp' object). Without using the '+' object, you can always connected several wires to one audio input; the audio is then automaticly added.-
substracts the first input from the second input.*
multiplies the first input with the second input./
divides the first input with the second input. If, at audio rate, a division by zero is detected, then the output is zero. Divide has no special appearance with one audio input and one control input, only '*' and '+' have; use the object 'upsamp'.%
modulus) returns the remainder when the first input is divided by the second input. If, at audio rate, a modulo zero is detected, then the output is zero. This operator acts as if the inputs are integers (a float2int and a int2float conversion are done on the fly).<
(lower than) is true when the first input is lower than the second input.<=
(lower than or equal to ) is true when the first input is lower than or equal to the second input.>
(greater than) is true when the first input is higher than the second input.>=
(greater than or equal to ) is true when the first input is higher than or equal to the second input.==
(equal to) is true when the first input is equal to the second input.!=
(not equal to ) is true when the first input is not equal to the second input.&
(bitwise-AND) compares each bit of the first input with the second input. If both bits are one, than the bit of the output bit on that position is also one, and otherwise the output bit is zero. This operator acts as if the inputs are integers (a float2int and a int2float conversion are done on the fly).^
(bitwise-exclusive-OR) compares each bit of the first input with the second input. If the first bit is 0 and the second bit is 1 (or reversed), than the output bit on that position is also one, and otherwise the outputbit is zero. This operator acts as if the inputs are integers (a float2int and a int2float conversion are done on the fly).|
(bitwise-inclusive-OR) compares each bit of the first input with the second input. If one or both bits are one, than the bit of the output bit on that position is also one, and otherwise the output bit is zero. This operator acts as if the inputs are integers (a float2int and a int2float conversion are done on the fly).&&
(logical-AND) gives a one as output when all the inputs are non-zero. Otherwise false is returned.||
(logical-OR) gives a zero as output when all the inputs are zero. Otherwise false is returned.<<
(bitwise left shift) means that all bits of the first input are shifted to the left as many as the second input tells. For example: 32<<2 = 128. This operator acts as if the inputs are integers (a float2int and a int2float conversion are done on the fly).>>
(bitwise right shift) means that all bits of the first input are shifted to the right as many as the second input tells. For example: 32>>2 = 8. This operator acts as if the inputs are integers (a float2int and a int2float conversion are done on the fly).!
(logical-not) translates a nonzero value into a zero value, and a zero value into one.->
(implication) returns false (zero) when the first input is true but the second input is not true. Otherwise true (one) is returned. This 'operator' is equal to (!p && q).
Select the object and press PageUp/PageDown to switch from/to control or audio or table functionality.
abs
returns the absolute value (i.o.w. makes it always positive).acos
returns the arccosine in the range 0 to pi radians. Input must be between -1 and 1. If, at audio rate, the input is wrong, then the output is zero.asin
returns the arcsinus in the range -pi/2 to pi/2 radians. Input must be between -1 and 1. If, at audio rate, the input is wrong, then the output is zero.atan
returns the arctangent in the range -pi/2 to pi/2 radians.atan2
returns the arctangent of (first input / second input), in the range -pi to pi radians, in the correct quadrant.ampdb
calculates the decibel equivalent of an amplitude parameter, where the maximum amplitude of 1 corresponds to a decibel level of 90dB.ceil
returns the ceiling (i.o.w. the input value rounded off upwards to an integral number).cos
returns the cosinus.dbamp
calculates the amplitude equivalent of a decibel-valued parameter, where the maximum amplitude of 1 corresponds to a decibel level of 90dB.exp
returns the exponential.floor
returns the floor (i.o.w. the input value rounded off downwards to an integral number).frac
returns the fractional part of the input. Equals to x-int(x); if the input is negative, then frac also returns a negative number. Use this instead of 'modf'.int
returns the integer part of the input. Use this instead of 'modf'.log
returns the logarithm of the input. If, at audio rate, the input is negative or zero, then the output is zero.log10
returns the base-10 logarithm of the input. If, at audio rate, the input is negative or zero, then the output is zero.max
returns the maximum input value. MPEG-4 SA: in SA 'max' has an unlimited number of arguments, in CPS it has only 2.min
returns the minimum input value. MPEG-4 SA: in SA 'min' has an unlimited number of arguments, in CPS it has only 2.pow
returns x raised to the power of y.rand
returns a random number between zero and one.sgn
calculates the signum of a parameter (if the input is lower than zero, then the output is -1, if the input is zero, then the output is zero, if the input is positive, then the output is 1).sin
returns the sinus.sqrt
calculates the square root of the input. If, at audio rate, the input is negative, then the output is zero.tan
returns the tangent.E
returns the natural number e.PI
returns pi.
A MIDI pitch representation is an integer numer of semitones from the bottom of the paino-keyboard, where 60 is the middle C (or: C4).
A cycles-per-second (CPS) representation is: how many times per second (or Hertz). For example: 220 Hz.
An octave-fraction (oct) representation is a number where the integer part represents the octave number (8=C4), and the fractional part represents the fraction of an octave, where each note is a step of 0.16667. For example: 7.32.
A pitch-class (pch) representation is a number where the integer part represents the octave number (8=C4), and the fractional part represents the exact pitch in the octave (.00=C, .02=D,...0.11=B). For example: 8.02.
gettune
gives the value in Hz of the current global tuning (default: 440 Hz).settune
set and returns the value in Hz of the current global tuning (default: 440 Hz).cpsmidi
cpsmidi converts a MIDI pitch representation to a cycles-per-second representation.cpsoct
cpsoct converts an octave-fraction representation to a cycles-per-sec. representation.cpspch
cpspch converts a pitch-class representation to a cycles-per-second representation.midicps
converts a cycles-per-second representation to a MIDI pitch representation.midioct
converts an octave-fraction representation to a MIDI pitch representation.midipch
converts a pitch-class representation to a MIDI pitch representation.octpch
converts a pitch-class representation to an octave representation.octcps
converts a cycles-per-second representation to an octave-fraction representation, with regard to the global tuning.octmidi
converts a midi pitch representation to an octave-fraction representation, with regard to the global tuning.pchcps
converts a cycles-per-second representation to a pitch-class representation.pchmidi
converts an MIDI pitch representation to a pitch-class representation.pchoct
converts an octave-fraction representation to a pitch-class representation.
In a table you can store numbers.
If you doubleclick on this object, you see a simple table editor. If the table is smaller than 256 points, you can draw directly in the table. Drawing in bigger tables would result in too big 'data'-generators when the file is converted to a MPEG-4 Structured Audio SAOL file.
Initially, the table is empty. Use a generator to fill the table; press on the 'Generator' button for help on generators. You can type the MPEG-4 SA arguments under the graphical representation.
A table has several extra parameters (looppoint, loopend point, base frequency, base samplerate) which you can control with the 'Table' objects. If you make a new table, the parameters of the last table are kept if possible (the old loop points can be incompatible and will be truncated). This is done so you do not have to trigger all ftset* objects after making a new table.
If you use .mp3 files, then the size is rounded to the buffersize of the encoding process; so the size is probably slightly bigger then when using a .wav file. Use the 'size' parameter to adjust this.
standAlone usage: use the command 'getsize' to get it's current size; use 'setpos %xpos %xvalue' to change value's (to fill the table manually in your sourcecode); use 'getpos %xpos' to get a value.
For decoding/reading of the fileformats, several external libraries are used. Bonneville says thanks to all these great projects and developers!
OGG/VORBIS decoding © 2004, Xiph.Org Foundation.
MP3 decoding containing sourcecode by Michael Hipp (http://www.mpg123.de/) which is licensed under the GNU Lesser General Public Licence (LGPL, (LGPL, see http://www.gnu.org/copyleft/lesser.txt).
Libsnd library (http://www.zip.com.au/~erikd/libsndfile/), which is licensed under the GNU Lesser General Public Licence (LGPL, see http://www.gnu.org/copyleft/lesser.txt).
ftlen returns the length of a table.
If the table is not initialised, the return value is '0'.
The control inputs are for:
1: the table
2: get the output.
ftloop returns the loop start point of a table.
The control inputs are for:
1: the table
2: get the output.
ftloopend returns the loop end point of a table.
The control inputs are for:
1: the table
2: get the output.
ftsr returns the sampling rate of a table.
The control inputs are for:
1: the table
2: get the output.
ftbasecps returns the base frequency of a table (in Hertz).
The control inputs are for:
1: the table
2: get the output.
ftsetloop sets the loop start point of the table.
The input value is also returned at the output.
The control inputs are for:
1: the table
2: set the value.
ftsetend sets the loop end point of the table.
The input value is also returned at the output.
The control inputs are for:
1: the table
2: set the value.
ftsetbase sets the base frequency of the table.
The input value is also returned at the output.
The control inputs are for:
1: the table
2: set the value.
ftsetsr sets the samplerate of the table.
The input value is also returned at the output.
The control inputs are for:
1: the table
2: set the value.
tableread reads a value from a table at a given position.
'kline' produces a line-segmented envelope.
With the arguments: [x1 dur1 x2 dur2 x3 ...], 'kline' will go from x1 to x2 within dur1 seconds, then from x2 to x3 within dur2 seconds, etc. You can set the arguments by doubleclicking on this object. If the envelope is finished, zero is returned. 'kline' does not give a 100% accurate representation in time. Also, the final value at the end of an envelope segment can be slightly higher than the given target value.
The control inputs are for:
1: start at or switch to that segment (1: first point, 2: second point, 3: third point, etc).
2: connecting to an controlrate object. This will cause the 'kline' to give output.
The first output gives the new envelope value, the second outputs gives, if an envelope-segment is ended, which segment of an envelope is ended. Because this signal is given one value before the new segment starts, you are able to make all kinds of loops with your envelope.
'aline' produces a line-segmented envelope at audiorate.
With the arguments: [x1 dur1 x2 dur2 x3 ...], 'aline' will go from x1 to x2 within dur1 seconds, then from x2 to x3 within dur2 seconds, etc. You can set the arguments by doubleclicking on this object. If the envelope is finished, zero is returned. 'aline' does not give a 100% accurate representation in time. Also, the final value at the end of an envelope segment can be slightly higher than the given target value.
To use this object on sampleprecision, use an 'audioControl' object right after the output.
The control inputs are for:
1: start at or switch to that segment (0 or 1: first point, 2: second point, 3: third point, etc).
'kexpon' produces a line-segmented envelope made out of exponential curves.
With the arguments: [x1 dur1 x2 dur2 x3 ...], 'kexpon' will go from x1 to x2 within dur1 seconds, then from x2 to x3 within dur2 seconds, etc. You can set the arguments by doubleclicking on this object. If the envelope is finished, zero is returned. 'kexpon' does not give a 100% accurate representation in time.
The control inputs are for:
1: start at or switch to that segment (0 or 1: first point, 2: second point, 3: third point, etc).
2: connecting to an controlrate object. This will cause the 'kexpon' to give output.
The first output gives the new envelope value, the second outputs gives, if an envelope-segment is ended, which segment of an envelope is ended. Because this signal is given one value before the new segment starts, you are able to make all kinds of loops with your envelope.
'aexpon' produces a line-segmented envelope made out of exponential curves, at audiorate.
With the arguments: [x1 dur1 x2 dur2 x3 ...], 'aexpon' will go from x1 to x2 within dur1 seconds, then from x2 to x3 within dur2 seconds, etc. You can set the arguments by doubleclicking on this object. If the envelope is finished, zero is returned. 'aexpon' does not give a 100% accurate representation in time.
To use this object on sampleprecision, use an 'audioControl' object right after the output.
The control inputs are for:
1: start at or switch to that segment (0 or 1: first point, 2: second point, 3: third point, etc).
'kphasor' produces a moving phase value, looping from 0 to 1 repeatedly.
The control inputs are for:
1: set the cps (cycles per second).
2: connecting to an controlrate object. This will cause the 'kphasor' to give output.
'aphasor' produces a moving phase value, looping from 0 to 1 repeatedly.
To use this object on sampleprecision, use an 'audioControl' object right after the output.
The control inputs are for:
1: set the cps (cycles per second, default: 1.0).
'tline' is an advanced table-based envelope generator/oscillator.
irand returns a random number from a linear distribution (white noise).
The control input is for:
1: the amplitude (default (*1): <-1,1>).
MPEG-4 SA: To use this object MPEG-4 Structured Audio compliant, you may only connect a Display object to it which 'fires' it's value at i-rate. If you want to use this object for other purposes than initialisation, use krand.
krand returns a random number from a linear distribution (white noise).
The control input is for:
1: the amplitude (default (*1): <-1,1>).
arand returns a random number from a linear distribution (white noise).
The first audio input is for setting the amplitude (default (*1): <-1,1>).
MPEG-4 SA: To use this noise at sampleprecision (between audioControl and controlAudio), use krand.
ilinrand returns a random number from a linearly-ramped distribution.
The control inputs are for:
1: the minimum value (default: -1)
2: the maximum value (default: 1)
3: get output.
MPEG-4 SA: To use this object MPEG-4 Structured Audio compliant, you may only connect a Display object to it which 'fires' it's value at i-rate. If you want to use this object for other purposes than initialisation, use klinrand.
klinrand returns a random number from a linearly-ramped distribution.
The control inputs are for:
1: the minimum value (default: -1)
2: the maximum value (default: 1)
3: get output.
alinrand returns a random number from a linearly-ramped distribution.
The audio inputs are for:
1: the minimum value
2: the maximum value.
MPEG-4 SA: To use this noise at sampleprecision (between audioControl and controlAudio), use klinrand.
iexprand returns a random number from an exponential distribution with mean p1.
The control input is for the mean value.
MPEG-4 SA: To use this object MPEG-4 Structured Audio compliant, you may only connect a Display object to it which 'fires' it's value at i-rate. If you want to use this object for other purposes than initialisation, use kexprand.
kexprand returns a random number from an exponential distribution with mean p1.
The control input is for the mean value.
aexprand returns a random number from an exponential distribution with mean p1.
The audio input is for the mean value.
If, at audio rate, the audio input value is lower than or equal to zero, then the output is zero.
MPEG-4 SA: To use this noise at sampleprecision (between audioControl and controlAudio), use kexprand.
kpoissonrand returns a random binary sequence of numbers (0 or 1) with a mean difference time.
The control input is for setting the mean time (in seconds), and for getting output. For proper usage, this input should be connected to a numberField (or a similar output), which should on it's turn be connected to a 'k-rate' object.
apoissonrand returns a random binary sequence of numbers (0 or 1) with a mean difference time.The input is for setting the mean time (in seconds), and for getting output.
If the input value is lower than zero, then the output is zero (if it is audio output) or no output is given (if it is control output).
MPEG-4 SA: To use this noise at sampleprecision (between audioControl and controlAudio), press PAGE_UP, and press PAGE_DWN to go back. Although apoissonrand and kpoissonrand look the same when they have controlrate in- and outputs, they aren't (because of the calculated time internally).
igaussrand returns a random number drawn from a Gaussian distribution.
The control inputs are for:
1: the mean value (default: 1)
2: the variance value (default: 1)
3: get output.
MPEG-4 SA: To use this object MPEG-4 Structured Audio compliant, you may only connect a Display object to it which 'fires' it's value at i-rate. If you want to use this object for other purposes than initialisation, use klinrand.
kgaussrand returns a random number drawn from a Gaussian distribution.
The control inputs are for:
1: the mean value (default: 1)
2: the variance value (default: 1)
3: get output.
agaussrand returns a random number drawn from a Gaussian distribution.
The audio inputs are for:
1: the mean value
2: the variance value.
If the second input is lower than or equal to zero, the output is zero.
MPEG-4 SA: To use this noise at sampleprecision (between audioControl and controlAudio), use kgaussrand.
'port' converts a step-valued signal into a portamento signal.
The time in this object is only valid when used in combination with 'k-rate'.
The control inputs are for:
1: set the input value and get output.
2: the half-transition time (default: 0) in seconds.
This is a -6db butterworth filter.
Select this object and press PAGE_UP or PAGE_DOWN to switch to or from audio-functionality or control-functionality.
If the cutoff frequency is too high (higher than half the samplerate), it is increased.
The control inputs are for:
1: set the cut-off frequency (default: 6kHz).
2: control-input, if using for filtering control signals (for example between audioControl/controlAudio).
This is a -6db butterworth filter.
Select this object and press PAGE_UP or PAGE_DOWN to switch to or from audio-functionality or control-functionality.
If the cutoff frequency is too high (higher than half the samplerate), it is increased.
The control inputs are for:
1: set the cut-off frequency (default: 6kHz).
2: control-input, if using for filtering control signals (for example between audioControl/controlAudio).
This is a -6db butterworth filter.
Select this object and press PAGE_UP or PAGE_DOWN to switch to or from audio-functionality or control-functionality.
If the cutoff frequency is too high (higher than half the samplerate), it is increased.
The control inputs are for:
1: set the cut-off frequency (default: 6kHz).
2: set the bandwith (default: 1.5kHz).
3: control-input, if using for filtering control signals (for example between audioControl/controlAudio).
This is a -6db butterworth filter.
Select this object and press PAGE_UP or PAGE_DOWN to switch to or from audio-functionality or control-functionality.
If the cutoff frequency is too high (higher than half the samplerate), it is increased.
The control inputs are for:
1: set the cut-off frequency (default: 6kHz).
2: set the bandwith (default: 1.5kHz).
3: control-input, if using for filtering control signals (for example between audioControl/controlAudio).
filt is a general purpose filter with various filtertypes.
'biquad' is a normative filter using the canonical second-order filter in a 'Transposed Direct Form II' structure.
The control inputs are for:
1: set b0
2: set b1
3: set b2
4: set a1
5: set a2.
'allpass' is an allpass filter.
The control inputs are for:
1: set the feedback delay time (default: 0.03, in seconds)
2: set the gain (default: 0.83).
MPEG-4 SA: to use this object MPEG-4 SA compliant, you may only connect constants to the control inputs. In CPS the gain is truncated between -1 and 1.
'allpassrev' is an allpass reverberation filter.
Although allpassrev is normally a part of a reverb, it is also very usefull as a fast and simple standalone reverb unit.
The control inputs are for:
1: set the feedback delay time (default: 0.03, in seconds)
2: set the gain (default: 0.83).
MPEG-4 SA: this object is not part of MPEG-4 SA.
'comb' is a comb filter.
The control inputs are for:
1: set the feedback delay time (default: 0.03, in seconds)
2: set the gain (default: 0.83).
MPEG-4 SA: to use this object MPEG-4 SA compliant, you may only connect constants to the control inputs. In CPS the gain is truncated between -1 and 1.
'comblpf' is a comb filter with a lowpass filter in it's feedback loop.
The control inputs are for:
1: set the delay time (default: 0.33, in seconds)
2: set the feedback gain (default: 0.2)
3: set the overall gain (default: 0.15).
MPEG-4 SA: this object is not part of MPEG-4 SA.
fir is a FIR (finite impulse response) filter.
Doubleblick on this object to enter the parameters.
iir is an IIR (infinite impulse response) filter.
Doubleblick on this object to enter the parameters.
firt is a FIR (finite impulse response) filter.
The control inputs are for:
1: a table
2: the 'order' of the fir (default: 0), or: many points from the table will be taken for the fir.
firtFast is a FIR (finite impulse response) filter implemented with fast convolution.
The control input is for the table.
Currently, this is not a zero-delay implementation, so a delay occurs which is as big as the given table.
iirt is a IIR (infinite impulse response) filter.
The control inputs are for:
1: a table
2: the 'order' of the fir (default: 0), or: how many points from the table will be taken for the fir.
The data need for the inverse fourier analyse is read out, and written in two tables; you must only connect an audio wire to 'ifft' to activate it. One table is for the real numbers and the other one for the imaginary numbers. Both must be provided.
The tables must have the size of the fourier transform. The size of the fourier is a parameter of the fourier objects. For example, with a size of 1024 samples, then both tables must have a size of 1024.
Because the resulting data is mirrored in the middle in both tables (imaginary: mirror*-1), you can also put the result in two tables which have only half size. Then any modification on the tables also have to be done half as frequent, which can save a lot of CPU time.That is why CPS also supports putting the tables in half sizes. The length must then be half the fourier transform size + 1 (for the middle), for example 1024/2 + 1 = 513. If CPS detects that one table is less than the fourier transform size, then only half the tables are used (this half-table optimalisation is not MPEG-4 SA compatible).
Apollo is the result of a small research into pitch detection by the author of CPS. Apollo implements the Unitary Model by Meddis, roughly using autocorrelation as the basic detection mechanism.
Note that Apollo (inside CPS) can't detect pitches below 86Hertz because CPS works on a buffersize of 512.
Check out the mouse-overs and the examples for more information.
fft performs a windowed and overlapped FFT.
ifft performs a windowed and overlapped inverse FFT.
The control inputs are for:
1: the table for storing the 'real' number
2: the table for storing the 'imaginary' numbers
3: how many samples must have come in before doing the FFT (default: 512)
4: how many samples the window should shift after an analysis (default: 512)
5: the size of the FFT/IFFT itsself (default: 512).
rms calculates the power of a signal.
rms takes audio and only returns at controlrate.
The control input is for:
1: set the length of the calculation in seconds (default: buffersize).
gain amplifies a signal so that the power is equal to the given power.
The control inputs are for:
1: the preferred gain (default: 0.707)
2: the measurement length (default: buffersize).
'balance' makes the power of a signal equal to the power of another signal.
The first input is the signal to be modified, the second input is the reference signal.
The control input is for setting the length (default: buffersize) in seconds of the measurement.
compressor is an audio compressor/limiter/expander.
The first audio input is used for compression. The second audio input is used as the reference signal.
The control inputs are for:
1: set the treshold (default: 0, in dB)
2: set the low knee value (default: 30, in dB)
3: set the high knee value (default: 31, in dB)
4: set the ratio (default: 4)
5: set the attack (default: 2, in seconds)
6: set the release (default: 2, in seconds)
7: set the look-ahead time (default: 0.3, in seconds).
'delay' is an audio delayline.
Press PAGE_UP or PAGE_DOWN to switch from/to audio/control functionality.
The controlrate inputs are for:
1: set the delay time in seconds. As prescribed by the MPEG-4 Structured Audio standard, the precision is in samples.
2: (if used) the input for the controlsignal.
'delay1' is an audio delay of one sample.
Press PAGE_UP or PAGE_DOWN to switch from/to audio or control functionality.
'delayEvent' is a delay for control signals.
You can not use this object to delay audio, also not when processing audio on sampleprecision (between audioControl and controlAudio).
'fracdelay' is an advanced audio delay. You can use it as a fractional, variable-length and as a multitap delay line.
fracdelay is actually only for modifying audio signals, so use the audioControl/controlAudio objects for normal usage. Normally, you have to 'shift' the delayline (input 7) once after each given input.
If a given position is greater than the delay size, it is truncated to the delay size.
The control inputs are for:
1: set the size in seconds. Always set this parameter, otherwise fracdelay won't work.
2: tap the delay at this position, and give this value at the first output.
3: set the position where you want to insert something with input 4 (default: 0).
4: set the value at the position given with input 3.
5: set the position where you want to add a value with input 6 (default: 0).
6: add to the value at the position given with input 5.
7: shift the output one sample further. This also causes to give the thrown-away sample at the second output.
delayOK is a multi-tap fractional audio delayline with a variable delaytime.
cpsChat is a simple chatbox and a powerfull low-level exchange facility for the internet or any TCP network.
If you doubleclick on cpsChat, a chatbox appears. Here you can login and chat with other people online. Several standard chat facilities are available on the commandline (type '/help' in the chatbox for more information).
Select this object and press PAGE_UP/PAGE_DOWN to get more in- and outputs. All users receive anything that you put into the inputs of cpsChat. The information that goes in a certain input, comes out at the same output number. Because of the seperate in- and outputs, you can manage up to 9 independent information streams without building a patch for seperating streams.
cpsChat works with 'Direct' connections; everybody has a direct (TCP) connection with everybody. The central server is only used for logging in and logging out, not for the communication itsself. Because there are a lot of connections, there is only an advantage in speed of the direct connections when there is a low number of users in a channel.
You can also use cpsChat to connect to one (or more if you really want it) other computer without finding each other through a central server. This is called 'Manually Connect'. You then have to type the IP address of the other one manually to connect to each other. This can be usefull if you are not on internet but on an intranet. You can enable this option at the 'Select Host' menu.
Warning: if you are behind a firewall, cpsChat doesn't get through, except when other people are connecting to you (the reverse doesn't work because of the firewall security).
cpsChat does not function in standAlone mode. OSCparam does function in standAlone mode, but can only be used between two computers.
Here is the help of the cpsChat object:
** These commands are available at your commandline: **
/JOIN [channel] Join this channel (or none gives a dialog).
/QUIT Disconnect from the channel. Same as BYE, EXIT.
/NICK [nickname] Change your nickname.
/LIST List all channels of the current host.
/WHOIS [nick] Give some information about [nick].
/IGNORE [nick] Start or stop ignoring [nick].
/AWAY {reason} Notify that you're not paying attention.
/AWAY You're back again.
/CLS Clear the screen...
/HELP Guess what...
.... and instead of channel operators:
/ERONGI [nick]. The reversed of ignore. Don't send your output to [nick]. However, [nick] gets a notification.
/MAN [IPadres]. Make connection with [IPadres]. Only valid when Manually Connecting (See "Select Host" at the "Session" menu).
The IP address is shown if known.
HTTParam sends and receives parameters from a webserver. All the changed input parameters are send during the (new) HTTP transaction, and all the received parameters are thrown out as well.
'color2ledpar' creates R-, G- and B- values out of intensity- and color-values. These can be used to easily control the colors of a (Showtec) LED-par. You can connect the 'intensity' to a chaser, and use the color to set the color of the LED-par.
If you set this object as 'fullrange', then an intensity of 127 (the middle) is a plain color, anything above is a more white variant of that color, which makes this object create all possible variations. By default it is off, so that you can use it to fade in and out colors normally.
The inputs are for:\n1. the color (0-255)\n2. the intensity (0-255)\n3. fullrange or not.
The outputs are for 1. the red component (0-255), 2. the green component (0-255), 3. the blue component (0-255).
'odmxusb' controls the Enttec Open DMX USB Interface to control lightening with CPS.
The input eats midiMessage signals. The first byte is the channel, the third byte is the value.
Using subpatches and their in- and outputs does not make your patch slower.
With a SubPatch you can put parts of your patch in just one object.
You can use subpatches for increasing the readability of your patch, seperating of concern, simplifying teamwork, or for increasing the re-useability of your patch.
To rename the subpatch, hold the shift key and doubleclick on this object.
APatchOut, APatchIn, KPatchIn, KPatchOut
With a APatchOut your (sub-)patch gets one or more audio outputs.
With a APatchIn your (sub-)patch gets one or more audio inputs.
With a KPatchIn your (sub-)patch gets one or more control inputs.
With a KPatchOut your (sub-)patch gets one or more control outputs.
Use PAGE_UP or PAGE_DOWN to add or remove more in/outputs. If you remove an output, it is always the last one (counting starts in the upper or left corner).
If you make patch-in- and outputs in a patch, but not inside a subpatch, then they are visable when you insert the total patch into another patch.