notes in chords and if statement

• May 29, 2012 - 11:53

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

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