Again, you don't even have to know or care if there is an accidental
applied already, nor do you have to think about transposition.  If you call
the addPitch() function I mentioned, it does all the work for you.  Did you
try it?  If you want to see how it is used, just find other places where it
is called.  Or set a breakpoint and try adding a note by typing a letter
and see the stack trace.  But it should be as simple as you pass in the
"step" (clef-independent "line", where middle C = 35) and it does the
rest.  So, you figure out what line you want the note added on, call that
function, and your work is done - no worry about accidentals or
transposition or anything else.

Marc

On Sat, Aug 22, 2015 at 6:54 AM Jim Newton <jimka.i...@gmail.com> wrote:

> I'd like to understand your suggestion better.  Suppose I have found a note
> on line 1 (E) of the treble clef, and the key signature is F, but the E has
> been flattened with an accidental earlier in the measure.  Now from that
> information, how should I create a note on line 3 of the bass clef which
> matches the accidentals of the antecedent note?
>
> Another tricky example is what if the treble clef which contains the
> antecedent note is a transposing instrument.  If I read the notes ppitch()
> that correctly handles the transposition for me.
>
> The way I'm currently doing it is to get the ppitch() of the antecedent
> note, and create a new one whose pitch is the same +/- 12 per octave.   My
> approach of course has a glaring disadvantage, that I am not controlling
> whether I create an Eb or a D#, which of course I would prefer to be done
> correctly.
>
>
>
>
>
> --
> View this message in context:
> http://dev-list.musescore.org/note-not-yet-ready-tp7579475p7579503.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
>
------------------------------------------------------------------------------
_______________________________________________
Mscore-developer mailing list
Mscore-developer@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mscore-developer

Reply via email to