Chord symbols attached to fret diagrams don't play back

• May 7, 2020 - 13:13
Reported version
3.x-dev
Priority
P1 - High
Type
Functional
Frequency
Once
Severity
S3 - Major
Reproducibility
Always
Status
closed
Regression
No
Workaround
Yes
Project

OS: Windows 10 (10.0), Arch.: x86_64, MuseScore version (64-bit): 3.5.0.11614, revision: 1ee2fe3

Only stand-alone chord symbols play back, chord symbols attached to fret diagrams don't. This is a major drawback for those (guitarists etc) who use a mixture of fret diagrams and chord symbols in their scores.


Comments

The fix for that issue wasn't something that caused this issue - this issue already existed. That fix was just to get it into a state where it didn't crash - extra work needs to be done to get it to actually function :)

Anyhow, I'll take a look at this issue.

The code for chord symbol playback was written at a time when chord symbols attached the fret diagrams weren't a thing yet. So probably the playback code is just not seeing them. Most likely it just loops through segment checking annotations for Harmony objects, but it needs to also look for FretDiagram objects and see if they have their own Harmony objects.

Actually using the 'normal' chord symbol playback here would be just a (rather lame) workaround, as the fretboard diagram (along with the string data) gives an exact voicing (and so there's no need at all to be able to influence that via Style settings or Inspector). So we'd rather need a fretboard diagram playback here.
Still, lacking that using the existing Chord symbols playback is better than just ignoring it.

True enough. But I suspect that would be quite a bit more work than fixing a couple of lines in the loop that tries to find harmony elements for a segment. @TheOtherJThistle , were you still looking at this? Pretty sure it's just the couple of places where renderHarmony() is called in rendermidi.cpp, we need to look for fret diagrams too.

If you are on 3.5 (alpha currently) and enable chord symbol playback in Edit / Preferences / Note Input, then yes, they play, except when attached to fret diagrams.

Status PR created fixed

Fixed in branch 3.x, commit e7d54f4d58

_fix #305069: playback of chord symbols attached to fret diagrams

The code for chord symbol playback was written before
we added the ability to attach chord symbols directly to fret diagrams.
In order to support playback of these chord symbols,
the following changes are made here:
- the loops through segment annotations looking for harmony objects
checks for fret diagrams if no harmony object is found directly
- we canot assume the parent of a harmony object is a segment_

Status closed active

OS: Windows 10 (10.0), Arch.: x86_64, MuseScore version (64-bit): 3.5.0.11614, revision: 1ee2fe3

Chord symbols attached to fret diagrams still don't play back. Also …

  1. Open the attached score. Notice that the chord symbols don't sound when you click on them.
  2. Now add any chord symbol to the first empty measure.

Result (unexpected): The chord symbols now play back when you click on them—but still don't sound on playback.

Attachment Size
chord_symbol_issue.mscz 5.54 KB
Workaround No Yes

Can't reproduce the unexpected result, as soon as I add a chord symbol to the first empty measure all chord symbols play back.
So that serves as a workaround.

The problem seems to be that the chord symbols only seems to get created if there is a 'normal' chord symbols, not for those attach to fretboard diagrams. (Check the mixer)

To clarify:

  • If the score contains only fretboard diagrams with attached chord symbols: There is no sound when you click on the attached chord symbols, nor is there any sound when you press the play button.
  • If the score contains Fretboard diagram with attached chord diagrams AND separate chord symbols: The fretboard chord symbols sound when you click on them but still do not sound when you press the play button.

Separate chord symbols are not affected.

If the score contains Fretboard diagram with attached chord diagrams AND separate chord symbols: The fretboard chord symbols sound when you click on them but still do not sound when you press the play button.
They do play for me in either case

Attachment Size
chord_symbol_issue.mscz 5.73 KB
Priority P1 - High

It seems the Harmony channel is never generated unless there is a standalone chord symbol. So indeed, no playback of chord symbols attached to fret diagrams without a standalone chord symbol. But for me it plays just fine if there is a standalone chord symbol somewhere in the score, I can't reproduce any problem otherwise.

OS: Windows 10 (10.0), Arch.: x86_64, MuseScore version (64-bit): 3.5.0.12238, revision: a3e23d6

Fretboard chord symbols play back OK in this nightly (as long as there's a standalone chord symbol): 3.5.0.12238, revision: a3e23d6

Do you have "Play chord symbol when editing" enabled (in addition to "Play chord symbols")? Without indeed they won't play, seems a separate bug to me, possible related though.
And I can't reliably reproduce that either...

I believe Part::harmonyCount() might be the culprit, as only if that returns something greater than 0 (and no channel yet exists) a channel gets generated. As as far as I can tell it only checks whether Segment::annotations() sees a ElementType::HARMONY in the part, but not whether there is a fretboard diagram with a harmony

Fix version
3.5.0