I've discovered a bug in my articulation/glissando calculating code which exhibits itself in transposing instruments.
The thing that is confusing to me is how to correctly calculate the pitch given the note->line().
apparently the function line2pitch() assumes the instrument is non-transposing.
There are three pitches attached to a note, and the comments in the Note class is confusing
note->pitch() // midi pitch
note->epitch() // effective pitch
note->ppitch() // actual midi pitch (honoring ottavas) (read only)
ppitch is also documented as playback pitch
Does someone understand the semantics of these? Can you help me understand?
pitch() = the pitch that would result from actually playing this note, taking into consideration transposition but not accounting for ottavas
ppitch() = same as above but accounting for ottavas
epitch() = the "apparent" pitch of the note as currently displayed - not taking transposition or ottavas into consideration
So, middle "C" written for Bb trumpet (concert Bb) with an ottava over it should have pitch = 58, ppitch = 70. epitch() is 60 until you turn "Concert Pitch" mode on, at which point it displays as Bb and now epitch() will be 58. That's off the top of my head...