Stephen wrote:
Note also that these bugs have low priority among developers, since there are
plans to rewrite the midi system from scratch.>
My comments can be taken two ways, as suggestions for a rewrite of span-dynamic-performer.cc or as a wish-list for the new implementation. If I where to contribute to the new implementation, I would need to start by analysing the drawbacks of the current implementation of midi in Lilypond. When it comes to things like this, I fail to see the distinction. We learn from each other, hopefully.
One thing I want to do in midi is to say:
\remove Voice.Span_dynamic_performer \consists PianoStaff.Span_dynamic_performer
to controll the scope of the dynamic changes, whether they only affect the voice, the staff, the piano part, of the entire score. I don't know if that is possible yet.
That will give technical problem, since each Staff context in the .ly file will translate into one MIDI track (I hope I remember the correct terminology here) and as far as I know, the dynamics are set per track in MIDI. One solution is to redefine the MIDI contexts so that the full PianoStaff is typeset in the same track. Technically, this means that the PianoStaff context should be changed to be of type "Staff_performer" and that the ordinary Staff context should have type "Performer_group_performer". This is done with the following lines in your .ly file:
\midi { \tempo 4=60 \context { \type "Staff_performer" \name "PianoStaff" \accepts Staff \accepts DrumStaff }
\context { \type "Performer_group_performer" \name Staff \accepts Voice
\consists "Key_performer" \consists "Tempo_performer" \consists "Time_signature_performer" }
Once you have done that, there's no need to move the Dynamic_performer or Span_dynamic_performer, since any dynamic setting that will appear within the same track will affect all the remaining notes in the track.
To see the original context definitions for the MIDI processing, see the file ly/performer-init.ly
/Mats
_______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel