From: Jan Nieuwenhuizen Date: Tue, 26 Apr 2011 07:33:10 +0000 (+0200) Subject: MIDI: always set note volume when initialized. Fixes #1636. X-Git-Tag: release/2.13.61-1~4 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=9b8bc059ef1f4b932b9cd6ec522945cdcd99e1cb;p=lilypond.git MIDI: always set note volume when initialized. Fixes #1636. --- diff --git a/Documentation/changes.tely b/Documentation/changes.tely index 0c468b14be..552a0e7edc 100644 --- a/Documentation/changes.tely +++ b/Documentation/changes.tely @@ -109,9 +109,10 @@ Lilypond now engraves woodwind fingering charts. @item MIDI output has been improved @itemize @bullet -@item voices are kept separated, which makes the MIDI much more useful for postprocessing +@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 dynamics are now rendered as note velocities, no longer as midi dynamics. This improves the sound on [high end] midi renderers. +@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 dynamics are now rendered as note velocities, no longer as midi volume. This improves the sound on [high end] midi renderers. @end itemize @item diff --git a/lily/midi-item.cc b/lily/midi-item.cc index a04553508f..1fcb259ae1 100644 --- a/lily/midi-item.cc +++ b/lily/midi-item.cc @@ -181,7 +181,7 @@ Midi_time_signature::to_string () const Midi_note::Midi_note (Audio_note *a) : Midi_channel_item (a) , audio_ (a) - , dynamic_byte_ (a->dynamic_ && a->dynamic_->volume_ > 0 + , dynamic_byte_ (a->dynamic_ && a->dynamic_->volume_ >= 0 ? Byte (a->dynamic_->volume_ * 0x7f) : Byte (0x5a)) { }