MuseScore icon indicating copy to clipboard operation
MuseScore copied to clipboard

[MU4 Issue] Playback is sped up/faster: tempo and pitch are doubled for two-channel playback independent of sample rate

Open ageneric opened this issue 1 year ago • 10 comments

Issue type

General playback bug

Description with steps to reproduce

  1. Set audio drivers to any sample rate (e.g. 44.1 kHz or 48 kHz)
  2. Start MuseScore Studio
  3. Open any score in MuseScore Studio
  4. Play the score and listen to the beautiful sounds

Actual behaviour vs. expected: Playback is twice as fast, so the tempo is twice as fast and pitch is doubled. Perhaps someone with working playback can check if the sounds decay twice as fast (see supporting videos).

Supporting files, videos and screenshots

44.1 kHz:

48 kHz:

It's probably faster to write this score than download it: test score sound issue.zip

What is the latest version of MuseScore Studio where this issue is present?

4.3.2

Regression

Yes, this used to work in MuseScore 3.x and now is broken

Operating system

Windows 10 19045 (x64-based)

Additional context

Audio driver: Cirrus Logic CS4206B (AB40). (This is the latest update my laptop supports.)

This is unlikely to be a duplicate of #17648 as the speakers are stereo and as far as I am aware Surround WASAPI is not in use. This is not a duplicate of #19931 as the issue persists regardless of whether 'Exclusive Mode' is enabled or disabled.

Experienced this issue since MuseScore 4.0.2. Not tried in 4.0.

Checklist

  • [X] This report follows the guidelines for reporting bugs and issues
  • [X] I have verified that this issue has not been logged before, by searching the issue tracker for similar issues
  • [X] I have attached all requested files and information to this report
  • [X] I have attempted to identify the root problem as concisely as possible, and have used minimal reproducible examples where possible

ageneric avatar Jul 25 '24 12:07 ageneric

@ageneric could you please attach your diagnostic files? Diagnostic -> Save diagnostic files

RomanPudashkin avatar Jul 25 '24 13:07 RomanPudashkin

Also, please try this build: https://github.com/musescore/MuseScore/actions/runs/9969308796/artifacts/1709471472

Is it better or worse?

RomanPudashkin avatar Jul 25 '24 13:07 RomanPudashkin

Closing, no response

zacjansheski avatar Aug 21 '24 20:08 zacjansheski

Apologies for the late response. My diagnostic files are attached.

Diagnostic files: MuseScore-4.3.2 diagnostics_MU4_4.3.2_23769.zip

Diagnostic files: MuseScore-4.4.0.241990630 build as linked diagnostics_MU4_23769.zip

If it's still relevant, I reproduced the issue on the linked build. It's worse - it seems to have identical playback behaviour when in "Play" mode, but additionally has severe stuttering on note input playback.

ageneric avatar Aug 23 '24 22:08 ageneric

I can confirm I still experience the same playback behaviour as described in the original issue in 4.4 Release Candidate (obtained from https://musescore.org/en/node/367322).

May I request for this issue to be re-opened? Or, please let me know if a new issue should be created.

ageneric avatar Aug 23 '24 22:08 ageneric

I'm running into this as well. It happens when I use MuseScore with my headset (Logitech G533) and it's fine when I switch the audio to the speakers of my display monitor (iiyama PL3467WQ). I also tried setting the bitrate to 44.1kHz but that didn't help.

Not sure if relevant: when I change the bitrate of my headset in Windows (11), Musescore won't play back at all anymore until I restart it. Please let me know if I need to add diagnostic info or whatever, I'm willing to help (and have a background in computer science, so am fine with running terminals for example).

rienheuver avatar Aug 26 '24 19:08 rienheuver

@rienheuver could you please try 4.4 RC? Is it happening there? If so, please attach your diagnostic files (Diagnostic -> Save diagnostic files)

RomanPudashkin avatar Aug 27 '24 07:08 RomanPudashkin

If it's still relevant, I reproduced the issue on the linked build. It's worse - it seems to have identical playback behaviour when in "Play" mode, but additionally has severe stuttering on note input playback.

@ageneric please try to manually increase the buffer size in Preferences / Audio & MIDI

RomanPudashkin avatar Aug 27 '24 07:08 RomanPudashkin

@ageneric after looking at your logs, I can confidently say that your issue is another case of this one, but less obvious:

  1. we're trying to run on 2 channels
  2. but your system refuses and starts using 4 channels instead
  3. MuseScore only supports 2 channels, so you get a high-pitched sound

Unfortunately, fixing this problem is not easy. But maybe we should just try to use this workaround (@cbjeukendrup FYI) until we refactor the audio engine properly

RomanPudashkin avatar Aug 27 '24 10:08 RomanPudashkin

@rienheuver could you please try 4.4 RC? Is it happening there? If so, please attach your diagnostic files (Diagnostic -> Save diagnostic files)

I just tried 4.4 RC and the sound it produces is indeed worse than 4.3, it sort of sounds like it's crashing so bad. I tried buffer sizes of 2048 and 4096 as well. Both seemed to give a very slight improvement over the previous one (so 1024 < 2048 < 4096), but at 4096 it was still far away from workable. My diagnostics are below. Please let me know if there's anything else I can do!

musescore-diagnostics.zip

rienheuver avatar Aug 27 '24 14:08 rienheuver

I just downloaded MuseScore 4.2, removed the old versions and installed 4.2 because I need to get on with a project and I can't really with this bug. But as it appears it's broken there too. Any suggestions on what to do @RomanPudashkin ?

rienheuver avatar Sep 02 '24 20:09 rienheuver

I have the same issue, and everywhere Iread about it, it's people mentioning logitech. I have this when my Logitech G560 speakers are set as output. If I turn on my headset (bluetooth) or my monitor speakesr the issue dissappears. In the first builds of MU4 this issue was not present.

las3r avatar Sep 15 '24 14:09 las3r

I think we should close this as a duplicate of https://github.com/musescore/MuseScore/issues/17648, as it is essentially the same problem. We're planning to address that issue (at least in a temporary manner) in version 4.4.3, i.e. soon.

cbjeukendrup avatar Sep 15 '24 17:09 cbjeukendrup