Appendix A: Core Objects

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.






Object type: Audio

audioIn

audioIn represents an audio input hardware device or host signal reference.

Doubleclick on this object (if not being used as external/VST plugin) to select which hardware device driver this object represents (DirectSound = 'DS ...', ASIO = 'ASIO ...'). In the menu you can also change the number of buffers (0=default; less buffers means less latency but more risk for drop-outs/clicks).

Select this object and press PAGE_UP/PAGE_DOWN for more signal ports. These are only in use when ASIO drivers are chosen, or when CPS acts as an external plugin (VST).

All options (hardware device driver, number of buffers, number of signal ports) are all active only after a restart of the audio.

The hardware I/O buffersize (which is independent from the CPS global buffersize that you can change in the 'Options' menu) is always 512, except when ASIO drivers are running, then the global buffersize is taken as an 'advise' to the hardware, which on it's turn decides weither or not it is being used.

standAlone usage: you can get the name of the hardware devices by sending the command 'getname x' where x is a 0 or higher (no output means no device). Other commands to set parameters are shown when you save a patch as standAlone code. Use a negative number of buffers to add to the default number of buffers (f.e. -2 means the default minimum plus two).

ASIO Technology by Steinberg (http://www.steinberg.de).
The ASIO implementation uses parts of the the PortAudio Portable Real-Time Audio Library, Copyright (c) 1999-2000 Ross Bencina and Phil Burk.

audioOut

audioOut represents an audio output hardware device or host signal reference.

Doubleclick on this object (if not being used as external/VST plugin) to select which hardware device driver this object represents (DirectSound = 'DS ...', ASIO = 'ASIO ...'). In the menu you can also change the number of buffers (0=default; less buffers means less latency but more risk for drop-outs/clicks).

Select this object and press PAGE_UP/PAGE_DOWN for more signal ports. These are only in use when ASIO drivers are chosen, or when CPS acts as an external plugin (VST).

All options (hardware device driver, number of buffers, number of signal ports) are all active only after a restart of the audio.

The hardware I/O buffersize (which is independent from the CPS global buffersize that you can change in the 'Options' menu) is always 512, except when ASIO drivers are running, then the global buffersize is taken as an 'advise' to the hardware, which on it's turn decides weither or not it is being used.

standAlone usage: you can get the name of the hardware devices by sending the command 'getname x' where x is a 0 or higher (no output means no device). Other commands to set parameters are shown when you save a patch as standAlone code. Use a negative number of buffers to add to the default number of buffers (f.e. -2 means the default minimum plus two) (not on MacOSX).

ASIO Technology by Steinberg (http://www.steinberg.de).
The ASIO implementation uses parts of the the PortAudio Portable Real-Time Audio Library, Copyright (c) 1999-2000 Ross Bencina and Phil Burk.

audioToDisk

'audioToDisk' writes audio to a harddisk in a platform dependent audio format.

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

audioFromDisk

'audioFromDisk' reads audio files from harddisk. Supported formats include .wav, .aiff, .mp3, .ogg, .m3u, and others.

If a file is mono, both outputs give the same output.

Select this object and press PAGE_UP/PAGE_DOWN to add/remove k-rate outputs for runtime information (see mouse-overs for details).

The control inputs are for:
1: play this file-number (set the files by doubleclicking on audioFromDisk). The first file is '1', etc, '0' is stopping.
2: set what happens when a file has ended. 0=nothing (default), 1=loop the same file, 2=play next
3: adjust the playback speed (0...200)
4: go to another part of the file (0...100 %)
5: go to another part of the file (seconds)

Files are being loaded at runtime, so there is no check weither the filenames are correct when you enter them.

StandAlone usage: 'reset' cleans the internal list, 'quant' the number of returned samples (0: end of file), 'setnext 3' to play 3 afterwards, and 'getplaying' to get the filenumber playing. Conversate an URL (including 'http://'!!) to start caching and playing an URL.

If you need to do more than just lineair playing (f.e. backwards looping), then you can put the sample in a 'table' object (using the 'sample' generator) and play it back with an 'Oscillator'.

You can read tags in the standAlone mode by conversating for example '_getTag title c:\\testfile.ogg'. Supported are 'title', 'artist', 'album', 'tracknumber', 'year' and others are not standarised. CPS also adds 'METALENGTH'.

Bonneville says great thanks to the developers of the following great projects which help in decoding the audio:

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).

clipClap

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.

 

 

Object type: MIDI

midiIn

midiIn represents a MIDI input hardware device.

Midi objects often use a midiMessage, which is a representation of one, two or three MIDI bytes. midiIn returns such an midiMessage, which can be extracted with the 'midiMessage' object.

If you doubleclick on this object, you can select which hardware device this object represents. In CPS, a hardware device can only be represented once by an object.

The control inputs are for:
1: select which device this object represents at runtime
2: start (not zero) or stop (zero) this device. Restarting (not zero) means resetting the timestamp. You have to start the input before it is active.

The control outputs are for:
1: midiMessage (see the 'midiMessage' help)
2: the timestamp (in seconds).

standAlone usage: you can get the name of the hardware devices by sending the command 'getname x' where x is a 0 or higher (no output means no device). You can directly get the midi messages with the command 'get' (for in Director/Shockwave/Java/C++), which returns a string in hexadecimal form (#F0E5E1).

Note that active sensing and midi clock are both filtered out: active sensing is useless because not all devices send it, and midi clock is useless in CPS because there are no bars in CPS, everything is realtime.

The helptext also shows a list of currently installed devices.

midiOut

midiOut represents a MIDI output hardware device.

Midi objects often use a midiMessage, which is a representation of one, two or three MIDI bytes. midiOut receives such an midiMessage, which can be created with the 'midiMessage' object.

If you doubleclick on this object, you can select which hardware device this object represents. In CPS, a hardware device can only be represented once by an object.

The control inputs are for:
1: select which device this object represents at runtime
2: reset this device; unlock the device being 'used' by CPS
3: a 'midiMessage' signal (more information in the midiMessage helptext). The selected hardware device is started automaticly if necessary.

standAlone usage: you can get the name of the hardware devices by sending the command 'getname x' where x is a 0 or higher (no output means no device). You can directly conversate a string in hexadecimal form (#F0E1E1) to playback midiMessages without making a patch.

The helptext also shows a list of currently installed devices.

midiFromDisk

midiFromDisk reads midiMessages from a standard MIDI file.

If you doubleclick on this object you can enter the filenames there. See the 'midiMessage' object for more help about MIDI messages.

The control inputs are for:
1: select which file from the list to use (0=stop)
2: select which track to read and start reading (0=first track, etc.). Use format 0 midi files to have everything in the first track.

midiToDisk

midiToDisk writes midiMessages to a standard MIDI file.

If you doubleclick on this object you can enter the filename(s) there. See the 'midiMessage' object for more help about MIDI messages.

The control inputs are for:
1: start (filename number: 1,2...) or stop (0) the writing
2: the input place for the midiMessages.

midiMessage

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

keyboard is a simple graphic keyboard.

Doubleclick on the object to see the keyboard. You can also play with your computerkeyboard keys.

The output is a standard midiMessage (see the help of the midiMessage for more information).

voiceAllocator

voiceAllocator extracts voice allocating information from a raw midiMessage stream.

voiceAllocator actually shows the biggest principle difference between CPS and MPEG-4 Structured Audio: with MPEG-4 Structured Audio, you are allocating new instruments all the time, but in CPS you are running one patch all the time, without new instruments being instantiated. With voiceAllocator, you can still let something played back with more voices, but you have to make multiple instances of the 'instrument' subpatch yourself.
voiceAllocator steals voices automaticly if necessary.

The control inputs are for:
1: raw midiMessage
2: set the maximum of voices to be allocated (default: 9, max: 32).

The control outputs are for:
1: the 'index' of the voice
2: the MIDI pitch if it was a note On
3: the MIDI volume if it was a note On
4: zero if it was a note Off.

 

Object type: Meta

presetManager

With the presetManager you can store settings and recall them later.

If you doubleclick on the presetManager, a graphical interface appears where you can create presets.

In a preset, all Display objects which have the 'i-rate' setting vinked on (default), send out their value. If this value is vinked on, it would also be sended out if the patch was being loaded.

If you save settings for a randomly selected object, it currently only saves the first parameter (f.e. a 'kline' parameter line) only (so saving parameter for f.e. serialPort won't work completely).

The first controlrate input is for setting a prior saved preset, the second for creating a preset at runtime without the graphical interface (this is not for in standAlone mode though) using the last settings in the graphical interface. The number correspondents with the preset which is listed in the dialog window.

scoreToDisk

scoreToDisk is a simple score generator for .sasl, the MPEG-4 Structured Audio score language.

scoreToDisk acts like a virtual instantiated MPEG-4 Structured Audio instrument. Everything that enters the inputs is recorded to a score file.

If you doubleclick on this object, you can set the name of your output file, and the name of the instrument inputs, which act as the control inputs of this object. If you select this object and press PAGE_UP/PAGE_DOWN you can get more/less control inputs. The last control input always acts as the on (not zero) & off (zero) recording button, to which you probably want to connect a checkBox.

application

With 'application' you can test your application in which you use CPS as the audio engine, while keeping the graphical interface of CPS available to edit your patch.

Doubleclick on the object to set the executable file name. In the CPS sdk you can find the code that you have to paste into your application.

The first control input is for starting or stopping your application (typically for a checkBox). With PAGE UP/DOWN you can add more outputs for your data.

autoStart

If the object 'autoStart' is present in the main window, then the audio will start automaticly after the patch is loaded.

itime

itime returns the elapsed time of the specific patch (or: instrument) after it's creation.

The control inputs are for:
1: reset the itime to zero (extra feature)
2: get the itime value.

serialPort

With 'serialPort' you have direct access to the serial ports of the computer.

If you doubleclick on this object, a Dialog appears in which you can change some settings. Vink 'CPS Link' on if you only use this object to link two computers to each other. If it is not vinked on, then only 8-bit (by default) value's are sended and received.
The received data comes out automaticly, you do not have to trigger this object to ask weither anything has come in.

The control inputs are for:
1: start (not zero) or stop (zero) this device (preferably with a checkBox object),
2: input that is sended to the serial port.

This object only works on the Windows platform.

float

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.

gate

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!

order

Use 'order' to force a certain order in the processing.

Select this object and press PAGE_UP or PAGE_DOWN to switch from/to audio/control functionality and to get more or less outputs. Normally you don't need an 'order', because for all inputs it is exactly defined what happens when something is put into it. However, if you want to 'get' several values in a certain sequence, use 'order'.

'order' can be usefull at audio rate if a certain sequence is needed (for example with fourier analyse), or when more than 5 outputs are needed fromout the same audio output.

'order' does not work with tables.

The control flow goes top-down (from above to below), and uses the upper and lower in&outputs of the objects. MIDI is an example of a control flow. A control signal will go into the left input first if you connect several wires to the same object fromout one output.
The audio flow goes from left to right, and uses the left and right in&outputs of the objects.

switch

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

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

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

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

getinterqual returns the interpolation quality.

The interpolation is used when looking up values in delays and tables.

getbuffersize

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

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

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.

 

 

Object Type: Display

numberField

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.

Hold the shift-key (=the 'Display'-key) and doubleclick on this object to edit the default dragging difference (the 'dragrange'), the standAlone name, and maximum and minimum numbers (these are in use when dragging in the numberField).

Select this object and press PAGE_UP or PAGE_DOWN to increase or decrease it's size. If you were typing in the numberField, you have to hold the shiftkey first.

As with all Display objects except the 'constant', letting a signal go through it does not change the value. Hold the shift key to drag a single Display object normally.

fader

A fader gives output when you drag or click on it.

This object gives an absolute and integral output by default, ranging from 0 to the 'dragrange' (default 127). You can set the 'dragrange' and 'multiply' and 'add' parameters, as well as it's 'standAlone' name, after doubleclicking on it while holding the shift-key (=the Display-key).

Select this object and press PAGE_UP or PAGE_DOWN to increase or decrease it's size.

As with all Display objects except the 'constant', letting a signal go through it does not change the value. Hold the shift key to drag a single Display object normally.

horizontalFader

A horizontalFader gives output when you drag or click on it.

This object gives an absolute and integral output by default, ranging from 0 to the 'dragrange' (default 127). You can set the 'dragrange' and 'multiply' and 'add' parameters, as well as it's 'standAlone' name, after doubleclicking on it while holding the shift-key (=the Display-key).

Select this object and press PAGE_UP or PAGE_DOWN to increase or decrease it's size.

As with all Display objects except the 'constant', letting a signal go through it does not change the value. Hold the shift key to drag a single Display object normally.

button

A button gives a '1' as output when you click on it.

Select the button and press PAGE_UP or PAGE_DOWN to increase or decrease the size of the button.

As with all Display objects except the 'constant', letting a signal go through it does not change the value. Hold the shift key to drag a single Display object normally.

checkBox

A checkBox gives a '1' or a '0' as you vink the box 'on' or 'off'.

As with all Display objects except the 'constant', letting a signal go through it does not change the value. Hold the shift key to drag a single Display object normally.

constant

A constant is the same a numberField, except that the value that goes through it is changed into the value of the constant. With all other Display objects, the value that goes through the object does not get changed.

comment

You can save a text in 'comment' to clearify a patch. Doubleclick on the object to enter or change the text.

 

 

Object Type: Conversion

 

audioControl

audioControl converts an audio signal to a control signal.

You can use audioControl and controlAudio if you want to make a patch that does something on sampleprecision, for example for a feedback loop of one sample in a Comb or AllPass filter. The normal audio signal (which is a buffer) is converted to control signals (which are single values). Every sample of the audio buffer comes out. If you use 'k-rate', not every sample of the incoming audio buffer comes out, but only one value, which can be usefull for putting signals in the timing of the audio.

Since this may be very CPU intensive, do not use the audioControl/controlAudio combination too much in one patch. It is advised to make a C++ plugin of your patch if you use it regulary.

You can connect GUI-objects to audioControl, but since it goes at audio rate, you can not see each sample value seperately.

If a realtime error occurs in the audio path at sampleprecision, then silence is inserted and for each new buffer the audiopath will be tried again.

controlAudio

controlAudio converts an audioControl control-flow back to an audio signal.

You can not use controlAudio apart from audioControl, because it is impossible to provide enough data for controlAudio with other control objects. If you want to start with nothing and want to work on sampleprecision, use 'upsamp' connected to 'audioControl' to generate an empty audio stream.

You can use audioControl and controlAudio if you want to make a patch that does something on sampleprecision, for example for a feedback loop of one sample in a Comb or AllPass filter. The normal audio signal (which is a buffer) is converted to control signals (which are single values). Every sample of the audio buffer comes out. If you use 'k-rate', not every sample of the incoming audio buffer comes out, but only one value, which can be usefull for putting signals in the timing of the audio.

Since this may be very CPU intensive, do not use the audioControl/controlAudio combination too much in one patch. It is advised to make a C++ plugin of your patch if you use it regulary.

You can connect GUI-objects to audioControl, but since it goes at audio rate, you can not see each sample value seperately.

If a realtime error occurs in the audio path at sampleprecision, then silence is inserted and for each new buffer the audiopath will be tried again.

k-rate

'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

decimate returns an audio value at control rate, each time an audio buffer is processed.

 

upsamp

upsamp translates a control value into a continuous audio value.

Besides using upsamp as a normal control- to audio converter, you can use it as a trigger for the 'k-rate' object because upsamp is an audio oscillator internally.

The second argument can be filled with a table. If this table is a straight line on the number one like 'lineseg -1 0 1 99 1' (size=100), then upsamp will fade with a lineair line with the size of the table (in samples). You can also give upsamp a number in the second input, then it takes that long number to make a lineair fade.

The control inputs are for:
1: the control value
2: the optional table used as window, or the slewtime (in seconds).

samphold

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

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.

 

 

Object Type: Oscillator

 

oscil

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

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

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

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

'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

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

'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

'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

mouseMoved returns the coordinates of the mouse when the mouse has moved.

This object does not function in standAlone mode.

mousePressed

mousePressed notifies when the a mouse button is pressed.

This object does not function in standAlone mode.

keyPressed

keyPressed returns the pressed key when a key is pressed.

This object does not function in standAlone mode.

keyReleased

keyReleased returns the released key when a key is released.

This object does not function in standAlone mode.

 

Object Type: Operators

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).

 

Object type: Math

 

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.

 

Object Type: Scaling

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.

 

Object Type: Table

 

table

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

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

ftloop returns the loop start point of a table.

The control inputs are for:

1: the table

2: get the output.

 

ftloopend

ftloopend returns the loop end point of a table.

The control inputs are for:

1: the table

2: get the output.

ftsr

ftsr returns the sampling rate of a table.

The control inputs are for:

1: the table

2: get the output.

 

ftbasecps

ftbasecps returns the base frequency of a table (in Hertz).

The control inputs are for:

1: the table

2: get the output.

 

ftsetloop

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

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

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

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

tableread reads a value from a table at a given position.

The position does not have to be an integer but can also be a floating point number; as with all opcodes that have a table as argument, tableread interpolates between values if necessary.

The control inputs are for:
1: the table
others: set the index at which the readout should be done and get output.

Press PAGE_UP/PAGE_DOWN to switch from/to audio/control functionality. If you press PAGE_DOWN more than once, it becomes a multi-reader.

tablewrite

tablewrite sets a value in a table.

The input value is also returned at the output. Notice that you must use 'controlAudio' in order to write to a table with tablewrite at audiorate.

The control inputs are for:
1: the table
2,4,6,8: the index position.
3,5,7,9: the new value on the given position and passing this argument to the output.

Press PAGE_UP/PAGE_DOWN to switch from/to audio/control functionality, and to add more controlrate inputs&outputs.

tabledit

With 'tabledit' you can change table arguments at runtime.

Note that with tabledit you do not directly change the table value's, but only the argument line that was used to create the table initially. Use 'tablewrite' to change value's of the table directly.
Use a table and a presetManager both in the same (sub)patch to switch between several tables at runtime.

Select the object and press PAGE_UP/PAGE_DOWN for more/less inputs.

If you need to change arguments immediately (for example envelope values), press PAGE_UP first, and the values will be directly put into the table.

If you need to change several arguments which depend on each other (f.e. table indexes), press PAGE_DOWN first, and the last input will be the 'engage' button.

The control inputs are for:
1: a table
2,4,6,8: which argument to change (0=first argument)
3,5,7,9: the new value
last input (if in 'engaging' mode): put all arguments into the table.

tableToDisk

tableToDisk writes a table to disk.

To set the name of the file, doubleclick on the object.

The control inputs are for:
1: the table.
2: any input triggers saving the file.
3: select the type: 0=16-bit wav, 1=XML, 2=CSV

 

Object Type: Envelope

 

kline

'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

'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

'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

'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

'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

'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

'tline' is an advanced table-based envelope generator/oscillator.

'tline' uses a table as the source for the envelope, so that you can use any shape. During sustain, it oscillates between the sustain and the release points (if this is a straight line, then the oscillation is not audible).
When the release gate-trigger is given, it follows the release shape, with as starting point the last read-out value (otherwise a click is heared by switching from the last sample to the value of the first release point) so that the release time is followed anyway. So if the sustain stage is a straight line and we are in sustain time, then after a release gate it plays back exactly what's in the table. Besides this 'release level scaling', tline also doesn't follow the table exactly when the envelope is playing and a new trigger is given (only for audio output): then tline goes to the beginning with a fade in/out of 64 samples to avoid clicks.
As afterlevel tline uses the last point in the table.
Press PAGE_UP/PAGE_DOWN to switch from/to audio/control output.

The control inputs are for setting:
1: set the table
2: gate & level scaling: 0=go to the release state, any other input: start reading out the table, and use the value as overall multiplier (level scaling).
3: set the sustain table index, the place where tline jumps back to when it has reached the release table index. You can also set the table loop point instead (ftsetloop).
4: set the release table index, the place where tline goes to when a zero is put into the gate, and which is used as loop end point during the sustain. You can also set the table loop end point instead (ftsetend).
5: set the read frequency (or: rate scaling), set how many times the table is read per second (default: 1, 1000 points per second [milliseconds]). You can also set the table base frequency instead (ftsetbase).
6: 'k-rate' input (if control output is used).

 

Object Type: Noise

 

irand

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

krand returns a random number from a linear distribution (white noise).

The control input is for:

1: the amplitude (default (*1): <-1,1>).

 

arand

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

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

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

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

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

kexprand returns a random number from an exponential distribution with mean p1.

The control input is for the mean value.

 

aexprand

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

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.

 

apoinssonrand

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

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

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

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.

 

 

Object Type: Filter

 

port

'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.

 

hipass

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).

 

lopass

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).

 

 

bandpass

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).

 

