Feedback for plugin: Chord ID

• Feb 21, 2023 - 16:36

Comments

This is a very good plugin, usable even on big scores.
For MS4, perhaps you could add a description and a title?
This does not seem to work (on Linux)
chordDialog.title = chordDialog.menuPath.replace('Plugins.','')
i changed it to
chordDialog.title = "ChordID";
Works fine on MS4 Linux

This

  property var dangerousexit
  Component.onCompleted:{
    dangerousexit=function(){Qt.quit()}
    if (mscoreMajorVersion >= 4) {
      dangerousexit=function(){quit()}

is quite tricky, but not needed at all as Qt.quit() is wrong in any case (just in Mu3 doesn't lead to crashes).
if you insist on keeping it and just want to avoid the warning thet quit() gives un Mu3, @mirabilos came up with a nice trick:

     (typeof(quit) === 'undefined' ? Qt.quit : quit)();

In reply to by Jojo-Schmitz

Thank you @graffesmusic and @Jojo-Schmitz for reporting that bug, so MS4 does not support the assignment of menuPath. How is the color picker working on linux? QML documentation isn't very clear.

@Jojo-Schmitz thanks for your comment and tips on quit(). I'd remove all of them but the original plugin is 'dialog' and I need to close the plugin window. The typeof trick from @mirabilos is smart !

In reply to by graffesmusic

Yea I noticed that too, made a careless mistake causes that regression, updated just now, pls try the 230222D.zip

Thanks for the screenshot, the Linux color picker is much more intuitive.

Makes me think, how should a amateur coder deliver stable / test version of a tiny project such as this, without overcomplicating the matter?

In reply to by msfp

Please note that the latest version does not work on MS4 (loop).
On MS3 it works fine.
2023-02-23T12:14:08.211 | ERROR | main_thread | AppShell | run: error: file:///home/charles/Documents/MuseScore4Development/Plugins/musescore_chordid/ChordID.qml:703:5: QML Flow: Flow called polish() inside updatePolish() of Flow

2023-02-23T12:14:08.211 | WARN | main_thread | Qt | file:///home/charles/Documents/MuseScore4Development/Plugins/musescore_chordid/ChordID.qml:703:5: QML Flow: Flow called polish() inside updatePolish() of Flow

In reply to by msfp

Updated, should be fine now. with a responsive interface.
Its seems though in ms4 responsive interface requires manual window resizing at each startup, maybe cos of the developmental status of underlining current plugin api.

Updated

  • Better conventional roman numeral analysis.
  • Revamp chord matching / analysis logic.
  • More user-friendly interface and functions.

Hi there,

Using the latest version of Musescore and Windows, the colour assignment for chords paints all notes in the colour most recently chosen on whatever degree, regardless of the 1st, 2nd 3rd allocation etc. Does anyone know a way to fix this? It also resets all the colours in the colour allocation sample box to that same colour when Musescore is closed and opened again.

Selfishly, it would be fantastic if this plug in had the option to include Jazz analysis, what you have so far is fantastic, just with the addition all the harmonic extensions, 7, 9, 11 and 13 plus alterations.

Thanks.

In reply to by MegaBigDank

Hi MegaBigDank,

Thank you for reporting the bugs.

Re: colour assignment bug and colour option reset bug.
Did you mean the latest musescore 4.0.2 ? I have not tried out 4.0.2 yet. The plugin is tested on musescore 3.6.2 and 4.0.1 Windows, have you tried these version? did you encounter problems with them?

Re: Jazz analysis with the extensions and alterations.
Do you have a particular chord in mind? Some chord extensions and alterations are already included. I updated the plugin overview page just now to show a part of the internal chord matching chart (scroll down to see). Feel free to edit the chart to you liking, just open the .QML files with any text editor program, the code is free, no need to ask for any permission.
I'm not familiar at all with Jazz chord extensions and which to pick in enharmonic chords such as Cadd6 or Cadd13, is there a popular set of "street rules"? I know not all extensions and alterations are created equal, I guess there's a complex and sometimes subjective decision making considering voicing and tone omission and context of the music phrase. Coding the analysis may be out of my skill level, so I just go with the previous contributors.
I'd love if you share with us your chord matching decisions and knowledge and part of the chart you unsatisfactory.

Please note that the feature of chord extensions for roman numeral eg IVsus4 are removed in this plugin.

Hello,

Thank you for this plugin.
One question.
I have a problem with inversions when using roman numerals as symbol.
When using a dominant seventh chord in first inversion the 65 are notated next to each other like V65
I would expect the 5 would be notated below the 6.
Is there a setting for that?

Kind regards,

In reply to by msfp

Hello,

It looks fine now.
Numbers are verticaly alligned.

Another small thing. (minor user interface problem on my computer)
As the plugin (not docked) is quit big the analyse button each time below my screen when starting the plugin.
So I have to move it each time up.
In the docked version the analyse button is above so I don't have to scroll with that one.
But I prefer the windowed version.

Thank you,

In reply to by Johan-v

pls try either one:

  • resize the windowed version to your screen size: open ChordID_Windowed.qml with a plain text editor, change line1644 property bool fixsize:false to property bool fixsize:true, optionally change line1647 property real customheight: Screen.desktopAvailableHeight*.5 to a desired value, save, restart musescore; or
  • open the docked version, undock it into a window by dragging the title bar or clicking the opposing-arrow button (see below); or
  • use keyboard key ENTER to start analysis ; or
  • diy layout: all you need to do is to create a <header> and relocate the button codes from <footer>, see https://musescore.org/en/node/345720#qmllearning-Dialog

    undock.PNG

In reply to by msfp

Thank you,

Works perfect.
I suppose there is not much documentation.
This plugin is above my level.
Do you think it would be easy to change chord types?
Like maj7 instead off Maj7

I also had a situation where three digits were listed horizontally instead of vertically in roman numeral.
Where can I find the line number insert code.
Maybe I can try to learn.

Kind regards and thanks again,
Johan

In reply to by Johan-v

> documentation
for plugin: Plugins for 3.x , musescore 4 plugin system is still in development
for chord id: none, just the download page

> maj7 instead off Maj7
simply change line136 "Maj7" to "maj7", musescore 3 understands and create audio correctly for both, but that's not always the case, see Chord notation systems

> three digits were listed horizontally
more info? but see https://musescore.org/en/project/chord-id-and-roman-numeral-analysis#:~…

> find the line number
some text editor software shows line number, like sublime text, or notepadpluslpus, or https://www.editpad.org/, but you don't really need that, you can instead use the search function, for example mentioned in the previous post is the first "fixsize" search result.

Having a ball hitting Chopin and Ravel piano compositions with the chord ID (Docked) plugin. My idea is to ‘jazzify’ these with jazz voicings in the left hand. It works great overall , but the chord symbols produced are not always “jazzy”, even though in the code there are 59 mentions of ‘jazz’.

I know one can debate forever about naming chords, but is there a way to choose a more jazzy result? I don’t see a choice in the GUI. Is it just a matter of modifying the chordStyles array?
There is an elusive comment there: “this array is not refer by hardcode index anymore”

This is only a minor problem as I can convert them with my Replace Chord Symbols plugin.
https://musescore.org/en/project/replace-chord-symbols

In addition I discovered a few outright errors (see below).
Meassure 1: DbMaj7 does not contain g natural
Measures 2: Does not contain b13 which would be ab
Measures 3-4: do not contain b9 nor b13
In my ‘jazz’ book these would be called as in measures 5-8
Errors2.png

Hello,

Two more small problems.

  1. chord names for aug triads use the wrong root note.
    See attached file

  2. When enabling don't close the window after analyse - the windows stays indeed but is hidden here behind the main musescore window. I can use the plugin without problem when using dual monitors.

Kind regards,
Johan

Attachment Size
aug triad problem.mscz 2.69 KB

In reply to by Johan-v

@Johan-v
Thank you for reporting!
> 1
You're right that chord is best named Ab+ rather than C+. Roots of enharmonic chords (aug and dim7) are not optimal currently, it's kind of a coding hurdle, pls see the Supplementary info below.
> 2
Thanks, I'm looking into it.

@elsewhere
Thank you for sharing your insight on jazz chord naming! I don't know much about them and would appreciate all kinds of input. I'm looking into the errors. I'd love Ravel piano pieces jazzified, couldn't really understand them anyhow.
> choose a more jazzy result.
There's no such options yet, mainly because I'm not educated in jazz chord enough. Providing GUI options is a good idea.
> modifying the chordStyles array.
Yes, pls see the Supplementary info below.
> There is an elusive comment there: “this array is not refer by hardcode index anymore”.
In Chord Identifier (Pop & Jazz) v3.4 and predecessor plugins, each ChordStyles entry has a trailing comment that contains the index, eg "Maj7" is commented "05: M7 = Major Seventh". Hardcode index integer is used internally sometimes, codes like x=5; chordStyles[x] to refer to "Maj7".
In Chord ID and Roman numeral analysis, to enable reordering ChordStyles freely, such codes are replaced with iteration and data comparison. ChordStyles entries are reordered but their trailing comments are preserved as is.
Pls be aware of the discrepancy between the real index and the old index in comment, for example the "Maj7" entry has trailing comment "05: M7 = Major Seventh" but isn't the fifth item, it's the seventh item now.

Supplementary info:

  • gist of how the plugin works (version 20230818A):
    1. gathers notes - "notes set"
    2. iterate chordStyles (line337)
    3. compare each currently enabled chordStyle with the "notes set" (line360)
    4. 37 over powerchord (line378)
    5. etc
  • for enharmonic chords, chordStyles ordering = priority because of the iteration (line337)
  • all notes are "treated equally", the plugin does not take into account the bass during analysis yet. Understanding the bass and its relationship with the key (if provided) would fix the wrong root bug of dim7 and aug, and would help improve jazz chord analysis.
  • octave position of notes are not used yet, eg b9=b2. I think it'd be great if the plugin can use octave info for jazz chord analysis, but I'm afraid it requires redesigning the fundamentals and considering when is a b2 allowed to act as a b9.
  • enharmonic notes are "treated equally", the plugin does not take hint from them yet. This is a trickier problem because composers do not always use them for harmonic reason. Check out the awesome Replace chord symbols plugin by @elsewhere.
  • if you modified chordStyles and want to run tests, there are chord samples inside yamahatest.mscz (included in the zip file downloadable under the "Extras for developers" section on the plugin page)

edit: rephrased some points

In reply to by msfp

Thank you for your answer and your interest. I enclose a sample score with mm39-58 from La Valse of Ravel, the orginal (after running Chord ID) & the “jazzified” version. It’s laborious (this took me most of the afternoon) but interesting. The good news is that without the chord ID plugin I would never have tackled this (as “too daunting”), so it’s great that the plugin got me going.
Thanks also for your comments about the code. I doubt that we could get this ‘perfect’. Some reasons:
Chord names are not unambiguous: in jazz voicings for C7 & Em7b5 are identical.
As you write: “all notes are "treated equally", the plugin does not take into account the base during analysis yet.” That could help but does not solve all problems because there are also legitimate inversions.
I’ll let you know if I get any hunch on how to tackle this
What is? (I don’t understand): “detection tests use yamahatest.mscz under "download for devs"”

RavelSample.mscz

In reply to by elsewhere

Wow, thanks for sharing your work. I've been working on the four errors. Error 2-4 are due to missing entries, I've added them and been running tests. Error 1 is quite tricky because it's due to confusion with another voicing ( the one the left hand presses 3 and 7) that proves your point on ambiguity. I went back and rephrased that sentence in the previous post.

Attachment Size
musescore_chordid_20230824test.zip 93.56 KB

In reply to by msfp

Got it now… Thanks.
Some food for thought:
In his Jazz Theory book Mark Levine says: you only need 3 scales: Major, melodic minor & dimished.

Long ago I had the idea that what makes a chord unique is the pattern of distances between the notes, and since you can have inversions one pattern also defines the inverted patterns.

Looking in these scales for unique patterns (from 2 to 6 notes) I found there are only 116 unique patterns !!! (I can send you the Excel sheet if you wish) But naming them is not easy and/or unambiguous. And of course Ravel does not limit himself to these scales… Still, looking at the chromatic scale for unique distance patterns would certainly be exhaustive, and the number might not be astronomical. I might try this “just for laughs”…

But naming them will remain a challenge. But one could go along piecemeal...

In reply to by elsewhere

Thanks for your food :)

> distances between the notes
I believe this plugin works similarly to your idea, the 3rd column (INTERVALS) of major triad chord entry (the very first entry) is [4,7], meaning 4 semitones and 7 semitones from the root.

> Looking in these scales for unique patterns (from 2 to 6 notes) I found there are only 116 unique patterns
That's in fact a good way to make sure chordStyles don't miss a pattern, but don't you miss three of them with 116? If from a major scale (DO, RE, MI ... total 7) you pick 2 notes (DO+RE, DO+MI ... ), the total number of unique combinations = 7C2, similarly for the total number of combinations picking 2-6 notes, there're 119 unique combinations, isn't it?
mathmajor.PNG
That's for major scale, finding the total for all'd be an interesting math puzzle:
If we think about the combinations for the melodic minor scale and the two different diminished scales ( ? =Octatonic scale wikipedia ?), some of their combinations would be duplicates, eg DO+RE present in both major and melodic minor scale. I can't think of how to count duplicates yet, but the final total should be simple sum minus them.
If we don't limit on these scales, and use the chromatic scale, that would be (DO, RI, RE, ME, MI ... total 11), the total number of unique combinations = astronomical 1474, the first combination would be DO+RI, 1474 "chords" that'd be pretty exhausting to name, doing so would put a smile even on Schoenberg I presume.

Anyway, these combinations do not contain inversion (bass) and note octave info, which I think is essential to solve the enharmonic chord problem.
mathchro.PNG

In reply to by msfp

Thank you for your answer.

You don’t take into account that the inversion of a chord is still that chord, and thus, in my book, not unique. For example: C-F and C-G are not different because C-G = F-C (in terms of distances)
I analyzed a Piano line from the yamahatest file and found 4 duplicates among 39 chords (see attached)
In the meantime I found that on the chromatic scale I find only 349 unique chords (from 2 to 11 notes), many probably sounding awful or unplayable. But Ravel cannot escape me now…
duplicates.png

In reply to by msfp

I had not yet clicked Show on Advanced (A-G).Thanks for that.

Yet another thing I wanted to mention: You seem satisfied naming the C7susb9 chord in my post above as C7b9. According to chord-scale theory (as explained by Mark Levine) this is not correct.
The gist of this theory is: each chord belongs to a scale, so that an improvisor seeing a chord symbol instantly knows the pool of notes he can improvise with. But that’s only a start. A notorious exception is that if you play the melody note c on G7 it sounds awful, and G7sus is more appropriate. Moreover, C7b9 belongs to the Cdim scale ( c c# eb e f# g a bb c) and does not contain f. C7susb9 on the other hand belongs to Bb melodic minor (bb c db eb f g a bb) which contains all the notes.

Not that chord-scale theory was handed down from God.

My current thinking: if the plugin can calculate the intervals and their inversions a giant table of 349 (or less) with a prefered chordname(s) attached at each line might be the way to go.
Inversions are easy enough in Excel (with inversies in the style "3423":

Sub Inversies()
Row = 2
While Cells(Row, 14) <> ""
Rows(Row & ":" & Row).Select
r = Trim(Cells(Row, 14))
s = ""
Col = 14
While s <> r
q = Cells(Row, Col)
s = Mid(q, 2) & Left(q, 1)
Col = Col + 1
If Trim(s) <> r Then Cells(Row, Col) = s
Wend
Row = Row + 1
DoEvents
Wend
End Sub

In reply to by elsewhere

Your previous post showed the difference, I agreed C7susb9 should not be named C7b9, I added the missing chordStyles entries in the testing version inside the zip file https://musescore.org/en/node/345409#comment-1205061 , I'm still working on Error1 and Johan-v's bug report so the testing version is not posted on the plugin page yet.

The plugin already creates inversions of the "note set" on the fly (line337), and compare them with chordStyles. It's just that the bass note of a "note set" does not have significance on analysis yet.

You could try modifying the chordStyles array to see if it can do zero-tolerance chord analysis. There're ~40 chordStyles entries currently so adding it up to 349 might create up to 8x impact on performance, but I doubt that'd be noticeable on a modern CPU.

Right, not from Him, He digs consonances, the perfect kind, is what we heard.

edit: added code reference

In reply to by msfp

The bass note (but also the context, e.g. F C7 A7 vs F Em7b5 A7) might indeed be a clue to which of the possible chord names to use. Also the melody note should get less weight, since on a given chord you can play many notes (as Bach showed long ago). This is lots of fun. I don't think performance will be affected. I have had plugins with tables of 6000 lines.

In reply to by msfp

For practical purposes 40 might be plenty. I have a database of 385 lead sheets that contain 17700 chords and I only use 21 ‘tails’ (see attached).
But my long-term goal would be to understand Ravel’s use of harmony (he famously quipped: “It’s like Mozart”), but nobody has made any sense of it apart from saying things like ‘polytonal’. And you can name anything of course with enough x# and yb and added z.
My hope is that by running stats on his use of the 349 I get some insight in the underlying Mozartian logic.
EDIT: Also note there is an interesting 'equivalence bewteen 7#11 and 7b13: f a b eb = F7#11(1 3 5 7b) and G7b13 (7 9 3 b13)

Attachment Size
Tail.docx 13.47 KB

In reply to by elsewhere

Plugin updated, includes bug fixes and new options to control analysis moments. Added a quickstart guide on plugin page. For the windowed version plugin, buttons are moved to the top as per suggestion from Johan-v, but I failed to figure out how to keep the plugin window on top of musescore, so the current solution is to use a 3rd party program such as https://github.com/navossoc/MenuTools. Used a note tpc value comparison trick to decide the root of enharmonic chords. Turns out I was not wrong about the role of accidentals on the root in roman numeral analysis: sharp symbol is (?should be?) used to raise the Ab in a raised submediant triad of C minor, reference, I'm still deciding on which to use.
raisedrootnotwrong.PNG

@elsewhere
Yes it's exciting to decipher HOW great composers create music, and the polytonal explanation is no helpful enough. I worked out some Chopins earlier and learnt to appreciate the double harmonic minor scale https://en.wikipedia.org/wiki/Hungarian_minor_scale . Thanks for your jazz magical equivalence info.

In reply to by msfp

Can you help me understand how your code selects the root of the chord? It’s not always the lowest note. I suppose you look at inversions. I see it in the code but cannot make sense of it.
Anyway for Ravel I put this on the backburner since it is not sure that his chords have conventional names and/or conventional roots. I have code now that collects all notes at every cursor.tick and I can map the distances to my global harmony table, and for the time being I name the harmonies after the row there, e.g. R157.
I have already a nice name for the project: “Ravel unraveled”
You mention: “a note tpc value comparison trick to decide the root of enharmonic chords.” I’d appreciate more details. I see it in the code but cannot make sense of it.
Tomorrow I start testing La Valse…

In reply to by elsewhere

“Ravel unraveled” XD, what is the opposite? Ravel the unraveled, trouble the untroubled.
Pls read the the latest version as I've refactored old codes, earlier versions have nonsense codes. This plugin uses semitones but not scale degree distance. The tpc addon is simply sorting notes and using the n-th item, see [pitch:tpc] in aug_d7.mcsz in latest dev.zip.
Pls try this special logging version on chords, feel free to point out bugs and errors.

Attachment Size
ChordID_dev.qml 95.13 KB

In reply to by elsewhere

You've got a point, all chords that highly match should be suggested, I think musicians using this plugin for harmony analysis would find them useful. If only we could decide on a simple good "cutoff matching minimum" and a way to add symbols without confusing the user - some may have not even heard of equivalent / enharmonic chords.

In reply to by msfp

I had a terrible time getting the harmonies (and the cursor) to the proper tick (selecting measures 1-2 in the left hand) , but your function addToScore came to the rescue (see measures 3-4), even though I do not understand why it works: why can I force a new cursor to a tick where the old cursor won’t go? And why because of the mysterious
c.track=cursor.track //ms3 bug ?hacky
c.rewindToTick(cursor.tick)
c.track=track //ms3 bug ?hacky

statements?

I enclose my dev version. Assignment of the harmony R values still looks buggy, but seems to work with tuplets.
AllChordsBug4.png

Attachment Size
AllChordsDev.qml 39.38 KB

In reply to by elsewhere

Congrats! If I'm not mistaken, the root may have something to do with the j in findHarmony() and the content string, but the intensive part is ahead - generate one name (or more!) for each row. That c.track comments look like mine, still no idea why it works, or when it may fail. Now that you mentioned tuplets, I haven't test them with Chord ID thoroughly, also forget about filtering out selected drum staffs.

In reply to by msfp

The placement of the chord symbols was still not quite right. The basic problem (that keeps haunting me in many of my projects) is this:

cursor.rewindToTick(x) will only work correctly if there is a segment at x. Otherwise it will put the cursor at the next available segment (in the current track) after x (see https://musescore.org/en/node/307565)

In Allchords.qml I construct an array of unique ticks & the noteset associated with this tick. But not all tracks have a segment at this tick. So I look for for the first track that has this tick and add the harmony. If this track is not in the first staff the chord symbol would be put above the corresponding staff, and not above the top staff where we want it. That’s where the addToScore logic comes in:

var c=curScore.newCursor() // get a new cursor
c.track=cursor.track // set it to the current track & tick
c.rewindToTick(cursor.tick) // which works correctly in that track
c.track=0 // now switch it to track 0
c.add (harmony)

This is a very clever trick to put the cursor in the right place in track 0, even though there is no pre-existing segment there. In your plugin the track fed to addToScore is indeed always 4 or higher.

It dawned on me that the R88 etc symbols will at best be replaced by a chord type (m7,7b9 etc) because all info about the notes is lost in the distances patterns. Could still be useful for the advanced user: you see the notes in the score.

I enclose the current version (barely tested)

Attachment Size
AllChords.qml 41.55 KB

In reply to by elsewhere

I've been skimming through the code, now I see I shouldn't select the whole score but I should select one chord right?

As for the file, I also do not buy download permission. I thought works famous and old would be public domain anyway but I was wrong so I resorted to shamelessly keying in until I'm bored: Giant_Steps.mscz not complete, might have errors

In reply to by msfp

OT: (You may know this already, but it was news to me)
I asked ellejohara, the author of the New Retrograde plugin where she gets such neat things as ‘cursor.measure.timesigActual.denominator’ (that I don’t find in the API documentation)
Her answer:
“How do I find neat things like timesig.Actual? I use a very simple function to list the content of objects in the console window:

function pre(item) {
for(var p in item)
console.log(p + ": " + item[p]);
}

That shows me all kinds of goodies. Then I just tinker…”

And indeed, if you select a measure and run:
pre(cursor.measure) you get 200+ properties of measure, among which ‘timesigActual’
If you run pre(cursor.measure. timesigActual) you get (among other things) the correct values for numerator and denominator.

With some devotion this could be used to build an improved API documentation.

P.S. Check out the latest version of her plugin. It is really elegant code.

Any chance of making the plugin so that it can detect/analyse secondary domintants of important degrees?

Also some sort of priority option where you can select if I prefer the ID of altered chords inside the scale or secondary dominants.

Sorry for bad english

In reply to by laurentVeliscek

Working on augmented sixth, I noticed that the identification of the Fre+6 was different depending of the chosen key.

I mean: the Fre+6 is spelled bVI7b5b in F major,
but the exact same chord (transposed a fifth lower) in Bb Major is spelled II431b

Don't know if it is normal, or not. But strange...

Translating those chords exact same functionnal chords in "Fre+6" would "unify" the chord analysis

In reply to by laurentVeliscek

A suggestion:

a post-process routine to translate the RNA to detect some "special" altered sixth chords.
I don't know how to code using QML language, but this routine could look like something like this:

Neapolitan Sixth chord

output = output.replace("bII6", "N6")
output = output.replace("bII", "N")

Augmented Sixth

italian Sixth

if ("no fifth in the chord" && "keyIsMinor")
output = output.replace("VI7b", "It+6")
if ("no fifth in the chord" && "keyIsMajor")
output = output.replace("bVI7b", "It+6")

German Sixth

if ("fifth in the chord" && "keyIsMinor")
output = output.replace("VI7b", Ger+6")
if ("fifth in the chord" && "keyIsMajor")
output = output.replace("bVI7b", Ger+6")

French Sixth

if ("keyIsMinor")
output = output.replace("VI7b5b", Fre+6")
if ("keyIsMajor")
output = output.replace("bVI7b5b", "Fre+6")
output = output.replace("II431b", "Fre+6")

And maybe add a check box to enable/disable this behaviour...

Not so complex to implement as it is only simple text searchAndReplace, but a useful to analyse scores and check chords...

And may be, using the same text "search and replace" method, Secondary Dominant (V/x) and Secondary Diminished Sevenths (vii°/x and viiø7/x) chords detection/translation could greatly improve the harmonic analysis.

Let me know if you need a chart with some appropriate searchAndReplace patterns to detect and translate secondary 5th and 7th dominant chords...

In reply to by laurentVeliscek

edit 2023/11/11: corrected some wrong RNA in previous post 2023/10/13

Re: secondaries

They are quite easy to spot (a Major chord where minor should have been, etc) but you're right, why not replace them automatically if we can? @laurentVeliscek's post-process search and replace method and @dnovoae's suggestion to provide options both sound nice, thank you!

  • dnovoae is correct on the point "important degrees", we'd think about what to include.
  • We'd also think carefully about the rare / possibly wrong analysis.
    smart.PNG

how about

  • secondary dominant
    VI = V/ii
    VII = V/III that is Bb in C minor = V of Eb Major
    VII = V/iii that is B in C Major = V of E minor
    I = V/IV that is C in C Major = V of F Major ?confusion coz I is most common? should skip?
    I = V/iv that is C in C minor = V of F minor ?quite farfetching ?should skip?
    II = V/V
    III = V/VI that is Eb in C minor = V of Ab Major
    III = V/vi that is E in C Major = V of A minor
    IV = V/VII that is F in C minor = V of Bb Major
    bV = V/VII that is F# in C minor = V of B Major
    V/vii that is ... = V of B minor . skipped coz rarely seen

  • secondary dominant seventh
    similar to above but use 7.

  • secondary leading-tone, only make sense when tonalize to a Major chord
    iio = viio/III that is Do in C minor = viio of Eb Major
    iiio = viio/IV that is Eo in C Major = viio of F Major
    bvo = viio/V that is F#o in C (both) = viio of G Major
    vo = viio/VI that is Go in C minor = viio of Ab Major
    #vio = viio/VII that is Ao in C minor = viio of Bb Major
    viio = viio/VII that is Bbo in C minor = viio of B Major

  • secondary leading-tone seventh
    similar to above but use 7; not sure why but I feel these may not be as meaningful coz of the enharmonic nature.

Re: identification of the Fre+6 was different depending of the chosen key.

Thank you for reporting this strange behavior! Confirmed. No idea why this happens, but figuring it out should help prevent future "searchAndReplace" bugs.
fr6bug.PNG
fr6bug.mscz

Re: neapolitan and augmented sixths

Detailed suggestion messy bucket @laurentVeliscek! It sounds pretty solid, I'm trying it out.
To give convincing result, the plugin need to check 1. the bass note and 2. presence of tonic note doubling, both of which the current code's not capable of yet. The results therefore might create a bit of confusion, that's ok though I think users should have already known this plugin's not a reliable proofreading tool.

Hi msfp, Long time ago, when I use Cubase, I think of/want a automation function.

The function could identifiy and anlyze the chords and the notes below to the chords. And automaticlly show the interval of each note !

Your plugin has a very similar fuction, which show the interval by color. But I think It's not very convenient. So, could you upgrate a funtion like I mentioned:

As you can see in the picture , I added all intervals by hand at the lyric line. I want it to be done by plugin, to show intervals under staff or by the side of each note.

Looking for reply!

Attachment Size
Screenshot 2024-02-01 at 17.58.21.png 2.4 MB

This works well on a score that has more complex chords/modulations than it does on another score (Devil's Dance) that contains more simple chords. On the simpler score, nothing is displayed using Windows mode, even with some tweaking of the settings. I have used the same settings on both scores. So I have scratched off two the three hairs on my chinny chin chin... Any suggestions? Thanks in advance.

In reply to by artoffugue333

Hi artoffugue333, there's nothing to display because single notes, unisons, octaves and moments marked with hyphen "-" are not considered in the analysis, please see quickstart document https://musescore.org/sites/musescore.org/files/2023-09/quickstart20230… .

The "Devil's dance" score features broken chord accompaniment. Before pressing analysis, I'd figure out phrases where the harmony remains unchanged. I'd then add parenthesis text "(" and ")" to the beginning and the end of each phrase respectively. This indicates that all notes within that phrase should be considered as one single chord for analysis.

It would be great if the plugin could provide the figured bass numerals used in Bach and early music. It should be much simpler than Roman numerals, as there is no reference to a specific tonic to be calculated (and it is very advantageous when, as in modal music, there is no tonic in the traditional sense).
It is true that many of the figures correspond to those small ones found in Roman numerals (such as 6, 46, 24 etc.) so it’s just enough to 'ignore' the big Roman numeral, but I think in more complex situations the notation may perhaps be slightly different.
To my knowledge there is no plugin that does this in any software. I’m attaching a picture as example

Attachment Size
IMG_2954.png 108.98 KB

In reply to by alenmessina

Thank you for your comment. It is a wonderful suggestion. I think you are right it should requires less coding. Musescore has a dedicated Figured Bass object https://musescore.org/en/handbook/3/figured-bass which could make the journey easier. I am not used to reading figured bass, let along writing, so researching into how to write them correctly and how to automate it would be needed. Definitely on my hobby plugin todo list. Please feel free to go ahead if you are familiar with figured bass and coding, the program code is free (GPLv2, the embedded ExpandChordSymbols is MIT).

Just to be clear, is it correct that you mean an analysis plugin (notes -> figured bass), similar to the way this current plugin works (notes -> chord symbol)? I presume figured bass has a role in the past as composer's shorthand (figured bass -> performance), which may necessitates a much different plugin for the missing figured bass equivalent function of chord symbol's "realise chord symbol" (figured bass ->notes) https://musescore.org/en/handbook/3/chord-notation-systems#realizechord… .

In reply to by alenmessina

To just remove the big Roman numeral with a plugin could/should be pretty easy (but could have formatting problems). Could you post a MU3 or musicxml file (not a MU4 file) with plenty of roman numerals in it?
EDIT: This is trivial. Select all chord symbols and press delete: this removes the roman numerals (they are treated as a type of chord symbol) leaving the figured bass-like annotations...

Hello. Your plugin is great and I have been using it as soon as I found it.
So, my request is that you provide more options for more code interpretation and notation.
Specifically, I would like to be able to choose "aug", "aug7", "augM7", etc., since currently augmented 5ths are notated with "+" when they are augmented chords and "#5" when they have a 7th or tension.
I would also like to be able to choose "dim7" notation for diminished 7th chords as well as "o7".
I am Japanese, so I understand that Japanese chord notation conventions may differ from those in your country, but ultimately I would like to see more customizability, such as the ability to set your own chord notation rules.
Thank you in advance.

Translated with DeepL.com (free version)

In reply to by makio3465

As stated on the plugin page: "Symbols after a slash “/” are not altered even if they match the criterion. Thus Ab/C becomes AbMaj/C, because the slashtail is usually just a bass note.
What do you want to happen to C/D? I can probably fudge it.
EDIT: Changing D7/C to D/C works: just enter: replace D7 with D (i.e. ignore the tail)
EDIT2: But that will replace all D7 in the score to D (also those without a slash)

In reply to by makio3465

Try this version
ReplaceChordSymsSpecial.qml
But this would have to be thoroughly checked in many circumstances.
It adapts the convention that if the chord to replace and the chord that replaces both have slashes the replacement is 'literal' e.g. ["D7/C","D/C"]. To avoid that D7 gets the same replacement the code checks that there is a slash in the chord to replace. Feels a bit 'hacky'...
EDIT: Found a bug already: D7/Ab also became D/C. Try this new version
ReplaceChordSymsSpecial.qml

In reply to by Jojo-Schmitz

Maybe it's just me, but i have -- for Chord ID plugin:

-module \"Qt.labs.settings\" is not installed\n" (at least on Linux)
-ColorDialog is not a type\n"
-Dialog is an abstract base class\n"
-Cannot assign to non-existent property \"standardButtons\"\n"
=> Component { id: msg ; MessageDialog { title: "Confirm"; standardButtons: StandardButton.Ok; onAccepted: console.log("ok") } }
Seems that must be changed to
Component { id: msg ; MessageDialog { title: "Confirm"; buttons: MessageDialog.Ok; onAccepted: console.log("ok") } }
(what is this code doing other than just showing a message box with ok?)
-Cannot assign to non-existent propertError:
-several times: Variable "tokens" is used before its declaration at 1322:11.
-Cannot assign to non-existent property "width"

That's where i left off yesterday. (plugin still not working)
These are not a few changes.
Unless i am doing this completely wrong, in which case i would appreciate if someone told me what.

In reply to by graffesmusic

Qt.labs.settings exists on Windows and is used in my Betch Convert plugin

Which plugin file exactly?

As far as I can tell the only change needed in ChordID_Windowed,qml to port it to 4.4 is

import QtQuick.Window 2.3
... 
    //4.4 title: pname
    if (mscoreMajorVersion >= 4 && mscoreMinorVerosion <= 3) {
 

Untested though

In reply to by Jojo-Schmitz

I tried the batch convert plugin. (on MS4.4 Beta), but it does not start.
27 module \"QtQuick.Dialogs\" version 1.2 is not installed\n"
When i change to just QtQuick.Dialogs - without any number/not needed with Qt62, then i have the qt.labs.settings error.
module \"Qt.labs.settings\" is not installed\
module \"Qt.labs.folderlistmodel\" is not installed

In the linux appimage, there is only qt.labs.platform, not qt.labs.settings
With only above changes to ChordID, i also have
Plugins/musescore_chordid/ChordID_Windowed.qml:27 module \"QtQuick.Dialogs\" version 1.2 is not installed\n"

Perhaps there is something fundamental different between the Linux appimage and the Windows build.

In reply to by graffesmusic

Many existing plugins make use of QtQuick.Controls 1 and QtQuick.Dialogs 1. These modules have been deprecated for years and have been removed in Qt 6. Plugins using these modules will need to be rewritten using QtQuick.Controls 2 and/or MuseScore.UiComponents instead; otherwise, MuseScore won’t be able to detect them.

In reply to by graffesmusic

@makio3465

Thank you for your comment! I'm happy you find this plugin useful.

Re: chord notation conventions

To use "aug", "aug7", "augM7", and "dim7" now, please try either one of the followings:

  1. Use plugin author "elsewhere" 's suggestion; or
  2. Edit the plugin files yourself: Plugin files (.QML) can be opened with any plain text editor, such as notepad.exe . The chord name is the first column of the configuration table inside ChordID_Docked.qml , ChordID_Repeat.qml , and ChordID_Windowed.qml files. The edited data should look like this,

    editedmakio3465.PNG

Save the files and restart Musescore studio to use the new config; or

  1. Try this modified plugin musescore_chordid_20231111A_makio3465.zip .

The default config is based on data taken from the previous "AniMikatamon" 's Chord Identifier (Pop & Jazz) plugin , and generous inputs from musescore.org users. I think it isn't based on any one particular standard now. Everyone is welcomed to share his improved config table. Please feel free to upload the plugin file (may need create .ZIP) and let me know, I'd be glad to put a link to your file on the plugin page. Take note Musescore only create correct audio with syntax it understands, as explained on https://musescore.org/en/handbook/3/chord-notation-systems#chord-symbol…

Re: Not analyze bass notes as tension

That is a wise suggestion! I confess I've been deleting many unwanted D7/C myself. Analysis get messed up if the music has ground bass, constant bass, walking bassline etc.

Thorough planning is needed however, before adding option to increase significance of the lowest note, or automatically exclude appropiate notes in analysis. See also plugin author "elsewhere" 's comment

For now, pls try either one of the followings:

  1. "elsewhere" 's plugin as explained; or
  2. select passage, then deselect notes unneeded (Ctrl-click), then run the plugin, as demonstrated in short clip below.
  3. Automate it with "worldwideweary" 's Chord Level Selector plugin.

@graffesmusic

Thanks for your heads-up, I haven't started converting plugins. Most of the time I'm still using 3.7, and 4.4 portable is not available yet. Is the in-app plugin debugger reimplemented in 4.4 beta? I dread wrestling with QML, it feels like creating a new mobile phone app from scratch. I prefer html/css/js frontend, it saves time.

I guess modifications mentioned in your post could be in the correct path. Qt6 renamed some properties. Also, some types(classes) are removed/renamed. Yes, you're right, that particular code is just for showing a message box with an OK button, which is immediately used by the following line
msg.createObject(pluginscope,{text:"The action cannot be completed because no score file is opened", visible: true})
These two lines are equvalent to one-liner in html/css/js
alert('The action cannot be completed because no score file is opened')

I guess you're correct it could be Linux build problem import Qt.labs.settings line should be needed https://doc.qt.io/qt-6.2/qt-labs-settings-qmlmodule.html screenshot of my portable app win ms4.2 Qt folder, unsure if related to the bundled Qt.
win42qt.PNG

Everyone interested is welcomed to help upgrade it. Musescore.org site admin are welcomed to add co-authors to any of my plugin pages at his own discretion. Of course you can always fork as your own plugin. There're tips on https://musescore.org/en/node/337468 . Plugin author parkingb has successfully upgraded some of his plugins eariler this year.

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