From f4e12f1b0cb5dfb32f193f87e7ca28c406b87771 Mon Sep 17 00:00:00 2001 From: Dan Eble Date: Sun, 5 Jun 2016 17:29:37 -0400 Subject: [PATCH] Issue 2232: fix MIDI output of abutting (de)crescendi --- input/regression/midi/crescendo-abutting.ly | 10 ++++++++++ lily/dynamic-performer.cc | 5 +++-- 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 input/regression/midi/crescendo-abutting.ly diff --git a/input/regression/midi/crescendo-abutting.ly b/input/regression/midi/crescendo-abutting.ly new file mode 100644 index 0000000000..da0ff4ffa0 --- /dev/null +++ b/input/regression/midi/crescendo-abutting.ly @@ -0,0 +1,10 @@ +\version "2.19.44" + +\header { + texidoc="One (de)crescendo ends as the next begins." +} + +\score { + { c\< c\> c\! } + \midi {} +} diff --git a/lily/dynamic-performer.cc b/lily/dynamic-performer.cc index 75b153ace8..5ce67f0463 100644 --- a/lily/dynamic-performer.cc +++ b/lily/dynamic-performer.cc @@ -103,9 +103,10 @@ Dynamic_performer::equalize_volume (Real volume) void Dynamic_performer::process_music () { - if (span_events_[STOP] || script_event_) + if (span_events_[START] || span_events_[STOP] || script_event_) { - // End of a dynamic spanner, or an explicit dynamic script event. + // End the previous spanner when a new one begins or at an explicit stop + // or absolute dynamic. finished_span_dynamic_ = span_dynamic_; span_dynamic_ = 0; } -- 2.39.2