From e9de0dec8a96d42ff0fd1ba406dfaba5f76ba2a0 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 4 Jun 2007 03:24:14 +0000 Subject: [PATCH] Fix MIDI metering to not "clip" on many notes. git-svn-id: svn://localhost/ardour2/trunk@1951 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/meter.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/ardour/meter.cc b/libs/ardour/meter.cc index 2a7b438c52..f0575b7621 100644 --- a/libs/ardour/meter.cc +++ b/libs/ardour/meter.cc @@ -53,7 +53,7 @@ PeakMeter::run (BufferSet& bufs, nframes_t nframes, nframes_t offset) if ((ev.buffer[0] & 0xF0) == MIDI_CMD_NOTE_ON) { const float normal_vel = ev.buffer[2] / 127.0; if (normal_vel > val) - val += normal_vel; + val = normal_vel; } else { val += 1.0 / bufs.get_midi(n).capacity(); }