A BusPlug is represents a listener on a private Bus that makes it easy to play back to multiple channels. It is mainly in use as a superclass of NodeProxy, but it can be used for general channel routings as well. Most methods are documented in the NodeProxy helpfile.
Create a new (neutral) instance on the given server.
Create an instance with a given Bus.
Create a new audio rate instance on the given server.
Create a new control rate instance on the given server.
Default number of channels when initializing in audio rate and no specific number is given (default: 2).
Default number of channels when initializing in control rate and no specific number is given (default: 1).
default reshaping behaviour for BusPlug and its sublass NodeProxy. See: -reshaping
Return the server that the BusPlug runs on.
Free the bus, end the monitor.
copies the hidden internal state to make the new BusPlug independent of the old, running on a new Bus. By design, the Monitor is copied, but is not running (use play to start it in the same configuration). If needed, you can also copy the Monitor only (see: NodeProxy: -copy).
Copy the internal settings of one proxy into another. Old state is cleared, the bus is freed.
proxy |
The object whose internal state is being copied. |
Determines how to behave when -initBus is called. Current options:
nil
Once initialized, keep the same bus - this is the default\static
Same as nil, but allows you to override the default in instances\elastic
On a change, shrink and grow according to need, replace bus. Monitoring is adjusted.\expanding
On a change, only grow according to need, replace bus. Monitoring is adjusted.Return a link to numChannels of my output. If uninitialized, creates a matching bus. Normally, ar defaults to stereo, kr to mono. This can be set in the classvars: *defaultNumAudio, *defaultNumControl
For consistency, it always returns an array of signals when no numChannels are given. To make it a single ugen output, use numChannels = 1
. See also: InBus.
numChannels |
Number of channels returned. If the receiver is neutral or reshaping is elastic, initialize it to this number. If this is more than the available channels, use the clip behaviour (below). If set to |
offset |
Channel offset when reading a bus that has more channels than numChannels, cross fading between adjacent channels. |
clip |
If set to 'wrap', exceeding channels will wrap around, if set to 'clip', repeat the last one. |
Returns the appropriate output to read from the BusPlug bus (an InBus UGen)
Returns the map argument for the bus, if the bus has multiple channels, it will return an array of map args.
Returns the map argument for the bus, just like -embedInStream
Returns true if server is running and bus not nil. NodeProxy this returns true if the group is playing.
Returns true if monitor is playing
Play from a bus index with a number of channels to another index with a number of channels, within a Group (i.e. a target group or server).
out |
bus index |
numChannels |
number of channels to output. If BusPlug is neutral or reshaping is elastic, initialize it to this number. If this is more than the available channels, wrap around. If this is not given, and reshaping is elastic, it will automatically expand. |
group | |
multi |
keep old playback links and add new one |
vol |
overall volume at which to monitor |
fadeTime |
fade in / fade out time |
addAction |
Where in the node tree to play the monitor synths |
Play back on non-contiguous channels. See: Monitor and playN
outs |
array of destination channels (or single value) |
amps |
array of amplitudes for each channel (or single value) |
ins |
array of source channel offsets within the bus (or single value) |
vol |
Overall volume (multiplied by amps) |
fadeTime |
array of fadeTimes (or single value) for fade in / fade out |
group | |
addAction |
Where in the node tree to play the monitor synths |
stop to play out public channels.
fadeTime |
decay time for this action |
reset |
if set to true, reset all monitor state. Otherwise, the previous play arguments are kept. |
returns the current monitor (see Monitor)
These methods are a little numerous, because they are important for implementing NodeProxy behavior. Mostly the methods -bus and -initBus will be sufficient in normal use.
Returns true if no bus has been initialized so far.
Set or get the bus. If BusPlug monitor is playing, restart the monitor to adequately play back the new bus.
set the bus object by passing a Bus.
make a new bus for the BusPlug with a given rate and number of channels.
Make a new bus only if necessary. This depends on the current bus and the -reshaping mode.
Boolean (true if successful).