]> git.donarmstrong.com Git - lilypond.git/commitdiff
MIDI: default midiChannelMapping to 'staff
authorKeith OHara <k-ohara5a5a@oco.net>
Sat, 14 May 2011 00:27:23 +0000 (17:27 -0700)
committerKeith OHara <k-ohara5a5a@oco.net>
Sun, 29 May 2011 19:52:55 +0000 (12:52 -0700)
Fix issue 1648, with regtest

16 files changed:
Documentation/changes.tely
input/regression/midi-notes.ly [new file with mode: 0644]
input/regression/midi/key-initial.ly
input/regression/midi/key-option.ly
input/regression/midi/lyrics-addlyrics.ly
input/regression/midi/partcombine.ly
input/regression/midi/quantize-duration-2.ly
input/regression/midi/quantize-duration.ly
input/regression/midi/quantize-start.ly
input/regression/midi/rest.ly
input/regression/midi/staff-map-instrument.ly
input/regression/midi/staff-map-voice.ly
input/regression/midi/voice-2.ly
input/regression/midi/voice-4.ly
input/regression/midi/voice-5.ly
ly/performer-init.ly

index b180ec54e5b5e11c5e66a3f6580b73f387db1878..150f603288bb62405b0483b8ab8de1be7e12d643 100644 (file)
@@ -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
 
diff --git a/input/regression/midi-notes.ly b/input/regression/midi-notes.ly
new file mode 100644 (file)
index 0000000..bb6dbe7
--- /dev/null
@@ -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 f4cbcb77b03c932896f6b6154392d43a5c3499f7..4a169cbfd9a5a98dd7851a8e692d9899f85320d6 100644 (file)
@@ -1,5 +1,5 @@
 % Lily was here -- automatically converted by ../../../scripts/midi2ly.py from out/initial-key.midi
-\version "2.13.53"
+\version "2.13.54"
 
 \layout {
   \context {
     \consists "Completion_rest_engraver"
   }
 }
