Skip to content

Fix quarter tone bend on TAB#32013

Open
mike-spa wants to merge 8 commits intomusescore:masterfrom
mike-spa:fixQuarterToneBendOnTab
Open

Fix quarter tone bend on TAB#32013
mike-spa wants to merge 8 commits intomusescore:masterfrom
mike-spa:fixQuarterToneBendOnTab

Conversation

@mike-spa
Copy link
Contributor

@mike-spa mike-spa commented Feb 3, 2026

Resolves: #31109

UPDATE. Microtonal bends work based on microtonal accidentals. If there is at least one notation staff, the information about accidentals propagates to TAB staff too. But if there isn't, TAB staves don't support any accidental logic, therefore microtonal bends don't work. This PR adds the "cent offset" information to notes themselves (as opposed to just inferring it from the accidental) which is anyway a necessary step to support microtonal music in future.

@davidstephengrant
Copy link
Contributor

This is still not working correctly.

Screenshot From 2026-02-04 12-28-39 1. Bend set to 3/4 in the Properties panel: draws as 1 1/4 in the score.
Screenshot From 2026-02-04 12-31-40 2. Bend set to 1/4 in the Properties panel: draws as 3/4 in the score.
Screenshot From 2026-02-04 12-33-35 3. Switch to standard staff type. Result: Expected 1/4 bend is drawn in score, but has changed to 3/4 in the properties panel.
Screenshot From 2026-02-04 12-34-27 4. Set the bend interval to 1/4, and notice that spacing changes slightly, although the drawn accidental doesn't change.
Screenshot From 2026-02-04 12-36-24 5. Change back to TAB staff. Both score and properties panel show 3/4 bend where 1/4 is expected.

@mike-spa mike-spa force-pushed the fixQuarterToneBendOnTab branch from 73d99ea to 324b952 Compare February 5, 2026 11:14

enum class QuarterOffset : unsigned char {
QUARTER_FLAT,
enum class QuarterOffset {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
enum class QuarterOffset {
enum class QuarterOffset : signed char {

break;
case ElementType::ACCIDENTAL:
m_accidental = toAccidental(e);
m_centOffset = Accidental::subtype2centOffset(toAccidental(e)->accidentalType());
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it worth changing all existing usage of Accidental::subtype2centOffset to use the note's centOffset property now? eg. in Note::playingTuning and TLayout::layoutNoteAnchoredLine?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Almost certainly yes, but I'd rather do that after the release so that we keep these changes as confined as possible for now

Copy link
Contributor

@miiizen miiizen left a comment

Choose a reason for hiding this comment

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

Looks good! Also glad we're making a step in the right direction for better tuning support

@davidstephengrant
Copy link
Contributor

There is still a problem changing staff type.

Screenshot From 2026-02-05 13-02-59 1. Set bend interval to 1/4.
Screenshot From 2026-02-05 13-06-45 2. Switch to standard staff. RESULT: a regular semitone accidental is drawn, not the expected microtonal accidental.
Screenshot From 2026-02-05 13-14-11 3. Undo _Set staff type_. RESULT: The bend has been changed to 1/2.

Note: This only seems to happen when switching from TAB to standard staff type - not vice versa. I.e., explicitly setting a microtonal bend on a standard staff and switching to TAB appears to be working correctly.

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.

Quarter tone pre-bend can not be set on tablature only guitar

4 participants