lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: midi control done twice


From: Devon Schudy
Subject: Re: midi control done twice
Date: Sat, 18 Jan 2014 19:45:31 -0500

address@hidden wrote:
> \score {
>   \new Staff {
>     \set Staff.midiInstrument = #"electric bass (finger)" % 34
>     \set Staff.midiPanPosition = #0
>     a'1
>   }
>   \midi { }
> }

>         ['patch_change', 0, 0, 33],
>         ['control_change', 0, 0, 10, 64],
>         ['control_change', 0, 0, 42, 0],
>         ['patch_change', 0, 0, 33],
>         ['instrument_name', 0, 'electric bass (finger)'],
>         ['control_change', 0, 0, 10, 64],
>         ['control_change', 0, 0, 42, 0],
>         ['control_change', 0, 0, 7, 100],

>  As seen by the output, patch_change and control messages for panning
> (10 is pan MSB, 42 is LSB pan) are done twice.

This is because a quirk of ordering makes Staff_performer treat these
properties as both changes and preexisting settings.
Staff_performer::acknowledge_audio_element creates the Audio_staff as
needed to perform Audio_items, and in this case the first Audio_item
is the patch change. This happens during do_announces, after the
context properties have already changed, so the Audio_staff starts
with extra control messages to set its initial state to match the
properties. Immediately afterwards, the control changes are performed.
The first copy of each change is the initial setting; the second is
the explicit change.

This happens only when properties change at the beginning of an
Audio_staff (which is not rare). I don't see a simple way to fix it,
but fortunately it's harmless.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]