notes in chords and if statement
Inside the plugin I want to check if a chord has a certain number of notes.
How could I do something like this:
if (chord has a third note)
{ do something }
I tried "if(cursor.chord().note(2))" but if there is no third note it just says "index out of range".
I also tried "if(cursor.chord().notes == 2)" but that always evaluates to false.
I either need to read the max index of chord or the amount of notes in a chord. How do I do that?
Comments
cursor.chord().notes. See http://musescore.org/en/plugin-development/chord-object
var chord = cursor.chord();
var n = chord.notes;
In reply to cursor.chord().notes. See by Jojo-Schmitz
Thanks.