Closed giuliomoro closed 3 years ago
.play wraps the function in some additional UGens, that might be what creates the problem.
Could possibly be that we need to remove writeOutputSpecs
from the class definition of AnalogOut and DigitalOut and DigitalIO, but have to check.
@sensestage
.play wraps the function in some additional UGens, that might be what creates the problem. Could possibly be that we need to remove writeOutputSpecs from the class definition of AnalogOut and DigitalOut and DigitalIO, but have to check.
do you have any further insight on this?
I checked how other UGens with no output do it, and for example, SendTrig::ar (and kr) returns 0.0 instead of the output of multiNew. This prevents Function::play from creating an Out UGen (if AnalogOut is the last UGen of the block).
I've tested it and it fixes the issue :)
Closed 313f28a
@apmcpherson had found an issue with one of the digital UGens I think, where having it last in a
play
statement would occasionally cause noisy outputs (probably because the output buffer was not being filled with zeros).Now I have this:
and this floods the terminal output with
(they are about 50 per second: the trigger input to the Poll receives a trigger every 873 or 889 samples), while the lines from the
LinExp
(generated byrate.poll
)seem to come in at about the right frequency.
Funny enough, if you comment out, e.g.:
rate.poll(1);
, thus leaving only the AnalogIn Poll UGen, this one only prints its output only once at the beginning (probably when the constructor callsPoll_next_kk
).Explicitly adding a UGen which produces a valid audio-rate output as the last command of the
play
block fixes everything, e.g.:@sensestage: is this expected behaviour with
play
or is there something wrong in the Bela UGens?Should we just avoid
play
altogether and do something like this (which works fine) instead?