From fcb1a7af99eb2db302dc04cc92caf71488937b1f Mon Sep 17 00:00:00 2001 From: Manolo Carrasco Date: Mon, 10 Nov 2025 12:25:18 +0100 Subject: [PATCH] Fix tremolo articulation mapping for individual string instruments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add missing tremolo articulation mappings to individual VIOLIN, VIOLA, VIOLONCELLO, and CONTRABASS - Previously only *_SECTION variants had tremolo mappings, causing tremolo to fall back to default arco sound - Individual instruments now correctly map tremolo to program 44 on their respective banks (20, 30, 40, 50) - Fixes issue #21122: Multichannel instruments don't select correct midi preset for tremolo on SF2 fonts Affected mappings: - VIOLIN: Added Tremolo8th/16th/32nd/64th → midi::Program(20, 44) - VIOLA: Added Tremolo8th/16th/32nd/64th → midi::Program(30, 44) - VIOLONCELLO: Added Tremolo8th/16th/32nd/64th → midi::Program(40, 44) - CONTRABASS: Added Tremolo8th/16th/32nd/64th → midi::Program(50, 44) Now string instruments (violin, viola, violoncello, contrabass) correctly select tremolo MIDI presets when using SF2 soundfonts. Changes made: 1. Updated soundmapping.h: - Added missing tremolo articulation mappings for individual instruments - VIOLIN: Bank 20, Program 44 - VIOLA: Bank 30, Program 44 - VIOLONCELLO: Bank 40, Program 44 - CONTRABASS: Bank 50, Program 44 Fixes: #21122 --- .../synthesizers/fluidsynth/soundmapping.h | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/src/framework/audio/engine/internal/synthesizers/fluidsynth/soundmapping.h b/src/framework/audio/engine/internal/synthesizers/fluidsynth/soundmapping.h index 8f3761af6bf61..be1ff0a9ed7ae 100644 --- a/src/framework/audio/engine/internal/synthesizers/fluidsynth/soundmapping.h +++ b/src/framework/audio/engine/internal/synthesizers/fluidsynth/soundmapping.h @@ -923,7 +923,11 @@ inline const ArticulationMapping& articulationSounds(const mpe::PlaybackSetupDat { mpe::ArticulationType::SnapPizzicato, midi::Program(20, 45) }, { mpe::ArticulationType::Pizzicato, midi::Program(20, 45) }, { mpe::ArticulationType::PalmMute, midi::Program(20, 45) }, - { mpe::ArticulationType::Mute, midi::Program(20, 40) } + { mpe::ArticulationType::Mute, midi::Program(20, 40) }, + { mpe::ArticulationType::Tremolo8th, midi::Program(20, 44) }, + { mpe::ArticulationType::Tremolo16th, midi::Program(20, 44) }, + { mpe::ArticulationType::Tremolo32nd, midi::Program(20, 44) }, + { mpe::ArticulationType::Tremolo64th, midi::Program(20, 44) }, }; static const ArticulationMapping VIOLA_SECTION = { @@ -941,7 +945,11 @@ inline const ArticulationMapping& articulationSounds(const mpe::PlaybackSetupDat { mpe::ArticulationType::SnapPizzicato, midi::Program(30, 45) }, { mpe::ArticulationType::Pizzicato, midi::Program(30, 45) }, { mpe::ArticulationType::PalmMute, midi::Program(30, 45) }, - { mpe::ArticulationType::Mute, midi::Program(30, 41) } + { mpe::ArticulationType::Mute, midi::Program(30, 41) }, + { mpe::ArticulationType::Tremolo8th, midi::Program(30, 44) }, + { mpe::ArticulationType::Tremolo16th, midi::Program(30, 44) }, + { mpe::ArticulationType::Tremolo32nd, midi::Program(30, 44) }, + { mpe::ArticulationType::Tremolo64th, midi::Program(30, 44) }, }; static const ArticulationMapping VIOLONCELLO_SECTION = { @@ -959,7 +967,11 @@ inline const ArticulationMapping& articulationSounds(const mpe::PlaybackSetupDat { mpe::ArticulationType::SnapPizzicato, midi::Program(40, 45) }, { mpe::ArticulationType::Pizzicato, midi::Program(40, 45) }, { mpe::ArticulationType::PalmMute, midi::Program(40, 45) }, - { mpe::ArticulationType::Mute, midi::Program(40, 49) } + { mpe::ArticulationType::Mute, midi::Program(40, 49) }, + { mpe::ArticulationType::Tremolo8th, midi::Program(40, 44) }, + { mpe::ArticulationType::Tremolo16th, midi::Program(40, 44) }, + { mpe::ArticulationType::Tremolo32nd, midi::Program(40, 44) }, + { mpe::ArticulationType::Tremolo64th, midi::Program(40, 44) }, }; static const ArticulationMapping CONTRABASS_SECTION = { @@ -978,6 +990,10 @@ inline const ArticulationMapping& articulationSounds(const mpe::PlaybackSetupDat { mpe::ArticulationType::Pizzicato, midi::Program(50, 45) }, { mpe::ArticulationType::PalmMute, midi::Program(50, 45) }, { mpe::ArticulationType::Mute, midi::Program(50, 43) }, + { mpe::ArticulationType::Tremolo8th, midi::Program(50, 44) }, + { mpe::ArticulationType::Tremolo16th, midi::Program(50, 44) }, + { mpe::ArticulationType::Tremolo32nd, midi::Program(50, 44) }, + { mpe::ArticulationType::Tremolo64th, midi::Program(50, 44) }, }; static const ArticulationMapping BRASS = {