55 in User Input "magically" changes to 54

This probably doesn’t effect newer versions of Audacity/Nyquist, but I happened to
notice today while running tests for the UI of my new plug-in that if I entered the
number “55” into the UI, it would return the number “54”.

BTW: I’m using 126 on Vista64-bit

This only occurs for the number “55” as far as I know, all other numbers reported
correctly. In addition, if I change some of the other numbers in the other inputs,
it reports “55” correctly.

Not really a “serious” issue, but I found it interesting. Perhaps it’s that darn
USSA messing with me again. :laughing:

I’m leaving my test plugin here in case someone wants to check it out…
prepzerotest.ny (13.4 KB)

You’re right, it doesn’t.

This is a known bug of very old Audacity versions (the code of the Audacity_1.2.6 Nyquist interface is from 2005, more than 6 years old). The number in the input field is divided by the length of the slider in pixels, then multiplied by the distance of the slider’s knob from the left side in pixels, before it is passed to the Nyquist plugin code. In other words, the rounding effect depends on the size of the slider in pixels on the screen, which is highly operation system dependent. This affects all number input boxes beside sliders in Audacity_1.2.x. This was fixed in one of the early Audacity_1.3.x-beta versions.