With the help of Tom we were able to resolve the issue. Tom, many thanks. Because other user may face a similar behaviour that the pitches of songs are shifted when using a sample rate of 48kHz I would like to share the fix here.
From fluidsynth 2.1.0 onwards the setting of synth.sample-rate is no real-time setting anymore. See http://www.fluidsynth.org/api/ A setting of the sample rate needs to be done BEFORE the synth is created. E.g. like that fluid_settings_setnum(settings, "synth.sample-rate", 48000.0); synth = new_fluid_synth(settings); From the past we had it vice versa which resulted that the played songs were shifted by a half tone. I hope that this information helps others who face a similar issue. Reinhold -----Ursprüngliche Nachricht----- Von: fluid-dev [mailto:fluid-dev-bounces+reinhold=notation....@nongnu.org] Im Auftrag von Reinhold Hoffmann Gesendet: Donnerstag, 16. April 2020 10:48 An: 'FluidSynth mailing list' Betreff: Re: [fluid-dev] Wrong sound pitches with sample rate 48kHz Hi Tom, hi Jean-Jacques, Thanks for the immediate response. I tested the binary fluidsynth 2.1.1 on Ubuntu 20.04 LTS and a fresh built setup of 2.1.0 on Windows x64 with Visual Studio. Both setups provide the correct pitches and are fine with the sample rate of 48kHz. The issue only happens with our apps. Thanks for your advices. It is now on us to investigate the issue further. Again, thanks for your advices, hints and help. Best regards, Reinhold -----Ursprüngliche Nachricht----- Von: fluid-dev [mailto:fluid-dev-bounces+reinhold=notation....@nongnu.org] Im Auftrag von Tom M. via fluid-dev Gesendet: Donnerstag, 16. April 2020 10:27 An: FluidSynth mailing list Cc: Tom M. Betreff: Re: [fluid-dev] Wrong sound pitches with sample rate 48kHz I cannot reproduce the issue either. Tested locally on Linux as well as the 2.1.0 release windows binaries. Everything plays at the correct pitch. The only related change between 2.0.5 and 2.1.0 I see is that our lookup tables have changed. If your build of 2.1.0 is "polluted" it may use the old lookup tables. You can easily verify that by building and executing the unit tests of 2.1.0 . This is the "check" project in the auto generated CMake VS solution. Or via commandline: cmake --build fluidsynth_build_dir/ --target check If the test_ct2hz test fails, you should restart cleanly from scratch again. Don't trust the VS "Rebuild all" button. Tom _______________________________________________ fluid-dev mailing list fluid-dev@nongnu.org https://lists.nongnu.org/mailman/listinfo/fluid-dev _______________________________________________ fluid-dev mailing list fluid-dev@nongnu.org https://lists.nongnu.org/mailman/listinfo/fluid-dev _______________________________________________ fluid-dev mailing list fluid-dev@nongnu.org https://lists.nongnu.org/mailman/listinfo/fluid-dev