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

fix #22336 - mute technique incorrectly maps to pizz strings #22693

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wizofaus
Copy link
Contributor

@wizofaus wizofaus commented May 6, 2024

Resolves: #22336

Fix issue with MS Basic where by "mute" playing technique caused strings to play back as pizzicato (also fixed woodwinds not to play back as muted trumpet)

  • 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)

@@ -997,7 +997,9 @@ inline const ArticulationMapping& articulationSounds(const mpe::PlaybackSetupDat
}

if (setupData.category == mpe::SoundCategory::Winds) {
return WINDS;
if (setupData.id == mpe::SoundId::Horn || setupData.id >= mpe::SoundId::Tuba) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

slight kludge, but at least it prevents all known woodwind instruments from using "muted trumpet" sound when marked as muted.

@wizofaus wizofaus force-pushed the fix_mute_sound_mapping branch 4 times, most recently from aa579e9 to 940c1a4 Compare May 6, 2024 04:30
@@ -3842,7 +3842,7 @@
"Mute": [
{
"arrangementPattern": {
"durationFactor": 8000,
"durationFactor": 9900,
Copy link
Contributor Author

@wizofaus wizofaus May 6, 2024

Choose a reason for hiding this comment

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

no reason for muted notes not to have standard playback duration (you couldn't tell when it was using pizzicato strings!)

@@ -1000,7 +1000,10 @@ inline const ArticulationMapping& articulationSounds(const mpe::PlaybackSetupDat
}

if (setupData.category == mpe::SoundCategory::Winds) {
return WINDS;
soundId = setupData.soundId();
if (soundId == mpe::SoundId::Horn || (int)soundId >= (int)mpe::SoundId::Tuba) {
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be better to add std::unordered_set<SoundId> and explicitly specify there SoundId for which we want to use BRASS

Copy link
Contributor Author

@wizofaus wizofaus May 20, 2024

Choose a reason for hiding this comment

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

I agree, just that that's a bigger change that would require more discussion. Happy to change if you can supply a list of instruments that everyone agrees it makes sense to use the "mute trumpet" sound for.

Copy link
Contributor

Choose a reason for hiding this comment

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

This change is not that big... You already specified the list, but you did it implicitly using this condition: (int)soundId >= (int)mpe::SoundId::Tuba. However, it is rather unreliable because it depends on the order of items in the SoundId enum

@@ -1000,7 +1000,10 @@ inline const ArticulationMapping& articulationSounds(const mpe::PlaybackSetupDat
}

if (setupData.category == mpe::SoundCategory::Winds) {
return WINDS;
soundId = setupData.soundId();
Copy link
Contributor

Choose a reason for hiding this comment

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

This doesn't do anything

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it mostly certain does!

Copy link
Contributor

Choose a reason for hiding this comment

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

what exactly?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

are you saying that at this point, soundId already has that value? When I looked that didn't seem to be true in all cases

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, it has the correct value. We declare it here:
Screenshot 2024-05-20 at 11 56 41

@wizofaus wizofaus force-pushed the fix_mute_sound_mapping branch 2 times, most recently from e982c46 to c0b0992 Compare May 20, 2024 09:11
@zacjansheski
Copy link
Contributor

Tested on MacOS 14, Windows 11, Ubuntu 22.04.3. Approved
#22336 FIXED

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mute / con sord. sounds like pizzicato on bowed strings
3 participants