]> git.donarmstrong.com Git - lilypond.git/commit
canonicalise notional octave of tonic
authorZefram <zefram@fysh.org>
Mon, 24 Dec 2012 23:00:35 +0000 (23:00 +0000)
committerJames Lowe <pkx166h@gmail.com>
Tue, 1 Jan 2013 12:02:48 +0000 (12:02 +0000)
commit60015c1d4aff30a610dced9a565fc1a6cb292be2
tree67876bdf9a51eaeca58bc919cd749caa9736cbea
parent98edd1f29c3b5b488ea41313445a3e6220c4a245
canonicalise notional octave of tonic

Nothing deliberately looks at the octave part of the pitch object storing
the tonic of a key-change event; it's not really a meaningful concept.
But comparison with equal? sees the octave, so internal_event_assignment()
reckoned two key changes differing only in this meaningless field to
be different, and therefore not permitted to occur at the same time.
This triggered false warnings of "two simultaneous key-change events"
when two instruments sharing a staff differ in the transposition used
in their music source.

To fix this, always set the octave part of the tonic pitch to the
same value.  This is done when transposing, and since \key operates by
invoking transposition this is the only place that needs to canonicalise.
The canonical octave is number -1; that is, the octave obtained by a
note name with no octave suffix, and so the octave that most commonly
occurred under the non-canonicalising system.
lily/music.cc