From 520b0226025a596a849b852843c0841c7d7256a5 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Tue, 26 Apr 2011 09:33:10 +0200 Subject: [PATCH] MIDI: always set note volume when initialized. Fixes #1636. --- Documentation/changes.tely | 1 - lily/midi-item.cc | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Documentation/changes.tely b/Documentation/changes.tely index 4a70d0cab3..b9297e7ec1 100644 --- a/Documentation/changes.tely +++ b/Documentation/changes.tely @@ -120,7 +120,6 @@ MIDI output has been improved @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 dynamics are now rendered as note velocities, no longer as midi volume. This improves the sound on [high end] midi renderers. -@item @code{midiMaximumVolume = #0.0} no longer silences a channel; use @code{0.01} instead. @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)) { } -- 2.39.2