EffectConstruct
Create an Effect instrument
Syntax
Usage
Effect instruments in cslc are Csound instruments with a few special properties to ensure they work in the cslc patch system. EffectConstruct is a UDO that helps generate the instrument with the required boilerplate code embedded. The coder/performer then just has to understand how to access the inputs and outputs, and is free to write the audio manipulation code in between.
Inputs
inputs are accessed from an array named ains.
A mono input will only use the first index in ains[0],
Stereo input will have two (ains[0, ains[1]),
Quad will use four ains[0...3].
The generated Effect Instruments are 'always on' instruments (with negative p3).
EffectConstruct instruments can be edited and re-evaluated 'on-the-fly'. The running instance is terminated and replaced with the updated version. An ixfade parameter helps keep the audio transition smooth.
Arguments
Sname -- A name given to the instrument (must be unique). The patch UDO's use this name to route audio.
Seffectbody -- Your Csound code to process the audio.
iincount -- The number of audio inputs of the effect. This sets the size of the ains[] array.
ioutcount -- The number of audio outputs This sets the size of the aouts[] array.
ixfade (optional, default=1) -- Crossfade time in seconds for the transition to a new instance.
Example
See the examples for patchsig, patchchain, and patchspread.