hello stefan,

> is there a particular reason soundIn hides the number of channels  
> being read? maybe a variation (soundInN?) could be added?

i'm not sure i understand the question, can you perhaps elaborate?

the number of channels being read is the degree (number of output
ports) of the input, which selects which channels to read, zero
indexed.

  soundIn :: UGen -> UGen
  soundIn n = in' 1 AR (numOutputBuses + n)

you can query the degree of a unit generator with mceDegree, or
somewhat more reliably with length . mceChannels.

> [ mceDegree (soundIn (mce [0,2..14]))
> , (length . mceChannels) (soundIn 3) ]

=> [8,1]

regards,
rohan

ps. we could define this as a 'proper' interface

  ugenDegree :: UGen -> Int
  ugenDegree = length . mceChannels

but i've never had call for it, what is the usage scenario?
_______________________________________________
haskell-art mailing list
[email protected]
http://lists.lurk.org/mailman/listinfo/haskell-art

Reply via email to