Skip to content

Keep the nominal dynamic when layered articulations carry no expression pattern - #179

Open
manolo wants to merge 1 commit into
musescore:mainfrom
manolo:fix-layered-articulation-dynamics
Open

Keep the nominal dynamic when layered articulations carry no expression pattern#179
manolo wants to merge 1 commit into
musescore:mainfrom
manolo:fix-layered-articulation-dynamics

Conversation

@manolo

@manolo manolo commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Resolves: musescore/MuseScore#33256

When a note has two or more articulations and none carries an expression pattern (a slurred tremolo, a slurred acciaccatura), ArticulationMap::calculateAverage counted the empty patterns as dynamics of 0 and produced a non-empty all-zero curve, which Fluid and VST read as near-silence. Count a dynamic change only for articulations that actually carry a pattern, so the averaged curve stays empty and the nominal dynamic is used. Adds regression tests for both cases.

  • I signed the CLA as manolo:
  • 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.
  • I understand all aspects of the code I'm contributing and I'm able to explain it if requested.
  • The code compiles and runs on my machine, preferably after each commit individually. I have manually tested and verified that my changes fulfil their intended purpose.
  • No prior attempts to resolve this problem exist, or if they do, I listed them in my PR description and described how I avoided repeating past mistakes.
  • There are no unnecessary changes.
  • I created a unit test or vtest to verify the changes I made (if applicable).

@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@manolo, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 57 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 3daef44d-4c20-43a0-a242-6f26ddc1b140

📥 Commits

Reviewing files that changed from the base of the PR and between 8de3a41 and c91ea1f.

📒 Files selected for processing (2)
  • framework/mpe/mpetypes.h
  • framework/mpe/tests/multinotearticulationstest.cpp
📝 Walkthrough

Walkthrough

ArticulationMap::calculateAverage now counts dynamic changes only when the dynamic offset map is populated and the maximum amplitude is non-natural. New regression tests cover slurred tremolo and slurred acciaccatura with arrangement-only articulations. The tests verify that averaged dynamic data and the note expression curve remain empty when expression patterns are empty.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the fix for preserving nominal dynamics when layered articulations have no expression pattern.
Description check ✅ Passed The description identifies the issue, explains the cause and fix, links the issue, and completes the required checklist.
Linked Issues check ✅ Passed The implementation addresses issue #33256 by preventing empty articulation patterns from suppressing playback, with regression tests for slurred acciaccatura.
Out of Scope Changes check ✅ Passed The code change and regression tests directly support the linked playback bug and do not introduce unrelated changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

…on pattern

When a note has two or more articulations and none of them defines an
expression pattern (for example a slurred tremolo, which applies Legato plus
Tremolo, or a slurred acciaccatura), the averaging counted each empty pattern
as an explicit dynamic of 0 and wrote an all-zero but non-empty averaged
dynamic-offset map. Fluid and VST then use that non-empty curve's max amplitude
(0) instead of the note's nominal dynamic and play near-silence.

Count a dynamic change only for articulations that actually carry a dynamic
pattern, matching sumUpOffsets, so an all-empty combination leaves the averaged
curve empty and the nominal dynamic is used.

Add regression tests for the slurred tremolo and slurred acciaccatura cases.

Resolves: musescore/MuseScore#33256
@manolo
manolo force-pushed the fix-layered-articulation-dynamics branch from 8de3a41 to c91ea1f Compare August 3, 2026 09:37
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.

Acciaccatura won't play and affects the main note when slurred (MS Basic)

1 participant