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

[MU4 Issue] MS Basic and SoundFonts are playing largely out of tune, while Muse Sounds and most VSTs are fine (using 192kHz sample rate output) #15615

Closed
MineCake147E opened this issue Dec 27, 2022 · 14 comments · Fixed by #16018
Assignees
Labels
P2 Priority: Medium playback General playback issue

Comments

@MineCake147E
Copy link

MineCake147E commented Dec 27, 2022

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:

  1. Get some device that runs MuseScore 4 and has an 192kHz output.
  2. Set sampling frequency of output device to 192kHz.
  3. Launch MuseScore 4.
  4. Create an empty score with piano part.
  5. Play the A4 note with Grand Piano from Muse Sound.
  6. Play the A4 note with MS Basic.
  7. You'll see the pitch difference of these two.

Expected behavior
Piano from MS Basic plays A4 at 440Hz.

Screenshots

Image of MuseScore 4

image

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

image

Platform information

  • PC1: 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

EDIT: It also reproduced in my new PC.

  • PC2: Custom built PC
    • OS: Windows 11 Home 22H2 (22621.1992)
    • CPU: Intel(R) Xeon(R) w5-2455X 3.19 GHz
    • RAM: 32 GB DDR5 ECC RDIMM
    • Graphics: NVIDIA GeForce GTX1060(6 GB) (transplant from PC1)
    • Storage:
      • OS(C:) : WD_BLACK SN770 1TB
        Additional context
        Add any other context about the problem here.
@cbjeukendrup
Copy link
Contributor

It looks like FluidSynth, our SoundFont synthesiser, doesn't support sample rates above 96 kHz...

@cbjeukendrup
Copy link
Contributor

cbjeukendrup commented Jan 23, 2023

@MineCake147E I've created an experimental solution: #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.

@MineCake147E
Copy link
Author

@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.

@DmitryArefiev
Copy link
Contributor

@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!

@DmitryArefiev DmitryArefiev changed the title [MU4 Issue] MS Basic and SoundFonts are playing largely out of tune, while Muse Sounds and most VSTs are fine. [MU4 Issue] MS Basic and SoundFonts are playing largely out of tune, while Muse Sounds and most VSTs are fine (using 192kHz sample rate output) Aug 8, 2023
@DmitryArefiev DmitryArefiev added the P2 Priority: Medium label Aug 8, 2023
@DmitryArefiev DmitryArefiev added the playback General playback issue label Aug 8, 2023
@MineCake147E
Copy link
Author

It looks good to me with 192kHz.

@DmitryArefiev
Copy link
Contributor

Thanks for checking!

@DmitryArefiev
Copy link
Contributor

@MineCake147E Can you check also 384kHz please?

@MineCake147E
Copy link
Author

It also looks good to me with 384kHz.
Changing sample rate requires restarting MU4 to take effect, though.

@DmitryArefiev
Copy link
Contributor

Good. Thanks!

@DmitryArefiev
Copy link
Contributor

@MineCake147E Can you do one last thing please? Try the score from #19241. Does reverb work fine during playback on 192/384kHz?

@MineCake147E
Copy link
Author

@DmitryArefiev I'm afraid that I couldn't find any .mscz files in #19241.

@DmitryArefiev
Copy link
Contributor

DmitryArefiev commented Sep 5, 2023

@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

@MineCake147E
Copy link
Author

I think it's fine for both sampling frequency.

I recorded a playback for both 192kHz and 384kHz in Audacity:

192kHz

image
image
EXPORT BASIC_AUX REVERB.zip

384kHz

image
image
EXPORT BASIC_AUX REVERB_384kHz.zip

@DmitryArefiev
Copy link
Contributor

Yeah, I see it's fine. Thank you for testing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 Priority: Medium playback General playback issue
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants