[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: midi bug remains in 2.13.58
From: |
Jan Nieuwenhuizen |
Subject: |
Re: midi bug remains in 2.13.58 |
Date: |
Sun, 17 Apr 2011 12:15:35 +0200 |
User-agent: |
Gnus/5.110016 (No Gnus v0.16) Emacs/23.1 (gnu/linux) |
- Hu Haipeng writes:
The patch below may fix this, when using
\set Score.midiChannelMapping = #'staff
> Ok, Here's my example, just 4 bars.
It is indeed just 4 bars. Although I can look at the warning,
this example is not usable as a regtest or tiny example. It
is still quite difficult [for me] to verify that what is meant
in this .ly, actually arrives into the .midi.
Possibly with something like
violin = { \set Staff.midiInstrument = "violin" a4 a }
changer = {
\set Staff.midiInstrument = "midi-instr 1"
c128
\set Staff.midiInstrument = "midi-instr 2"
c128
..
\set Staff.midiInstrument = "midi-instr 17"
c128
\set Staff.midiInstrument = "celesta"
c4
}
it would be feasible to verify that, in the end, we hear a
violin and a celesta. Not sure how to make a better test
for this that could serve as a regtest.
Jan.
>From e0524f8ebdd4bcf908b8e3bce66e09670b8c30ed Mon Sep 17 00:00:00 2001
From: Jan Nieuwenhuizen <address@hidden>
Date: Sun, 17 Apr 2011 12:08:04 +0200
Subject: [PATCH] MIDI: in midiChannelMapping = #'staff mode, keep to one
channel. Fixes #xxxx.
---
lily/staff-performer.cc | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/lily/staff-performer.cc b/lily/staff-performer.cc
index 5aafabe..90fe5d7 100644
--- a/lily/staff-performer.cc
+++ b/lily/staff-performer.cc
@@ -216,6 +216,9 @@ Staff_performer::get_channel (string instrument)
? channel_map_
: static_channel_map_;
+ if (channel_ && channel_mapping == ly_symbol2scm ("staff"))
+ return channel_;
+
map<string, int>::const_iterator i = channel_map.find (instrument);
if (i != channel_map.end ())
return i->second;
--
1.7.1
--
Jan Nieuwenhuizen <address@hidden> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.nl