+\midi {
+  \context {
+    \Score
+    midiChannelMapping = #'instrument
+  }
+}
 
 % included from ./out/initial-key.header
 \header {
index 044251bc2bfdb783f31dbd0b55846874f7a2af61..50b2cb388acebd4b4c9b51945579deda669c65a2 100644 (file)
@@ -1,5 +1,5 @@
 % Lily was here -- automatically converted by ../../../scripts/midi2ly.py from out-www/option-key.midi
-\version "2.13.53"
+\version "2.13.54"
 
 \layout {
   \context {
     \consists "Completion_rest_engraver"
   }
 }
+\midi {
+  \context {
+    \Score
+    midiChannelMapping = #'instrument
+  }
+}
 
 % included from ./out-www/option-key.header
 \header {
index c8a08e44798194ceba9bc53c75e0ab33b7399dc0..97d688ff3889fdaf8526d075dfc976ab3cc20e5b 100644 (file)
@@ -1,5 +1,5 @@
 % Lily was here -- automatically converted by ../../../scripts/midi2ly.py from out/initial-key.midi
-\version "2.13.53"
+\version "2.13.54"
 
 \layout {
   \context {
     \consists "Completion_rest_engraver"
   }
 }
+\midi {
+  \context {
+    \Score
+    midiChannelMapping = #'instrument
+  }
+}
 
 % included from ./out/initial-key.header
 \header {
index dd5a38b12c9c6f8f30b37b35a4aaafd28bae71cc..1bfed81a13e569b3d81b715f08c9b6f28943e2aa 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.13.53"
+\version "2.13.54"
 
 \layout {
   \context {
@@ -9,6 +9,12 @@
     \consists "Completion_rest_engraver"
   }
 }
+\midi {
+  \context {
+    \Score
+    midiChannelMapping = #'instrument
+  }
+}
 
 \header {
 texidoc="Partcombined music is preserved"
index 1944b2d4aefecaf4e278791ed07ff7d59aa12d84..faaff0de893adc32add46e0b5cd337d564cabf20 100644 (file)
@@ -1,5 +1,5 @@
 % Lily was here -- automatically converted by out/bin/midi2ly from /home/janneke/testmidi.mid
-\version "2.13.53"
+\version "2.13.54"
 
 \layout {
   \context {
     \consists "Completion_rest_engraver"
   }
 }
+\midi {
+  \context {
+    \Score
+    midiChannelMapping = #'instrument
+  }
+}
 
 \header {
 texidoc="midi2ly @code{--duration-quant} preserves first note length (16)"
index 051f7c96b516b7ad6cfa920c05b2b67f782576ce..f7fe531676b3a9ecbb4555cfc013ddd1554ed494 100644 (file)
@@ -1,5 +1,5 @@
 % Lily was here -- automatically converted by ../../../scripts/midi2ly.py from out-www/voice-2.midi
-\version "2.13.53"
+\version "2.13.54"
 
 \layout {
   \context {
     \consists "Completion_rest_engraver"
   }
 }
+\midi {
+  \context {
+    \Score
+    midiChannelMapping = #'instrument
+  }
+}
 
 % included from ./out-www/voice-2.header
 \header {
index 708d57918e7b471ec0c804ca64e4749a93213f8b..d2e8f100b840365bb83cfc5cfc42f50a0b3daa8b 100644 (file)
@@ -1,5 +1,5 @@
 % Lily was here -- automatically converted by ../../../scripts/midi2ly.py from out-www/voice-2.midi
-\version "2.13.53"
+\version "2.13.54"
 
 \layout {
   \context {
     \consists "Completion_rest_engraver"
   }
 }
+\midi {
+  \context {
+    \Score
+    midiChannelMapping = #'instrument
+  }
+}
 
 % included from ./out-www/voice-2.header
 \header {
index 40132960158c40f222457e3a9e32a786af2ac350..372ded5c96c7dfd6857071276b4421cf3bb71be5 100644 (file)
@@ -1,5 +1,5 @@
 % Lily was here -- automatically converted by ../../../scripts/midi2ly.py from out-www/rest.midi
-\version "2.13.53"
+\version "2.13.54"
 
 \layout {
   \context {
     \consists "Completion_rest_engraver"
   }
 }
+\midi {
+  \context {
+    \Score
+    midiChannelMapping = #'instrument
+  }
+}
 
 % included from ./out-www/rest.header
 \header {
index 8d90c9d29f33333334e36204036003a2860eba63..10011a7a0a333e0c7fb5f061b74a1a02c480a2f2 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.13.53"
+\version "2.13.54"
 
 \header {
 texidoc="Midi2ly remaps voices correctly to staves in MIDI-files that use instrument<->channel mapping when combined with voice<->track mapping.  TODO: pianostaff"
@@ -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 ea4583652dffd21504404179dcde5adfbe1275f8..4e4cfc0024083aa932b0a6a848b16e73fe03630d 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.13.53"
+\version "2.13.54"
 
 \header {
 texidoc="Midi2ly remaps voices correctly to staves in MIDI-files that use voice<->channel mapping when combined with staff<->track mapping.  TODO: pianostaff"
index 63d6c0581f5309fcd60239e99dd5529ec5e3df4b..383764b0971f22fa33f0c294d8d43847fcce52b5 100644 (file)
@@ -1,5 +1,5 @@
 % Lily was here -- automatically converted by ../../../scripts/midi2ly.py from out-www/voice-2.midi
-\version "2.13.53"
+\version "2.13.54"
 
 \layout {
   \context {
     \consists "Completion_rest_engraver"
   }
 }
+\midi {
+  \context {
+    \Score
+    midiChannelMapping = #'instrument
+  }
+}
 
 % included from ./out-www/voice-2.header
 \header {
index a615933e675fec474fe052c2fe996373578b02cb..1c71d092218c47d202b4bc9c4a7fd43ac4385f4b 100644 (file)
@@ -1,5 +1,5 @@
 % Lily was here -- automatically converted by ../../../scripts/midi2ly.py from out-www/voice-4.midi
-\version "2.13.53"
+\version "2.13.54"
 
 \layout {
   \context {
     \consists "Completion_rest_engraver"
   }
 }
+\midi {
+  \context {
+    \Score
+    midiChannelMapping = #'instrument
+  }
+}
 
 % included from ./out-www/voice-4.header
 \header {
index 297e39f9fa38d861991f1ce4a69deed2ab7f5937..17ab81a0ba506d8d2ff119e97352f6b34a21a2b3 100644 (file)
@@ -1,5 +1,5 @@
 % Lily was here -- automatically converted by ../../../scripts/midi2ly.py from out-www/voice-4.midi
-\version "2.13.53"
+\version "2.13.54"
 
 \layout {
   \context {
     \consists "Completion_rest_engraver"
   }
 }
+\midi {
+  \context {
+    \Score
+    midiChannelMapping = #'instrument
+  }
+}
 
 % included from ./out-www/voice-5.header
 \header {
index 1b9e18665a541c8bd7f37e094a9658d3bc7834e8..6e0deaf9762ab1d94d1acc2d9285190b2c70efd9 100644 (file)
 
   melismaBusyProperties = #default-melisma-properties
   instrumentName = #"bright acoustic"
-  midiChannelMapping = #'instrument
+  midiChannelMapping = #'staff
 
   %% quarter = 60
   tempoWholesPerMinute = #(ly:make-moment 15 1)