Re: [Mscore-developer] note not yet ready

2015-08-24 Thread Jim Newton
It just occured to me that when you speak of *clefs*, perhaps you really mean *staves*? By the way, no I really meant clefs. A different staff can have a different clef, and if so, there is some additional computation which must be done to convert lines to pitches and back to lines. --

Re: [Mscore-developer] note not yet ready

2015-08-23 Thread Marc Sabatella
There are two addPitch() functions. You want the one that, as I said, takes a step and not a pitch - the one that is called when you enter a note by typing its letter name. On Sun, Aug 23, 2015 at 3:45 AM Jim Newton jimka.i...@gmail.com wrote: Hi Marc, I haven't dug deeply into the code yet,

Re: [Mscore-developer] note not yet ready

2015-08-22 Thread Jim Newton
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

Re: [Mscore-developer] note not yet ready

2015-08-22 Thread Marc Sabatella
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

Re: [Mscore-developer] note not yet ready

2015-08-22 Thread Marc Sabatella
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

Re: [Mscore-developer] note not yet ready

2015-08-21 Thread Marc Sabatella
I think that suggestion does not really make sense given what I thinkl you are actually trying to do. Your problem is simply that you chose the wrong function to use to add notes. if you care about line, you should use a function that works with line, simple as that. You won't have to calculate

Re: [Mscore-developer] note not yet ready

2015-08-19 Thread Marc Sabatella
If I understand correctly, 1) and 2) would happen in rendermidi somewhere, hence after layout, hence no issues, and it's only 3) where you are trying to actually add notes as opposed to playback events? The I guess the more basic question is, if you are starting from a point of knowing what line

Re: [Mscore-developer] note not yet ready

2015-08-19 Thread Jim Newton
Hi Marc, this type of question has come up three times for me so far. 1. calculating the notes of an ornament (trill, turn etc). A trill is played by playing the note that is written in combination with the note on the line/space above or below. This is not always the neighbouring note in the

Re: [Mscore-developer] note not yet ready

2015-08-18 Thread Jim Newton
Hi Maurizio, can you give me more information about what you are referring to here: how to sue the tpc for line computation? Are these types which have integer-like arithmetic defined on them? For example given a note in G clef of an F instrument like the English Horn, how can I find out

Re: [Mscore-developer] note not yet ready

2015-08-06 Thread Maurizio M. Gavioli
Jim Newton wrote I'm working on a function which extends (adds notes to) some chords according to a particular algorithm. I'm using the function chord-score()-addNote() to insert the notes. Unfortunately, this function creates notes whose note-line() is 0. I guess this gets rectified later.

Re: [Mscore-developer] note not yet ready

2015-08-02 Thread Marc Sabatella
Sorry, I guess I just don't have enough context to understand what you are actually asking here then. It is true that line calculations happen at specific points in the code - most importantly, if I remember/understand correctly, during cmdUpdateNotes(), which is called during the layout process.

[Mscore-developer] note not yet ready

2015-08-02 Thread Jim Newton
I'm working on a function which extends (adds notes to) some chords according to a particular algorithm. I'm using the function chord-score()-addNote() to insert the notes. Unfortunately, this function creates notes whose note-line() is 0. I guess this gets rectified later. This poses a problem,

Re: [Mscore-developer] note not yet ready

2015-08-02 Thread Marc Sabatella
I don't understand. Are you saying your own function is trying to use line as the way of knowing which notes you yourself have not processed yet? That sounds unlikely to work. If you are syaing you think there is some sort of problem with now addNote(0 works, can you give steps to reproduce the

Re: [Mscore-developer] note not yet ready

2015-08-02 Thread Jim Newton
I've inserted the following call to updateLine() which seems to do the trick, but I'm not sure if it is correct. -- View this message in context: http://dev-list.musescore.org/note-not-yet-ready-tp7579475p7579477.html Sent from the MuseScore Developer mailing list archive at Nabble.com.

Re: [Mscore-developer] note not yet ready

2015-08-02 Thread Marc Sabatella
Hard to say without understand the actual problem you are perceiving there to be. Are you saying there is somew sort of bug that can be reproduced by following some certain series of steps? On Sun, Aug 2, 2015 at 8:45 AM Marc Sabatella m...@outsideshore.com wrote: I don't understand. Are you

Re: [Mscore-developer] note not yet ready

2015-08-02 Thread Jim Newton
Hi Marc, i'm not sure it is a bug, but rather simply the way it works. It looks like addNote does not update _line, perhaps something else does. Rather _line gets initialized to its default value of 0, which happens to coincide with a particular line on the staff. I could build a test case, but