We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A nil argument for numChannels is presumably a result of a mistake. It can be hard to trace down.
numChannels
E.g.:
b = Buffer(s); PlayBuf.ar(b.numChannels)
Returns [], because b has not yet been assigned a number of channels, so it is essentially PlayBuf.ar(nil).
[]
PlayBuf.ar(nil)
I'd suggest that throwing an error would be better, even though I can imagine that in some cases, one could make use of the current behavior.
Fix:
in MultiOutUGen:
MultiOutUGen
initOutputs { arg numChannels, rate; if(numChannels.isNil or: { numChannels < 1 }) { Error("%: wrong number of channels (%)".format(this, numChannels)).throw }; channels = Array.fill(numChannels, { arg i; OutputProxy(rate, this, i); }); if (numChannels == 1, { ^channels.at(0) }); ^channels }
The text was updated successfully, but these errors were encountered:
class library: protect MultiOutUGen from void numChannels
727f7b3
Both 0 and nil make no sense for MultiOutUGen. This fixes supercollider#1686.
5d6d847
telephon
No branches or pull requests
A nil argument for
numChannels
is presumably a result of a mistake. It can be hard to trace down.E.g.:
b = Buffer(s); PlayBuf.ar(b.numChannels)
Returns
[]
, because b has not yet been assigned a number of channels, so it is essentiallyPlayBuf.ar(nil)
.I'd suggest that throwing an error would be better, even though I can imagine that in some cases, one could make use of the current behavior.
Fix:
in
MultiOutUGen
:The text was updated successfully, but these errors were encountered: