When only 1 input is connected the saw comes.
When i connect the second input it does not work anymore 😊
trogluddite ·
Hi,
These two lines are the ones causing all the trouble...
in1=in1*SR*0.5;
in2=in2*SR;
Writing back to the input connectors is a big no-no in SM code, as it has strange effects on the components that are feeding the code module (the connectors are little more than shared memory addresses between components).
A couple of temporary variables will soon fix the problem - and thanks to the way SM's compiler works will not cost you any extra CPU.
BTW) You can write to output connectors as many times as you like - only the final value will be seen by the following components.
Neptune ·
Thanks trog
I have set floats for the SR calculation.
Now it works.
Wrote something here? To have a post removed or your name hidden, write to [email protected].