Use named noteheads without accidentals for double/triple sharps/flats#34242
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughExtended 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsLinked repositories: Public OSS repositories can only analyze public repositories installed in this organization. No linked repositories were analyzed; skipped 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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/engraving/dom/note.cpp (1)
465-499: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueFix typographical error in the comment.
There is a minor typo in the comment on line 467. "rather that" should be "rather than".
📝 Proposed fix
// for TPCs that don't have their own heads (i.e. with 2 or 3 accidentals), // fall back to using the corresponding ones without accidentals - // rather that using the (smaller!) normal noteheads + // rather than using the (smaller!) normal noteheads } else if (tpc == Tpc::TPC_A_SS || tpc == Tpc::TPC_A_SSS) {🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/engraving/dom/note.cpp` around lines 465 - 499, Correct the typo in the fallback notehead comment near the TPC handling branches, changing “rather that” to “rather than” without modifying the surrounding logic.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@src/engraving/dom/note.cpp`:
- Around line 465-499: Correct the typo in the fallback notehead comment near
the TPC handling branches, changing “rather that” to “rather than” without
modifying the surrounding logic.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 3bdf151b-4cff-42dd-8201-8f4d6ff21b83
📒 Files selected for processing (1)
src/engraving/dom/note.cpp
5fe326a to
61b1a67
Compare
@coderabbitai: Of course, fixed |
|
Tip For best results, initiate chat on the files or code changes.
If you found this review helpful, would you consider giving us a shout-out on X? Thank you for using CodeRabbit! |
61b1a67 to
471b664
Compare
471b664 to
6d6a640
Compare
|
In (the botched and meahwhile closed #34244) @coderabbitai suggested to use |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
echo '=== PR `#34244` review comments mentioning switch/case ==='
gh api --paginate \
repos/musescore/MuseScore/pulls/34244/comments \
--jq '.[] | select((.body // "") | test("switch|case"; "i")) |
{path, line, original_line, user: .user.login, body, html_url}'
echo
echo '=== Outline: current note.cpp ==='
ast-grep outline src/engraving/dom/note.cpp --items all --type function --match 'noteHead'
echo
echo '=== Current Note::noteHead pitch-name section ==='
rg -n -A110 -B12 'NoteHeadGroup Note::noteHead\(' src/engraving/dom/note.cppLength of output: 1288 🏁 Script executed: #!/bin/bash
set -u
echo '=== PR `#34244` submitted reviews ==='
gh api --paginate repos/musescore/MuseScore/pulls/34244/reviews \
--jq '.[] | {user: .user.login, state, body, html_url}' || true
echo
echo '=== PR `#34244` inline review comments ==='
gh api --paginate repos/musescore/MuseScore/pulls/34244/comments \
--jq '.[] | {path, line, original_line, user: .user.login, body, html_url}' || true
echo
echo '=== PR `#34244` conversation comments ==='
gh api --paginate repos/musescore/MuseScore/issues/34244/comments \
--jq '.[] | {user: .user.login, body, html_url}' || true
echo
echo '=== Note::noteHead implementation, Lines 336–540 ==='
sed -n '336,540p' src/engraving/dom/note.cppLength of output: 22173
A I also withdraw the “slightly improve execution performance” rationale: that is not established here. A compiler may produce equivalent code, and it would need measurement to justify a performance claim. So my recommendation is:
🔍🐇 |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
repo="musescore/MuseScore"
printf '%s\n' '=== Referenced PR `#34244` review comments ==='
gh api "repos/${repo}/pulls/34244/comments?per_page=100" --paginate \
--jq '.[] | select(.user.login == "coderabbitai" or (.body | test("switch|case|else if"; "i"))) | {path, line, original_line, body, html_url}'
printf '%s\n' '=== Current note.cpp outline ==='
ast-grep outline src/engraving/dom/note.cpp --items all --type function --match 'noteHead'
printf '%s\n' '=== Current pitch-name scheme logic ==='
rg -n -C 12 'NoteHeadGroup Note::noteHead|PITCHNAME|PITCH_NAME|case Tpc::|if \(.*tpc|else if' src/engraving/dom/note.cppLength of output: 37324
A So: no strong maintainability benefit from changing it now. I would only choose Also, the accessible comment on |
|
@coderabbitai: that |
|
Tip For best results, initiate chat on the files or code changes.
group = german ? NoteHead::Group::HEAD_H : NoteHead::Group::HEAD_B;The same applies to the |
|
Human reviewers' opnions on that? @ajuncosa ? |
|
Thanks @Jojo-Schmitz, this is nice for the two no accidentals schemes, but for regular Pitch names and German pitch names (with accidentals) we should still fall back to default noteheads. |
|
Why? IMHO a named notehead without an accidental is better than none (and would fix the isssue as a side effect) |
6d6a640 to
8f3c7fc
Compare
|
OK, then a) use them only for the two no accidentals schemes and b) don't (yet) fix #34229 |
8f3c7fc to
c0f51ef
Compare
if using one of the two new "no accidental" settings Backport of musescore#34242 and musescore#34245
|
@Jojo-Schmitz Thanks for this! My human opinion:
|
if using one of the two new "no accidental" settings Backport of musescore#34242 and musescore#34245
c0f51ef to
5bf06ff
Compare
if using one of the two new "no accidental" settings
5bf06ff to
b2b51e0
Compare
if using one of the two new "no accidental" settings Backport of musescore#34242 and musescore#34245
|
Tested and approved on Ubuntu 24.04.4 LTS. |
if using one of the two new "no accidental" settings Backport of musescore#34242 and musescore#34245

if using one of the two new "no accidental" settings