
Originally Posted by
scalerobotics
It looks like you are on the right track to me. If you like your decimals, use the 50 million instead of the 500,000. Then, when you go to print out your number, you can add your decimal back in like this.
[code]
LCDOut dec frequency/100,".",dec frequency//100," Hertz"[FONT=Verdana]
Nice one & that suggestion of yours puts the decimal point in nicely...
Code:
Count Converted to frequency...
1935 258.39 Hertz
1936 258.26 Hertz
1936 258.26 Hertz
1936 258.26 Hertz
1935 258.39 Hertz
1935 258.39 Hertz
1935 258.39 Hertz
1936 258.26 Hertz
1936 258.26 Hertz
1936 258.26 Hertz
1936 258.26 Hertz
1935 258.39 Hertz
1935 258.39 Hertz
1935 258.39 Hertz
1937 258.13 Hertz
1936 258.26 Hertz
1936 258.26 Hertz
1935 258.39 Hertz
1935 258.39 Hertz
(My sig gen actually shows 258.4 on its LED readout when the above was seen)
The closest musical note to 258.3(ish)Hz is C (261.63Hz) ....the semi-tones either side of C, are B (246.94Hz) & C# (277.18Hz) ....so the error of ± 0.2Hz I'm seeing above isn't likely to be that much of a problem in the great scheme of things.
Many thanks for all your input - I might now just go off on a tangent & have a dabble with guitar to midi!
Bookmarks