summaryrefslogtreecommitdiff
path: root/libs/ardour/meter.cc
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-08-01 20:50:09 +0000
committerDavid Robillard <d@drobilla.net>2007-08-01 20:50:09 +0000
commitd7db3f757fde92126ef9886370ce604992b7e974 (patch)
tree4ac58366ad0a9980756c23ef58e413ce54bf395f /libs/ardour/meter.cc
parent3f421ac45025a856f03b779363f8f5f60b837b1e (diff)
Better MidiModel command framework, ready to go for all your canvas editing needs.
Rewrote MidiEvent to be a well-behaved self-contained object that optionally owns it's buffer, has proper copying semantics, etc. Fixed crazy bugs triggered by adding lots of events with varying times to a region. Speed up initial session display significantly (don't redraw each MIDI region tons of times, though still happens more than once and can use fixing...). git-svn-id: svn://localhost/ardour2/trunk@2213 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/meter.cc')
-rw-r--r--libs/ardour/meter.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/ardour/meter.cc b/libs/ardour/meter.cc
index 84dac2ded4..74a3e61f9a 100644
--- a/libs/ardour/meter.cc
+++ b/libs/ardour/meter.cc
@@ -49,8 +49,8 @@ PeakMeter::run (BufferSet& bufs, nframes_t start_frame, nframes_t end_frame, nfr
// expressed through peaks alone
for (MidiBuffer::iterator i = bufs.get_midi(n).begin(); i != bufs.get_midi(n).end(); ++i) {
const MidiEvent& ev = *i;
- if ((ev.buffer[0] & 0xF0) == MIDI_CMD_NOTE_ON) {
- const float this_vel = log(ev.buffer[2] / 127.0 * (M_E*M_E-M_E) + M_E) - 1.0;
+ if ((ev.buffer()[0] & 0xF0) == MIDI_CMD_NOTE_ON) {
+ const float this_vel = log(ev.buffer()[2] / 127.0 * (M_E*M_E-M_E) + M_E) - 1.0;
//printf("V %d -> %f\n", (int)((Byte)ev.buffer[2]), this_vel);
if (this_vel > val)
val = this_vel;