lilypond-devel
[Top][All Lists]
Advanced

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

Re: Map voices to channels in MIDI output


From: Jan Nieuwenhuizen
Subject: Re: Map voices to channels in MIDI output
Date: Mon, 14 Mar 2011 22:32:02 +0100

Jan Nieuwenhuizen schreef op ma 14-03-2011 om 22:19 [+0100]:
> Keith OHara schreef op ma 14-03-2011 om 13:50 [-0700]:

> > (Unfortunately for me, the player I formerly used, NotationPlayer,
> > gets confused by Tracks with no program change containing notes
> > directed to a Channel that had an earlier program change.)
> 
> So it would be prudent for each new track to always set the
> instrument?  That should be doable.

In fact, this should do it

diff --git a/lily/staff-performer.cc b/lily/staff-performer.cc
index 35b1746..7a539db 100644
--- a/lily/staff-performer.cc
+++ b/lily/staff-performer.cc
@@ -115,6 +115,8 @@ Staff_performer::new_audio_staff (string voice)
   announce_element (Audio_element_info (audio_staff, 0));
   announce_element (Audio_element_info (name_, 0));
   staff_map_[voice] = audio_staff;
+  if (!instrument_string_.empty ())
+    set_instrument (channel_, voice);
   return audio_staff;
 }
 
Does that fix your player?

Jan.

-- 
Jan Nieuwenhuizen <address@hidden> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | AvatarĀ®  http://AvatarAcademy.nl  




reply via email to

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