It sounds like you pretty much understand the problem.

If I add a note, and then later in the function I scan over the notes in the
measure, I might encounter one I added.  It has line=0 on it, which is
wrong, and I'd like to skip that note.  But I don't see any indication on
the note that it is in such a state.  There must be something which
distinguishes this note from one which is REALLY on line=0.  I could of
course make a over-engineered solution to "remember" which notes I added, or
perhaps don't actually add the notes, but rather build a data structure of
notes I intend to add, then add them all at the end.  I'd like to avoid such
a complicated solution.

I'll take a look at noteValForPosition().  One issue I saw last time I
looked at that was that I didn't know how to calculate the correct
accidentals.  With my approach it is a bit easier.  I find a note on the
line I want; ask that note what is its pitch, then create a new note with
that pitch +/- n*12 to shift for octave differences.
The case of accidentals was confusing to me because the note might be Bb
because there is a Bb in the key signature, and it might be Bb because of an
accidental explicitly on the note or one earlier in the measure.  The kink
is that I need to call addNote(), and also updateLine(); that seems to do
the trick.

Again to emphasise Marizio suggested to use tpc, because it will do this
calculation for me.  So, I'd like to understand how that might work.  





--
View this message in context: 
http://dev-list.musescore.org/note-not-yet-ready-tp7579475p7579501.html
Sent from the MuseScore Developer mailing list archive at Nabble.com.

------------------------------------------------------------------------------
_______________________________________________
Mscore-developer mailing list
Mscore-developer@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mscore-developer

Reply via email to