ftom error?

    Jun 01 2020 | 6:22 am
    Hi All~
    I've been using [ftom] to show various frequencies on a [kslider] keyboard. Trouble is, I'm getting results that are a semitone off when attempting to use frequencies below about 8Hz. However, if I use the floating-point version of [ftom 0.], the results come out correctly.
    In my example below, I'm using @base 430.538971 to tune to a C256. But I've noticed the error at A440 as well, just going down in octaves with A until I hit 6.875Hz where [ftom] gives me a note number of -2 (a semitone off) and [ftom 0.] gives me -3 (correct).
    Is this a bug?
    Cheers, ~Randy

    • Jun 01 2020 | 10:48 am
      Looks like a bug in [ftom] when it goes negative. Just use [ftom 0.]
    • Jun 02 2020 | 4:07 am
      Thanks, Peter, I thought as much. When I use the floating-point [ftom 0.] with [int], it does exactly the same as [ftom] with the semitone error, but in the positive note ranges. [ftom 0.] with [round], however, seems to give accurate results regardless of sign. ~R ⨳
    • Jun 02 2020 | 12:30 pm
      yeah, thats a rounding error, somebody got the rounding not right when output is below 0. i think i reported this in 2003, together with the math bugs in meter and degrade. dont be always so impatient, guys! just wait a bit, i think there is an incremental update planned for 2037.
      -8.51 should be rounded to -9
      -8.51 should be rounded to -9