summaryrefslogtreecommitdiff
path: root/libs/ardour/amp.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2010-06-09 13:00:54 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2010-06-09 13:00:54 +0000
commit1e728e728a79d9b272cc18bc1c46f0c3c8831bf8 (patch)
tree6ecd938ef19be41d6489540bca740f7a67d88de1 /libs/ardour/amp.cc
parent8f263c239a2090d43221d817442c8141dd439079 (diff)
basically, fix all kinds of odds and ends with MIDI playback, including missed notes and applying gain
git-svn-id: svn://localhost/ardour2/branches/3.0@7247 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/amp.cc')
-rw-r--r--libs/ardour/amp.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/libs/ardour/amp.cc b/libs/ardour/amp.cc
index ceb593f4c3..a739b59088 100644
--- a/libs/ardour/amp.cc
+++ b/libs/ardour/amp.cc
@@ -167,9 +167,8 @@ Amp::apply_gain (BufferSet& bufs, nframes_t nframes, gain_t initial, gain_t targ
Evoral::MIDIEvent<MidiBuffer::TimeType> ev = *m;
if (ev.is_note_on()) {
- gain_t scale = delta * (ev.time()/nframes);
- std::cerr << "scale by " << scale << " for " << ev.time() << " of " << nframes << std::endl;
- ev.scale_velocity (scale);
+ gain_t scale = delta * (ev.time()/(double) nframes);
+ ev.scale_velocity (initial+scale);
}
}
}