bandstop

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

filt is a general purpose filter with various filtertypes.

The control inputs are for:
1: the center/corner/midpoint frequency (0...22000)
2: the Q (and bandwidth) (typically 0...128)
3: the type (default 0; 0=lowpass, 1=highpass, 2=bandpass, 3=bandstop, 4=highShelve, 5=lowShelve,
6=peakEQ
4: for shelve/peakEQ: the gain (typically -20...20)
5: for shelve/peakEQ: the steepness (0...50. default: 5)


biquad

'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

'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

'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

'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

'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

fir is a FIR (finite impulse response) filter.

Doubleblick on this object to enter the parameters.

 

iir

iir is an IIR (infinite impulse response) filter.

Doubleblick on this object to enter the parameters.

 

firt

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

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

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.

 

Object Type: Spectral

 

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

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, ifft

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).

 

 

 

Object Type: Amplifier

 

rms

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

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

'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

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).

 

 

Object Type: Delay

 

delay

 

'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

'delay1' is an audio delay of one sample.

Press PAGE_UP or PAGE_DOWN to switch from/to audio or control functionality.

 

delayEvent

'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

'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

delayOK is a multi-tap fractional audio delayline with a variable delaytime.

Press PAGE_UP/PAGE_DOWN to switch from/to sampleprecision functionality, and for more/less delaytime-inputs&outputs.

