As I had to fix something that used InBus today. The help page of that was… unhelpful:
InBus: Return a range of channels from a bus, irrespective of node order
Node order, huh?
InBus provides a simple interface to the signal on a bus, crossfading between adjacent values.
I guess it means between adjacent busses. But where is the xfade param in the interface?
InBus.ar(bus, numChannels, offset: 0, clip)
InBus.kr(bus, numChannels, offset: 0, clip)
Return a new instance with the respective rate. If the bus rate doesn’t match the signal is converted. Multi channel arguments expand.
Mmmmkay? Is rate
the key feature here?
Arguments:
bus
An instance of Bus
numChannels
Number of output channels
offset
Offset to the starting index in the bus.
clip
If clip is set to ‘wrap’, the indices into the bus will not be clipped to the last bus channel, but will wrap around.
Returns:
A UGen output, usually an array of UGens or, if the arguments are arrays, an array of arrays.
What it actually does is in fact simpler to explain by:
b = Bus.audio(s, 3)
InBus.ar(b)
// -> [ an OutputProxy, an OutputProxy, an OutputProxy ]
InBus.ar(b, 2)
// -> [ an OutputProxy, an OutputProxy ]
InBus.ar(b, 4)
// -> [ a XFade2, a XFade2, a XFade2, a XFade2 ]
The undocumented nil
numChannels feature is used a bit in the class library to auto-size a bus reader.