expr pow(2.,($f1/12.)) Octave calculation issues
Hi Folks,
I'm trying to calculate semitone values in a scale from a specific frequency value using
[expr pow(2.,($f1/12.))]
and add them to a [coll].
It generally works fine, but
when it calculates octaves it seems to truncate the numbers after the decimal point. I have checked the output of the expr object and it is multiplying by 2. (rather than 2) and it is being given a float in the first place.
Has anyone got any ideas on why this is and how to fix it. Otherwise my octaves will be slightly flat each time.
thanks in advance,
John
the patch doesnt work for me, but could swear i see a [t b i b] at the top.
that [t b i b] must be very special!
I received this automated reply this morning to my recent post here
but the actual reply is this post
***hope you feel better

yeah it is superspecial, it can transform 261.626 into 261 even if you did not want this.
@Roman Thilenius
Doh!! I didn't spot that one. I had been scratching my head about this for quite a few hours. I think that is the only place I didn't fully investigate! It all works now. Thanks.
@Wil
Thanks for the alternative patch. I dig into that one and check your approach. Thanks!!