msc_plugins icon indicating copy to clipboard operation
msc_plugins copied to clipboard

Adding Chord Types

Open KKSergio opened this issue 7 years ago • 2 comments

Hi,

I tried to add new chords and it actually worked (it got the change I made) but the plugin added a "7" at the end of the chord name which I cannot intercept. Can you help me with this? I added 9th and m9th chords as follows:


var chord_type = [ [4,7],  //M (0)
                   [3,7],  //m
                   [3,6],  //dim
                   [2,4,7],  //9 = Ninth <-- the first chord I added
                   [2,3,7],  //m9 = Minor Ninth <-- the second chord I added
                   [4,7,11],   //MM7 = Major Seventh
                   [3,7,10],   //m7 = Minor Seventh
                   [4,7,10],   //Mm7 = Dominant Seventh
                   [3,6,10]];   //dim7 = Half Diminished Seventh

var chord_str = ["", "m", "o", "9", "m9", "MM", "m", "Mm", "o"];

Actually, a 9th chord has a 14 semitones interval after the root note, but if I state, for example, [4,7,14] or [3,7,14] nothing happens. What is this due to?

As you can see, I also changed the "chord_str" variable, in order to get the correct name. Though, what I get for a Cm9 chord is what you see below:

image

The played chord is not a Cm97 chord but a "simple" Cm9. How can I solve this? Is this due to inversions and - if yes - how should I change variables?

Thank you KK

KKSergio avatar May 10 '17 10:05 KKSergio

Hi, It comes from this test: https://github.com/rousselmanu/msc_plugins/blob/master/chordIdentifier.qml#L247 where I assumed that if the chord has 3 intervals it is a seventh chord... this is no longer true if you add 9th. You would have to change this...

It sets the variable "seventhchord" to 1, and then adds the "7" to the chord name at this line: https://github.com/rousselmanu/msc_plugins/blob/master/chordIdentifier.qml#L291

Emmanuel

rousselmanu avatar May 10 '17 11:05 rousselmanu

Mmmmmm... that's an issue. There are so many chords (i.e. Cm9#11) in which chord notes are more than three, actually. Therefore it is not so true that if a chord has three notes it is a 7th chord. I am not a programmer, therefore I don't know how to proceed. How would you change this or - can you tell me how the program recognises the notes, step by step? Thank you KK

KKSergio avatar May 10 '17 12:05 KKSergio