Skip to content

fix: tremolo articulation mapping for individual string instruments - #30951

Open
manolo wants to merge 1 commit into
musescore:4.7from
manolo:fix-issue-21122
Open

manolo wants to merge 1 commit into
musescore:4.7from
manolo:fix-issue-21122

Conversation

@manolo

@manolo manolo commented Nov 10, 2025

Copy link
Copy Markdown
Contributor

Summary

Now string instruments correctly select tremolo MIDI presets when using SF2 soundfonts.

  • Add missing tremolo articulation mappings to individual VIOLIN, VIOLA, VIOLONCELLO and CONTRABASS in soundmapping.h
  • Previously only the *_SECTION variants had tremolo mappings, so individual instruments fell back to the default arco sound

Affected mappings

  • VIOLIN: Tremolo8th/16th/32nd/64th to midi::Program(20, 44)
  • VIOLA: Tremolo8th/16th/32nd/64th to midi::Program(30, 44)
  • VIOLONCELLO: Tremolo8th/16th/32nd/64th to midi::Program(40, 44)
  • CONTRABASS: Tremolo8th/16th/32nd/64th to midi::Program(50, 44)

Resolves: #21122

  • I signed the CLA
  • The title of the PR describes the problem it addresses
  • Each commit's message describes its purpose and effects, and references the issue it resolves
  • If changes are extensive, there is a sequence of easily reviewable commits
  • The code in the PR follows the coding rules
  • There are no unnecessary changes
  • The code compiles and runs on my machine, preferably after each commit individually
  • I created a unit test or vtest to verify the changes I made (if applicable)
    • Does not apply because the change only affects configuration entries, no logic code, and there are no existing tests covering these mappings

@cbjeukendrup

Copy link
Copy Markdown
Contributor

The samples that would be used by this PR are section samples, not solo, right? As far as I know, we don't have solo tremolo samples.

So a solo violin with tremolo would now use the section tremolo sound. We'll have to ask the design team what they prefer: solo+tremolo just using the solo sound without tremolo (current situation) or solo+tremolo using the section+tremolo sound (this PR).

@MarcSabatella

Copy link
Copy Markdown
Contributor

FWIW, MU3 and earlier did it this way - section tremolo sounds for solo instrument - and we rarely if ever got complaints. To me it's very clearly preferable.

@manolo

manolo commented Nov 10, 2025

Copy link
Copy Markdown
Contributor Author

@cbjeukendrup thanks for bringing up this design consideration! You're right that the samples would be section samples, not solo. Using Bank 0, Program 44 (generic tremolo) for individual is perhaps more academic and also would have these advantages:

  • No "hacks" in the instrument configuration files
  • Users can select soundfonts that have the appropriate programs in the correct banks or develop their own.

@MarcSabatella Thanks for the historical context about MU3 behavior

In any way I can adapt my SF2 files for plectro Spanish orchestras to be able to reproduce tremolo correctly.

Would you like me to update the PR to use Bank 0 for individual instruments instead?

@manolo

manolo commented Nov 10, 2025

Copy link
Copy Markdown
Contributor Author

After investigating the playback code further, the instruments.xml file is no longer used for actual sound mapping. The real playback logic uses soundmapping.h.

I've rolled back changes regardin the .xml file. Now the PR is more concise.

@cbjeukendrup cbjeukendrup added the needs design approval Feature/change requests that need a go/no-go from the design team before being worked on label Dec 31, 2025
@igorkorsukov
igorkorsukov changed the base branch from master to main May 14, 2026 14:31
@manolo

manolo commented Aug 31, 2026

Copy link
Copy Markdown
Contributor Author

Closed in favour of musescore/muse_framework#263, which targets the project this code was migrated to.

@manolo manolo closed this Aug 31, 2026
@manolo
manolo deleted the fix-issue-21122 branch August 31, 2026 05:51
@Jojo-Schmitz

Jojo-Schmitz commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Maybe you could reopen and rebase to 4.7 (which doesn't use muse_framework)?

@manolo
manolo restored the fix-issue-21122 branch September 1, 2026 10:49
@manolo manolo reopened this Sep 1, 2026
@manolo
manolo changed the base branch from main to 4.7 September 1, 2026 10:49
Only the *_SECTION variants had tremolo entries, so violin, viola, violoncello and contrabass fell back to the default arco sound with SF2 soundfonts.

Fixes: musescore#21122
@manolo

manolo commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

@Jojo-Schmitz reopened, rebased and retargeted to 4.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs design approval Feature/change requests that need a go/no-go from the design team before being worked on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Multichannel instruments don't select correct midi preset for tremolo on SF2 fonts

6 participants