What does note.accidentalType return for naturals?

• Mar 17, 2017 - 17:28

Hi, I'm hoping someone can tell me what note.accidentalType returns for naturals. I found via testing that it returns 1 for sharps and 2 for flats, but I'm having trouble figuring out what it returns for naturals.

Thanks so much!


Comments

In reply to by Shoichi

Thank you so much, but actually sorry, I should have specified--I am talking about the qml code for developing plugins. There is a function for note called accidentalType that returns an int, but I couldn't find documentation for what the value of that int corresponds to. Through testing different values for the int I figured out that note.accidentalType returns 1 if the note is sharp and 2 if the note is flat, but I am not sure what it returns if the note is natural (as in it has a natural sign by it, indicating it used to be flat or sharp). I am hoping to use it in this manner:

if (note.accidentalType == 1)
//something happens when it's sharp
else if (note.accidentalType == 2)
//something else happens when it's flat
else if (note.accidentalType == ?)
//something else happens when it's natural
else
//or something else happens

where ? is whatever value note.accidentalType returns when the accidental is natural.

Thank you!!

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