Doubleclick on the object to set the maximum delaytime.

Notice that the (control or audio) input for the delay time does not interpolate to a new time, but switches to that time immediately, so you have to gradually go to it manually (f.e. with upsamp or port or oscil) to prevent clicks.

The control/audio inputs are for:
1: audio input
others (n): set the delay time (seconds) for output n-1

 

Object Type: Network

 

cpsChat

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

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.

Use the last input to start the communication. The communication is one-way (in contrast to the OSCparam object), the webserver cannot contact CPS (you might use OSC-php for that though).

Press PAGE_UP or PAGE_DOWN to get more inputs/outputs.

mailCPS

With mailCPS you can send an e-mail to the helpdesk to CPS. Doubleclick on this object to send your message.

OSCparam

OSCparam sends and receives parameters on a network through the OpenSoundControl protocol with TCP or UDP.

Simply press 'Go' in the graphical interface (doubleclick on OSCparam). Press PAGE_UP or PAGE_DOWN to get more inputs/outputs.

OSC messages for CPS should be incapsulated in a bundle and must be formatted like '\\cps\\param iport fval' (port=0..9), see http://cnmat.cnmat.berkeley.edu/OSC/ for more info.

This object looks like a pretty pre-patched network object. The opposite is true! Use this object in standAlone mode for any TCP/UDP client/server connection. Simply send '_go' to start the transmission or '_stop' to stop it. Conversate strings to send (which do not begin with '_'; '_sets x' sets the sendsize), and conversate '_get' to receive data (_gets returns the size). Save as standAlone code for the other commands. The TCP server quits being a server when it has one valid connection, then it keeps being that connection itsself and does not wait anymore to accept new connections. The UDP server will try to receive things from the last client (if something has been received).

OSCparam does automatic pulling, disable this with '_noautopull' before you use OSCparam as a networker.



Object Type: Light

 

odmxusb

'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).

color2ledpar

'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.



Object Type: Patch

 

Using subpatches and their in- and outputs does not make your patch slower.

 

SubPatch

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.