Howdy all,
working on refining a couple oscillator designs that I have, and I know that the expr~ object working on signals can be cpu intensive.
However, I'm a little unclear on which cases in which it should be avoided and replaced with equivalent objects.
For example, I have a couple places where I have control signals, like envelope generators, that need simple operations performed. In one such case I have an expr~ object performing a reciprocal 1 / $v1 operation. In another cases I have even simpler operations that could be described as lines (like 1/2 $v1 + 0.5).
Because these are not audio rate signals, I'm assuming its safe enough to use the expr~ object. Although it would certainly be very easy to map these functions out to tables and use a tabread object to do the operations instead.
In another case, I compare the output of two audio signals and output a one on one side of the expr~ object if the first is larger and a one on the other side in the opposite case.
this is what I'm describing
[expr~ $v1 > $v2;
$v1 <= $v2]
I figure this must be relatively expensive, but unless there are some cheap comparator objects that are equally accurate, I can't think of any alternatives.
In another case, I compare the output of a phasor signal to a constant value to generate pulses (expr~ if ($v1 > 0.5, 1, 0)). I understand I could create a table in which x values below 0.5 equaled 0 and those above equaled one to achieve the same effect. I worry that this could be inaccurate at the discontinuity. For timing purposes, epxr~ has been accurate, and this is something I can't sacrifice.
Sorry for doing so much thinking aloud here, I do have one quick question- how do you record your cpu usage normally? is there an abstraction that works well, or do people just use tools available with their operating systems?
Having said that, do windows users find task manager acceptable, or is there something preferred?
Thanks everyone