Getting values out of ugens

Is there a way to get a numeric value out of a ugen? I.e. get the last sample that was output and save it to a variable? .poll exists, but that’s not what I want.

The application here is that I have a looper built out of a Phasor and BufRd . I want to be able to trigger a function (via a midi controller) to set the start and end points of the loop. The problem is that I am modulating the rate of that Phasor in real time. This means that a timestamp based approach won’t work, since CPU time won’t correspond to the amount of “time” that passed in Phasor. What I want to try and do is capture the output of the Phasor ugen at two points in time and then use those to set the start/end for a new Phasor.

So - you want the MIDI controller to tell the synth when you want to update the start and end points, but based on the output of Phasor? What about using your MIDI controller to set a trigger that control a Gate on the output of Phasor which then drives the start time / end time, etc?

I do not really understand your requirement, but getting data out of a ugen into the language can be accomplished in a few ways.

They are neatly summarized here:[Server-language_communication].html

SendReply may be what you are looking for?

1 Like