It just occured to me that when you speak of *clefs*, perhaps you really
mean *staves*?  That is, for some reason you want an accidental on one
staff to affect the pitches on other staves?  That seems highly unusual and
probably unexpected behavior, but I guess in that case rather than actually
calling addPitch(), you would want to analyze what it does and figure out
how to adapt it to your own purposes.  But again, more information about
this odd-sounding use case would help.  I can't think of any real world
situation where a human musician trying to play a trill or realize figured
bass or anything else would do that, so I can't imagine why you would need
to either.  Seem there is still some fundamental aspect of what you are
trying to do that I don't understand.  Again, can you explain from a user
perspective how this would work?  He selects a note on one staff, presses
some button, and the contents of some totally different staff affects what
happens next?

On Sat, Aug 22, 2015 at 11:09 AM Marc Sabatella <m...@outsideshore.com>
wrote:

> 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