musescore / MuseScore

MuseScore is an open source and free music notation software. For support, contribution, bug reports, visit MuseScore.org. Fork and make pull requests!
https://musescore.org
Other
12.27k stars 2.66k forks source link

Playback does not function properly when external soundcard is in use #19869

Closed GMOrik closed 2 months ago

GMOrik commented 1 year ago

Issue type

General playback bug

Bug description

I'm using an external soundcard (Steinberg UR22 mk II) while composing, and I noticed that every soundfont that is not Muse Sounds (for example MS Basics and external soundfonts) give me wrong playback - every note is out of tune as if everything has been pitched up. This is especially noticable with drums - they just become clicks.

The playback is completely fine if I plug my headset directly into my computer instead of using the soundcard. I've also tried exporting the audio as mp3 - in this case I get the correct playback even when using my external soundcard. As previously mentioned, there are no problems when using Muse Sounds.

Also, a different (but perhaps related?) issue. When I change the audio output device while using Musescore (e.g. plug out the soundcard and plug in my headset directly to my PC, or vice versa) the playback is completely messed up. Everything is either extremely sped up and pitched up, or slowed down and pitched down (depending on if I switch to or from the soundcard). This issue applies to all sounds including Muse Sounds, and the only way I've managed to fix it is to restart the application.

Steps to reproduce

  1. Plug in an external soundcard of your choice into your computer.
  2. Plug your headphones into the soundcard and use it as the audio output source for your computer. In Musescore, use "System defaults" as audio unit.
  3. Open a score that uses non-Muse Sounds soundfonts
  4. Press "Play"

Screenshots/Screen recordings

No response

MuseScore Version

MuseScore version (64-bit): 4.1.1-232071203, revision: github-musescore-musescore-e4d1ddf

Regression

I don't know

Operating system

Windows 11

Additional context

No response

MarcSabatella commented 1 year ago

This is normally the result of a sample rate mismatch. Unfortunately it seems MuseScore does not always detect the sample rate of your audio device correctly, so you may need to find its settings in your OS and change the same rate yourself. 44.1 kHz normally works best, but if it's already set to that, try 48 kHz.

And in the future, please use the Support forum on musescore.org when asking for help with MuseScore

lyrra commented 1 year ago

Experiencing similar thing with jack-driver. Suspecting that the reported sampe-rate (that is sent to musescore through activeSpec) isn't respected, ie a bug.

bkunda commented 1 year ago

@DmitryArefiev pls look at this

DmitryArefiev commented 12 months ago

It looks similar to #17877. But that issue also occurs with MuseSounds.

@GMOrik The soundfont issue persists with UR22 even after MS restart? Can you check what sample rate UR22 uses?

DmitryArefiev commented 2 months ago

Should be fixed by #23954. But that PR doesn't cover audio device hotplug cases. I'll log it separately

For MuseSounds see https://github.com/musescore/MuseScore/pull/23954#issuecomment-2283553013