From the original SynthMaker forum (2004–2014), with its members’ names and dates.
oleg_t ·
My second try - "zero switcher". Returns two boolean values (real and inverse) if mono value is greater or less than zero.
Could there be more optimized approach using.. dont know, code/asm getting same result?
OSM here
http://www.box.net/shared/e20zei5uo5
trogluddite ·
If you need the booleans to be green (not stream) then that's the only sensible way.
One useful optimisation would be to add a 'boolean changed' after the comparison...
At the moment, each of the boolean outputs are being updated for every tick of the tick 100 regardless of whether the output has changed or not. Those ticks will pass through to any green or GUI modules after your switcher, causing them to use CPU constantly.
With the 'boolean changed' in place, any following Green modules will only be processed when the output actually changes, and remain dormant if the value has not changed; this could save a fair bit of CPU if you have, say, a display being updated on screen by the switcher.
Couple of other points worth bearing in mind...
-The tick 100 is not accurate; on most systems it maxes out at about 60 ticks per second, and will vary depending on the overall CPU load on your PC. That's because the ticks are driven by windows timers, which have a low thread priority. Obviously, this means that the switcher is not accurate for high frequency mono signals.
-The CPU reading at the bottom of the SM window only measures 'stream' CPU (i.e. blue/white/code/assembly); it doesn't show the load from Green components or screen re-draws. Using the performance monitor in windows will give you a more accurate measure of CPU load if there is a lot of Green activity, or animated displays on screen.
Wrote something here? To have a post removed or your name hidden, write to [email protected].