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

MuseSampler: fixed potential compatibility issues #25887

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

RomanPudashkin
Copy link
Contributor

Rely only on the museUID, as it remains consistent across versions

@iamtesch
Copy link
Contributor

I believe this should work to keep instruments consistent. Have we tested by:

  1. Create a score with an instrument
  2. Close MuseScore
  3. Update to a new version of the instrument with changed category/vendor names
  4. Reopen MuseScore
  5. Ensure the instrument still plays back
  6. One other thing to check here -- if you expand the list in the mixer does this instrument still show up as "checked" under the new position?

If this is all good, it seems like a reasonable change to me.

@iamtesch
Copy link
Contributor

I think step "6" may be the one that doesn't work here, because the AudioResourceMeta object still has the old values in it. I don't have enough familiarity with the MuseScore code around the ISynthesizerPtr to have an idea of all the side effects here, but I think originally the findInstrument code was an exact match to eliminate the possibility of the data in AudioResourceMeta being a mismatch with the instrument loaded from the sampler.

Do we need to rewrite the data here stored in the score somehow with the updated values?

@RomanPudashkin RomanPudashkin added muse sounds P1 Priority: High labels Dec 20, 2024
@RomanPudashkin RomanPudashkin force-pushed the musesampler_resolve_synth_refact branch from 68bcf19 to cc07633 Compare December 20, 2024 10:45
@RomanPudashkin
Copy link
Contributor Author

If we renamed the instrument category, we could indeed have a problem with the mixer menu. Because both the category and the name were part of the resource ID. Now they are not, and we will always use the museUID as the resource ID instead. We will also convert the old ID format to the new one when reading the score. Thus, all checks like resourceMeta1.id == resourceMeta2.id should work fine even if we change the category or name

Copy link
Contributor

@iamtesch iamtesch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Thanks :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
muse sounds P1 Priority: High
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

3 participants