]> git.donarmstrong.com Git - lilypond.git/commit
MusicXML: Apply Attributes and Direction only to the staves/voices they apply to
authorReinhold Kainhofer <reinhold@kainhofer.com>
Wed, 19 Sep 2007 01:02:23 +0000 (03:02 +0200)
committerReinhold Kainhofer <reinhold@kainhofer.com>
Wed, 3 Oct 2007 16:39:56 +0000 (18:39 +0200)
commit8dbe802ee040d1f5fd9cc439081194d41ef4dbf2
treed59653610893aa4522c610c170014990162ac111
parent2da532f11f9f472c653995c64cf46e98a46f27e1
MusicXML: Apply Attributes and Direction only to the staves/voices they apply to

When extracting the voices of a part, first detect all different voices so that
we can assign dynamics to all voices right from the beginning.
Also, assign the dynamics and attributes only to those voices they really apply
to (in particular, if they have a <staff> element, only assign them to the voices
that use that particular staff). For this, I also need to keep a dict for
staff=>[voiceids,...] around. To be able to assign attributes only to the
correct voices, I need to copy the attributes object and erase all clefs, times
and keys that do not apply to the staff (and keep only those objects that either
have no number attribute or have the correct number attribute). This copying
(shallow copying of the relevant parts of the Attributes object) gave me some
major headache, but it should work fine now.

Signed-off-by: Reinhold Kainhofer <reinhold@kainhofer.com>
python/musicxml.py