Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set synth.chorus.speed minumum is reported as out of range #1284

Closed
lorenzosu opened this issue Nov 22, 2023 · 1 comment · Fixed by #1286
Closed

set synth.chorus.speed minumum is reported as out of range #1284

lorenzosu opened this issue Nov 22, 2023 · 1 comment · Fixed by #1286
Labels
Milestone

Comments

@lorenzosu
Copy link

I'm running FluidSynth executable version 2.3.4 on Linux (Manjaro)

After loading a sf2 file if I type in the interactive console:

set synth.chorus.speed 0.1

I get an error:

fluidsynth: error: requested set value for 'synth.chorus.speed' out of range set: Value out of range. Try 'info synth.chorus.speed' for valid ranges

However the minimum value is reported as 0.100

If I set the value to 0.101 it is correctly set.

I am also able to set it at 0.10000009 (and the get will display 0.100 but have no idea if / where conversions or roundings happen)

@derselbst
Copy link
Member

Floating point arithmetic is prone to rounding errors by design as not all values can be represented exactly. The standard behind this is IEEE 754. If you want to know more about this issue, I'd recommend David Goldbergs article "What Every Computer Scientist Should Know About Floating-Point Arithmetic".

In this particular case you've reported however, the issue is caused by improper float to double promotion. The linked PR above will fix the issue. Thanks!

@derselbst derselbst added this to the 2.3 milestone Nov 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants