From af512015f89eab19a9f59a69353562b273620e0b Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Fri, 26 Mar 2004 01:14:46 +0000 Subject: [PATCH] (create_audio_elements): play instrument changes before notes arrive. This fixes instrument of the first note in a score. --- ChangeLog | 5 ++++- lily/staff-performer.cc | 18 ++++++++---------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index cbb023fe7b..c9292c873b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,11 @@ 2004-03-26 Han-Wen Nienhuys + * lily/staff-performer.cc (create_audio_elements): play instrument + changes before notes arrive. This fixes instrument of the first + note in a score. + * scripts/convert-ly.py (FatalConversionError.conv): add #'() case to 1.9.0 conversion. - * lily/mark-engraver.cc: doc string. diff --git a/lily/staff-performer.cc b/lily/staff-performer.cc index 4969d4f85e..bc0d86f7d6 100644 --- a/lily/staff-performer.cc +++ b/lily/staff-performer.cc @@ -84,6 +84,12 @@ Staff_performer::create_audio_elements () announce_element (Audio_element_info (instrument_name_, 0)); instrument_ = new Audio_instrument (str); announce_element (Audio_element_info (instrument_, 0)); + + /* + Have to be here before notes arrive into the staff. + */ + play_element (instrument_); + play_element (instrument_name_); } Performer_group_performer::create_audio_elements (); } @@ -105,16 +111,8 @@ Staff_performer::stop_translation_timestep () play_element (tempo_); tempo_ = 0; } - if (instrument_name_) - { - play_element (instrument_name_); - instrument_name_ = 0; - } - if (instrument_) - { - play_element (instrument_); - instrument_ = 0; - } + instrument_name_ = 0; + instrument_ = 0; Performer_group_performer::stop_translation_timestep (); } -- 2.39.5