Skip to content

Commit fcb1a7a

Browse files
committed
Fix tremolo articulation mapping for individual string instruments
- 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
1 parent 2e84dba commit fcb1a7a

File tree

1 file changed

+19
-3
lines changed
  • src/framework/audio/engine/internal/synthesizers/fluidsynth

1 file changed

+19
-3
lines changed

src/framework/audio/engine/internal/synthesizers/fluidsynth/soundmapping.h

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -923,7 +923,11 @@ inline const ArticulationMapping& articulationSounds(const mpe::PlaybackSetupDat
923923
{ mpe::ArticulationType::SnapPizzicato, midi::Program(20, 45) },
924924
{ mpe::ArticulationType::Pizzicato, midi::Program(20, 45) },
925925
{ mpe::ArticulationType::PalmMute, midi::Program(20, 45) },
926-
{ mpe::ArticulationType::Mute, midi::Program(20, 40) }
926+
{ mpe::ArticulationType::Mute, midi::Program(20, 40) },
927+
{ mpe::ArticulationType::Tremolo8th, midi::Program(20, 44) },
928+
{ mpe::ArticulationType::Tremolo16th, midi::Program(20, 44) },
929+
{ mpe::ArticulationType::Tremolo32nd, midi::Program(20, 44) },
930+
{ mpe::ArticulationType::Tremolo64th, midi::Program(20, 44) },
927931
};
928932

929933
static const ArticulationMapping VIOLA_SECTION = {
@@ -941,7 +945,11 @@ inline const ArticulationMapping& articulationSounds(const mpe::PlaybackSetupDat
941945
{ mpe::ArticulationType::SnapPizzicato, midi::Program(30, 45) },
942946
{ mpe::ArticulationType::Pizzicato, midi::Program(30, 45) },
943947
{ mpe::ArticulationType::PalmMute, midi::Program(30, 45) },
944-
{ mpe::ArticulationType::Mute, midi::Program(30, 41) }
948+
{ mpe::ArticulationType::Mute, midi::Program(30, 41) },
949+
{ mpe::ArticulationType::Tremolo8th, midi::Program(30, 44) },
950+
{ mpe::ArticulationType::Tremolo16th, midi::Program(30, 44) },
951+
{ mpe::ArticulationType::Tremolo32nd, midi::Program(30, 44) },
952+
{ mpe::ArticulationType::Tremolo64th, midi::Program(30, 44) },
945953
};
946954

947955
static const ArticulationMapping VIOLONCELLO_SECTION = {
@@ -959,7 +967,11 @@ inline const ArticulationMapping& articulationSounds(const mpe::PlaybackSetupDat
959967
{ mpe::ArticulationType::SnapPizzicato, midi::Program(40, 45) },
960968
{ mpe::ArticulationType::Pizzicato, midi::Program(40, 45) },
961969
{ mpe::ArticulationType::PalmMute, midi::Program(40, 45) },
962-
{ mpe::ArticulationType::Mute, midi::Program(40, 49) }
970+
{ mpe::ArticulationType::Mute, midi::Program(40, 49) },
971+
{ mpe::ArticulationType::Tremolo8th, midi::Program(40, 44) },
972+
{ mpe::ArticulationType::Tremolo16th, midi::Program(40, 44) },
973+
{ mpe::ArticulationType::Tremolo32nd, midi::Program(40, 44) },
974+
{ mpe::ArticulationType::Tremolo64th, midi::Program(40, 44) },
963975
};
964976

965977
static const ArticulationMapping CONTRABASS_SECTION = {
@@ -978,6 +990,10 @@ inline const ArticulationMapping& articulationSounds(const mpe::PlaybackSetupDat
978990
{ mpe::ArticulationType::Pizzicato, midi::Program(50, 45) },
979991
{ mpe::ArticulationType::PalmMute, midi::Program(50, 45) },
980992
{ mpe::ArticulationType::Mute, midi::Program(50, 43) },
993+
{ mpe::ArticulationType::Tremolo8th, midi::Program(50, 44) },
994+
{ mpe::ArticulationType::Tremolo16th, midi::Program(50, 44) },
995+
{ mpe::ArticulationType::Tremolo32nd, midi::Program(50, 44) },
996+
{ mpe::ArticulationType::Tremolo64th, midi::Program(50, 44) },
981997
};
982998

983999
static const ArticulationMapping BRASS = {

0 commit comments

Comments
 (0)