Reviewers: Graham Percival,
Message:
On 2011/05/28 19:16:34, Graham Percival wrote:
input/regression/midi/key-initial.ly:2: \version "2.13.53"
should this version number be increased? Did we have
midiChannelMapping in
version 2.13.53?
Wow. You must have quite detailed recall because midiChannelMapping
appeared just 12 hours after 2.13.53.
Version strings updated, pushed, closed.
Description:
MIDI: default midiChannelMapping to 'staff
Fix issue 1648
Please review this at http://codereview.appspot.com/4534059/
Affected files:
M Documentation/changes.tely
A input/regression/midi-notes.ly
M input/regression/midi/key-initial.ly
M input/regression/midi/key-option.ly
M input/regression/midi/lyrics-addlyrics.ly
M input/regression/midi/partcombine.ly
M input/regression/midi/quantize-duration-2.ly
M input/regression/midi/quantize-duration.ly
M input/regression/midi/quantize-start.ly
M input/regression/midi/rest.ly
M input/regression/midi/staff-map-instrument.ly
M input/regression/midi/voice-2.ly
M input/regression/midi/voice-4.ly
M input/regression/midi/voice-5.ly
M ly/performer-init.ly
Index: Documentation/changes.tely
diff --git a/Documentation/changes.tely b/Documentation/changes.tely
index
b180ec54e5b5e11c5e66a3f6580b73f387db1878..150f603288bb62405b0483b8ab8de1be7e12d643
100644
--- a/Documentation/changes.tely
+++ b/Documentation/changes.tely
@@ -115,9 +115,9 @@ Lilypond now engraves woodwind fingering charts.
@item
MIDI output has been improved
@itemize @bullet
-@item voices are kept separated, which makes the MIDI file much more
useful for postprocessing
-@item optimal channel distribution: identical instruments share the same
channel. This means that e.g. for a full orchestral score there are always
16 (15 plus percussion) diffently sounding instruments available,
unrestricted by the number of staves or voices.
-@item @code{\set Score.midiChannelMapping = #'staff} assigns one MIDI
channel per staff, previously the default behavior. This setting is
required if you want instrument changes to create MIDI program changes on a
single MIDI channel.
+@item the option @code{\set Score.midiChannelMapping = #'voice} puts each
voice on its own midi MIDI channel
+@item the option @code{\set Score.midiChannelMapping = #'instrument} puts
identical instruments on the same MIDI channel. This means that e.g. for a
full orchestral score there are always 16 (15 plus percussion) differently
sounding instruments available, unrestricted by the number of staves or
voices. (Some MIDI players will cut off notes, however, if two voices play
the same pitch simultaneously on the same channel.) This option also stores
each voice in a separate track in the MIDI file.
+@item the default, @code{\set Score.midiChannelMapping = #'staff}, assigns
one MIDI channel per staff. This setting allows instrument changes
(implemented as MIDI program changes) to re-use single MIDI channel.
@item dynamics are now rendered as note velocities, no longer as midi
volume. This improves the sound on [high end] midi renderers.
@end itemize
Index: input/regression/midi-notes.ly
diff --git a/input/regression/midi-notes.ly b/input/regression/midi-notes.ly
new file mode 100644
index
0000000000000000000000000000000000000000..bb6dbe7f464b05d859e33c38b77d228b405802cc
--- /dev/null
+++ b/input/regression/midi-notes.ly
@@ -0,0 +1,21 @@
+\header {
+
+ texidoc = "A MIDI note-off event precedes a simultaneous note-on event
+for the same pitch in the same MIDI channel, so that all notes are heard.
+Run @code{timidity -idvvv file.midi |grep Midi} to see midi events."
+
+}
+
+\version "2.12.0"
+
+\score {
+ <<
+ \new Staff <<
+ {r4 g' r2 | r2 a'4 r } \\
+ {g'4 r r2 | r2 r4 a' }
+ >>
+ \new Staff { r2 g'2 | a'2 r2 }
+ >>
+ \midi {}
+ \layout {}
+}
Index: input/regression/midi/key-initial.ly
diff --git a/input/regression/midi/key-initial.ly
b/input/regression/midi/key-initial.ly
index
f4cbcb77b03c932896f6b6154392d43a5c3499f7..fe9a48ae6b23993ac46920e1d73f1796e7c8135b
100644
--- a/input/regression/midi/key-initial.ly
+++ b/input/regression/midi/key-initial.ly
@@ -10,6 +10,12 @@
\consists "Completion_rest_engraver"
}
}
+\midi {
+ \context {
+ \Score
+ midiChannelMapping = #'instrument
+ }
+}
% included from ./out/initial-key.header
\header {
Index: input/regression/midi/key-option.ly
diff --git a/input/regression/midi/key-option.ly
b/input/regression/midi/key-option.ly
index
044251bc2bfdb783f31dbd0b55846874f7a2af61..d33c8198c0d465532b09104adb8cfa20205e092f
100644
--- a/input/regression/midi/key-option.ly
+++ b/input/regression/midi/key-option.ly
@@ -10,6 +10,12 @@
\consists "Completion_rest_engraver"
}
}
+\midi {
+ \context {
+ \Score
+ midiChannelMapping = #'instrument
+ }
+}
% included from ./out-www/option-key.header
\header {
Index: input/regression/midi/lyrics-addlyrics.ly
diff --git a/input/regression/midi/lyrics-addlyrics.ly
b/input/regression/midi/lyrics-addlyrics.ly
index
c8a08e44798194ceba9bc53c75e0ab33b7399dc0..d8d52c584a39f24af3d5f430f62fdc2bd2e79d67
100644
--- a/input/regression/midi/lyrics-addlyrics.ly
+++ b/input/regression/midi/lyrics-addlyrics.ly
@@ -10,6 +10,12 @@
\consists "Completion_rest_engraver"
}
}
+\midi {
+ \context {
+ \Score
+ midiChannelMapping = #'instrument
+ }
+}
% included from ./out/initial-key.header
\header {
Index: input/regression/midi/partcombine.ly
diff --git a/input/regression/midi/partcombine.ly
b/input/regression/midi/partcombine.ly
index
dd5a38b12c9c6f8f30b37b35a4aaafd28bae71cc..d52214747eab2da00afc3ba6160aeffec3d47ebb
100644
--- a/input/regression/midi/partcombine.ly
+++ b/input/regression/midi/partcombine.ly
@@ -9,6 +9,12 @@
\consists "Completion_rest_engraver"
}
}
+\midi {
+ \context {
+ \Score
+ midiChannelMapping = #'instrument
+ }
+}
\header {
texidoc="Partcombined music is preserved"
Index: input/regression/midi/quantize-duration-2.ly
diff --git a/input/regression/midi/quantize-duration-2.ly
b/input/regression/midi/quantize-duration-2.ly
index
1944b2d4aefecaf4e278791ed07ff7d59aa12d84..c978b88788c25e2903c59d417cc74b38592ca802
100644
--- a/input/regression/midi/quantize-duration-2.ly
+++ b/input/regression/midi/quantize-duration-2.ly
@@ -10,6 +10,12 @@
\consists "Completion_rest_engraver"
}
}
+\midi {
+ \context {
+ \Score
+ midiChannelMapping = #'instrument
+ }
+}
\header {
texidoc="midi2ly @code{--duration-quant} preserves first note length (16)"
Index: input/regression/midi/quantize-duration.ly
diff --git a/input/regression/midi/quantize-duration.ly
b/input/regression/midi/quantize-duration.ly
index
051f7c96b516b7ad6cfa920c05b2b67f782576ce..7d58eb4d211a61d253326d62b5e1483411b38d47
100644
--- a/input/regression/midi/quantize-duration.ly
+++ b/input/regression/midi/quantize-duration.ly
@@ -10,6 +10,12 @@
\consists "Completion_rest_engraver"
}
}
+\midi {
+ \context {
+ \Score
+ midiChannelMapping = #'instrument
+ }
+}
% included from ./out-www/voice-2.header
\header {
Index: input/regression/midi/quantize-start.ly
diff --git a/input/regression/midi/quantize-start.ly
b/input/regression/midi/quantize-start.ly
index
708d57918e7b471ec0c804ca64e4749a93213f8b..0d53a8ab8bbc8a63874cf4b3ac00e066c05681b8
100644
--- a/input/regression/midi/quantize-start.ly
+++ b/input/regression/midi/quantize-start.ly
@@ -10,6 +10,12 @@
\consists "Completion_rest_engraver"
}
}
+\midi {
+ \context {
+ \Score
+ midiChannelMapping = #'instrument
+ }
+}
% included from ./out-www/voice-2.header
\header {
Index: input/regression/midi/rest.ly
diff --git a/input/regression/midi/rest.ly b/input/regression/midi/rest.ly
index
40132960158c40f222457e3a9e32a786af2ac350..ad462b68a080af774bf4bc95b8f9d8a398cfcdc2
100644
--- a/input/regression/midi/rest.ly
+++ b/input/regression/midi/rest.ly
@@ -10,6 +10,12 @@
\consists "Completion_rest_engraver"
}
}
+\midi {
+ \context {
+ \Score
+ midiChannelMapping = #'instrument
+ }
+}
% included from ./out-www/rest.header
\header {
Index: input/regression/midi/staff-map-instrument.ly
diff --git a/input/regression/midi/staff-map-instrument.ly
b/input/regression/midi/staff-map-instrument.ly
index
8d90c9d29f33333334e36204036003a2860eba63..33221b48261628f015721cf61a16d32609458617
100644
--- a/input/regression/midi/staff-map-instrument.ly
+++ b/input/regression/midi/staff-map-instrument.ly
@@ -9,8 +9,7 @@ options=""
%% TODO:PIANOSTAFF \context PianoStaff <<
<<
\context Staff = "treble" <<
- %% the default
- %% \set Score.midiChannelMapping = #'instrument
+ \set Score.midiChannelMapping = #'instrument
\context Voice="one" \relative c'' {
\time 4/4
\key c \minor
Index: input/regression/midi/voice-2.ly
diff --git a/input/regression/midi/voice-2.ly
b/input/regression/midi/voice-2.ly
index
63d6c0581f5309fcd60239e99dd5529ec5e3df4b..f33e0c516b27eada0873f345a1194297f1de2105
100644
--- a/input/regression/midi/voice-2.ly
+++ b/input/regression/midi/voice-2.ly
@@ -10,6 +10,12 @@
\consists "Completion_rest_engraver"
}
}
+\midi {
+ \context {
+ \Score
+ midiChannelMapping = #'instrument
+ }
+}
% included from ./out-www/voice-2.header
\header {
Index: input/regression/midi/voice-4.ly
diff --git a/input/regression/midi/voice-4.ly
b/input/regression/midi/voice-4.ly
index
a615933e675fec474fe052c2fe996373578b02cb..ef011d5df5ae1f11777e35b660731ec6cede4295
100644
--- a/input/regression/midi/voice-4.ly
+++ b/input/regression/midi/voice-4.ly
@@ -10,6 +10,12 @@
\consists "Completion_rest_engraver"
}
}
+\midi {
+ \context {
+ \Score
+ midiChannelMapping = #'instrument
+ }
+}
% included from ./out-www/voice-4.header
\header {
Index: input/regression/midi/voice-5.ly
diff --git a/input/regression/midi/voice-5.ly
b/input/regression/midi/voice-5.ly
index
297e39f9fa38d861991f1ce4a69deed2ab7f5937..9101e4c9f885ca25f0eb7bca9debda94cefcd512
100644
--- a/input/regression/midi/voice-5.ly
+++ b/input/regression/midi/voice-5.ly
@@ -10,6 +10,12 @@
\consists "Completion_rest_engraver"
}
}
+\midi {
+ \context {
+ \Score
+ midiChannelMapping = #'instrument
+ }
+}
% included from ./out-www/voice-5.header
\header {
Index: ly/performer-init.ly
diff --git a/ly/performer-init.ly b/ly/performer-init.ly
index
1b9e18665a541c8bd7f37e094a9658d3bc7834e8..6e0deaf9762ab1d94d1acc2d9285190b2c70efd9
100644
--- a/ly/performer-init.ly
+++ b/ly/performer-init.ly
@@ -137,7 +137,7 @@
melismaBusyProperties = #default-melisma-properties
instrumentName = #"bright acoustic"
- midiChannelMapping = #'instrument
+ midiChannelMapping = #'staff
%% quarter = 60
tempoWholesPerMinute = #(ly:make-moment 15 1)
_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel