Chord Symbol Playback Feature

• Jun 23, 2020 - 19:28

I am glad to see the new chord symbol playback feature in MuseScore 3.5 Beta.
I know it might be a disturbance, but I would like to share my chord parser written last year. I will be glad if I could inspire MuseScore programmers by this chord parser.
MuseScore chordlist.cpp: https://github.com/musescore/MuseScore/blob/master/libmscore/chordlist…
My chord parser: https://github.com/graphemecluster/graphemecluster.github.io/blob/maste…


Comments

Thanks for the comments! The MuseScore parser performs many functions, including building a MusicXML representation and also the raw material for the graphical rendering engine, as well as supporting the new playback engine. Can you explain what in particular your parser does that MuseScore's does not?

In reply to by Marc Sabatella

My chord parser was designed to parser all the chords appear in a long text, which is not the case in MuseScore, and unfortunately, it almost functions the same as the MuseScore's one except that it parses other non-ASCII characters and roman numerals.

Despite the above, this parser supports spaces, non-abbreviation keywords like "augmented" or "seventh", the keyword "dom" or "dominant" (and also "Mm7" which are all the equivalent of "7"), omitting "root" or "1", "5" and/or "6" and/or "7" at the same time, the neutral sign "♮", and an unlimited number of accidentals, though most of them may be unnecessary to MuseScore.

(Roman numerals are just treated as they are note names, i.e. case are ignored. That file assume C = I, but there are other versions which seperate out note names and roman numerals.)

P.S. The MuseScore's parser does not parse "C-5" (but it does parse "C(-5)" or "Cm-5").

In reply to by graphemecluster

So, are you say your parser handles multiple chords in a single text string? Separated by spaces perhaps, then? What about slash chords (A7/C#)?

Our parser could be extended to allow augmented, dominant, etc, if there were many user requests for that.

Not sure what you mean about C-5, our parser understands this as I would, a "nonsense chord" of C minor with no fifth (a power chord, which is neither major nor minor really). C(-5) is something very different, C major with a lowered fifth.

In reply to by Marc Sabatella

You totally misunderstand my meaning. Firstly, this parser supports all chords that MuseScore's one is supporting, including slash chords. For example both "A flat dominant seventh on C, D flat add ninth" and "ab7/cdadd9" returns [[C,Eb,Gb,Ab],[Db,Eb,F,Ab]].

I said this parser "almost functions the same as the MuseScore's one." So if you think it is enough you can just ignore this thread.

And by saying C-5 I just mean that it should be interpreted as C(-5), C major with a lowered fifth.

In reply to by graphemecluster

It's almost certainly true that I misunderstood your meaning, that's why I am asking questions :-). The main one I am trying to understand is, what are you actually proposing here, what the real world benefit would be.

As I mentioned, our parser does much more than just return a list of notes, it also builds the MusicXML data structures and a representation that controls how the chord to be rendered the chords visually, etc. And of course, MuseScore is written in C++. So in order to make use of your algorithm, it would need to be completely rewritten and greatly expanded to meet our needs. I'm not saying that could never happen, but more interesting to me would be to understand the real world advantages to your parser, and to see if those features can be incorporated into ours, as that would almost certainly be a lot less work.

So for instance, MuseScore doesn't have a need to parse two chord symbols in the same string - our data structures are based on a single chord symbol at a time. But if you have some real world case for wanting to see the word "dominant" spelled out, it's trivial to add support for that. BTW, we already do allow "major" and "minor" to be spelled out.

For C-5, I'd disagree with your proposed interpretation. C-9 is C minor ninth, C-9 is C minor fifth. That's how anyone I know would interpret it. "-" is not normally recommend to mean lowering a chord tone, but in the places where it is used, it would never be used directly after the root because then it would mean something else. Just like Gb9 means Gb (dominant) ninth, not G (triad) flat-ninth.

In reply to by Marc Sabatella

I am sorry that I am busy so I will give a short reply. Actually I do not think that this will benefit MuseScore a lot, but I created this thread with a hope that it may help a little; a little is better than nothing. Yes, my code was in JavaScript, and I will not have time to convert it to C++. It would be better if I wrote this a few years ago. Thank you for understanding my poor English and sorry but I am going to stop here.

Do you still have an unanswered question? Please log in first to post your question.