Let's say i have a dial, which goes into the math/*c, the outlet of which goes into inlet_i1 (frac32) of another object, call it O1. I've figured out that i need to set the dial on the math/*c object to 19.2 to get what i want. Now i want to eliminate the math/*c object from my patch, to save me some ui elements. Given that math/*c isoutlet_out= ___SMMUL(param_amp,inlet_in)<<1;
,
i would replace inlet_i1
in the k-rate code of O1 by ___SMMUL(
constant-number-19.2,inlet_i1)<<1
.
Now, how do i figure out the correct constant-number-19.2?
I suppose this has to do with using integers instead of floats, and some fancy bit-shifting is needed, but i cannot figure out the receipe.
I suppose my general question is: if i have an object with a parameter p, and i know the value that i want for that parameter once and for all, how do i figure out the constant that would need to go into the code instead of param_p if i want to get rid of the parameter?