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.14k stars 2.63k forks source link

MuseSampler cannot handle large scores (again) #20450

Closed metasekk closed 9 months ago

metasekk commented 9 months ago

Issue type

General playback bug

Bug description

MuseSampler was recently updated from version 0.4.0.38 to 0.5.0.51.

It re-introduced issue #15768 that was experienced with MuseSampler 0.3.2. When scores become large enough (~35 mn), the staves that use MuseSounds become permanently muted. Besides, depending on the content of the score before the cut-off, there can be drastic playback glitches, in which case some staves sound indefinitely, suggesting that the playback of the notes before the interruption is stacking up and never ends.

Steps to reproduce

  1. Create a long score (duration : >~35 mn) and make sure you are using MuseSounds on several staves.
  2. Write some notes on those staves.
  3. Hear them be played until a certain length/bar is reached, after which the following notes won't sound.

Screenshots/Screen recordings

I provide a video showing the steps described above and the corresponding score, as well as another video showing what it sounds like on a more realistic score.

MuseScore Version

MuseSampler : v 0.5.0.51. Tested on Beta 4.2.0, Master 4.3.0 (Nightly-233470304-master-453c4c0-x86_64)

Regression

Yes, this used to work in a previous version of MuseScore 4.x

Operating system

Windows 10 Version 22H2, 64 bits, x64-based processor

Additional context

Also see #15768 and #15094.

bkunda commented 9 months ago

Thanks for this @metasekk. The video doesn't seem to be there in the issue description. Can you please try adding it again?

metasekk commented 9 months ago

Thanks for this @metasekk. The video doesn't seem to be there in the issue description. Can you please try adding it again?

Is it working now ?

konradglas commented 9 months ago

@metasekk Could you share that simplified reproduction score that you are creating in the first video? Thanks!

shoogle commented 9 months ago

I wasn't able to reproduce this with a 5 hour score with 9k measures: Looong_score.mscz.zip

My Muse Sampler version is 0.5.0 as reported by MuseScore > Diagnostic > Muse Sampler.

@metasekk, do you experience the problem when you use my file? (You need to rename it to remove .zip from the end.)

Shortcut to jump to the end of the score is Ctrl+End (or Cmd+Fn+Right on macOS).

metasekk commented 9 months ago

I tested the file you provided in both 4.2.0 (latest nightly build) and 4.3.0 (latest master nightly build), and I still experience the issue (I can't hear the last notes, see this video).

Interestingly enough, it doesn't happen in 4.1.1 on my side. However, all three versions (4.1.1, 4.2.0, 4.3.0) indicate that MuseSampler runs as "0.5.0".

shoogle commented 9 months ago

Interesting! Thanks for your analysis. I retested and found the same: 4.1 is working, but master and 4.2 have this issue.

So it appears to be a MuseScore problem rather than a Muse Sampler problem. Maybe there's a 32-bit number involved somewhere, and it overflows for large scores?

metasekk commented 9 months ago

Could it have been caused by modifications in libhandler.h ? I remember that it contains conditions about the versions of MuseSampler.

shoogle commented 9 months ago

I just downgraded my Muse Sampler to 0.4.3 and I can no longer reproduce the problem, even in MuseScore master and 4.2.

So it seems to be the combination of Muse Sampler 0.5.0 and MuseScore master or 4.2 that is the problem.

To downgrade Muse Sampler, I had to:

  1. Muse Hub > Settings > Quit.
  2. Uninstall Muse Hub (beta version).
  3. Install Muse Hub (non-beta version). At this point you will still have the beta version of Muse Sampler.
  4. Go to C:\Windows\System32 (macOS: /usr/local/lib, same for Linux too?)
  5. Delete or rename the MuseSamplerCoreLib.dll file in that folder (macOS: .dylib, Linux: .so).
  6. Re-open Muse Hub (it silently downloads and reinstalls Muse Sampler).
  7. Relaunch MuseScore.
  8. Go to Diagnostic > Muse Sampler > Check Muse Sampler to see the version used.

You can check the version of individual packages, effects, and sounds (e.g. Muse Brass, Muse Percussion, etc.) by viewing the .dlcache file that's in Muse Hub's Downloads folder. The default location on Windows is C:\ProgramData\MuseHub\Downloads.

bkunda commented 9 months ago

Thanks for the testing and validation @metasekk and @shoogle. @iamtesch @RomanPudashkin pls take note. Looks like we fixed a similar problem for 4.1.

RomanPudashkin commented 9 months ago

@shoogle @bkunda @metasekk please try this fix. Thanks! https://github.com/musescore/MuseScore/pull/20463