MuseScore
MuseScore copied to clipboard
[MU4 Issue] MS Basic and SoundFonts are playing largely out of tune, while Muse Sounds and most VSTs are fine.
Describe the bug
The frequency of the A4 should be exactly 440Hz, but the MS Basic produces the same sound at 1915Hz, about 4.35 times higher.
The pitch differences between SoundFont and Muse Sound are consistent among the different SoundFonts, including MS Basic.
The number 4.35 is close to 192000/44100, where 192000 is the output sampling frequency.
To Reproduce Steps to reproduce the behavior:
- Get some device that runs MuseScore 4 and has an 192kHz output.
- Set sampling frequency of output device to 192kHz.
- Launch MuseScore 4.
- Create an empty score with piano part.
- Play the A4 note with Grand Piano from Muse Sound.
- Play the A4 note with MS Basic.
- You'll see the pitch difference of these two.
Expected behavior Piano from MS Basic plays A4 at 440Hz.
Screenshots
Image of MuseScore 4

Spectrum analysis of A4 note played with Piano from MS Basic, in Audacity

Platform information
- PC: Modified DELL XPS 8700
- OS: Windows 10 Home 22H2 Build 19045.2364
- CPU: Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
- RAM: 32.0 GB DDR3 DIMM
- Graphics: NVIDIA GeForce GTX 1060 (6 GB) from 玄人志向
- Audio: VB-Audio VoiceMeeter VAIO @ 24bit 192kHz Stereo
- Storage:
- OS (C:) : Western Digital WDC WDS100T2B0A-00SM50 1000.2 GB SATA SSD
- WORKSPACE (D:) : Seagate ST1000DM003-1ER162 1000.2 GB 7200RPM SATA HDD
- DATA (E:) : Western Digital WDC WD10EZEX-22MFCA0 1000.2 GB 7200RPM SATA HDD
- ARCHIVE (F:) : HGST HCC541010B9E660 1000.2 GB 5400RPM SATA HDD
Additional context Add any other context about the problem here.
It looks like FluidSynth, our SoundFont synthesiser, doesn't support sample rates above 96 kHz...
@MineCake147E I've created an experimental solution: https://github.com/musescore/MuseScore/pull/16018
Would be great if you could try out the test builds for this version (they're ready in 30 minutes). See https://github.com/musescore/MuseScore/wiki/Downloading-and-running-test-builds#Downloading-Builds-from-Pull-Requests for how to download these builds.
@cbjeukendrup Thank you! It works for 192kHz!
However, when I changed the output device and set the sample rate of that device (not including the other devices) to 384 kHz, it played at twice the tempo and an octave higher pitch.
When I reduced the sample rate of the output device to 96 kHz, it played at half the tempo and an octave lower pitch.
In these cases, all instruments tested are affected, including Muse Sounds and some VSTs (including Dexed).
The VST plugin sforzando is showing the host rendering sample rate as being set to 192kHz in both cases, even though I have changed the sample rate of the output device to 384kHz or 96kHz. In contrast, when it is hosted in Cakewalk, it correctly shows the host rendering sample rate.
Restarting the test build of MU4 doesn't solve anything about it.
There are certainly some problems with the rendering sample rate.
@MineCake147E Can you check the last build from #16018 please? Does it solve the initial bug?
I just don't have an audio device that supports 192kHz to check
Thanks!
It looks good to me with 192kHz.
Thanks for checking!
@MineCake147E Can you check also 384kHz please?
It also looks good to me with 384kHz. Changing sample rate requires restarting MU4 to take effect, though.
Good. Thanks!
@MineCake147E Can you do one last thing please? Try the score from #19241. Does reverb work fine during playback on 192/384kHz?
@DmitryArefiev I'm afraid that I couldn't find any .mscz files in https://github.com/musescore/MuseScore/pull/19241.
@MineCake147E Oh, sorry! My bad.. I meant #19242 , or just try this EXPORT.BASIC_AUX.REVERB.zip
Check only playback please, and you can take last nightly build https://github.com/musescore/MuseScore/actions/runs/6079712667
I think it's fine for both sampling frequency.
I recorded a playback for both 192kHz and 384kHz in Audacity:
192kHz
384kHz
Yeah, I see it's fine. Thank you for testing!