comparison data/midi/MIDIInput.cpp @ 569:9773aadbae0c

* Handle zero-velocity note ons as well as note offs (can't believe I fell for that one) * Add Peek Left / Peek Right (alt+left/right) and change peek-drag (i.e. dragging without moving playback pointer or other panes) from ctrl+drag to alt+drag for symmetry
author Chris Cannam
date Thu, 26 Feb 2009 10:49:08 +0000
parents e6d35670e1df
children d7f3dfe6f9a4
comparison
equal deleted inserted replaced
568:fa32590f5a61 569:9773aadbae0c
53 // are not reliable enough to use. We request instead an audio 53 // are not reliable enough to use. We request instead an audio
54 // frame time from whatever FrameTimer we have been given, and use 54 // frame time from whatever FrameTimer we have been given, and use
55 // that as the event time. 55 // that as the event time.
56 if (!message || message->empty()) return; 56 if (!message || message->empty()) return;
57 unsigned long t = m_frameTimer->getFrame(); 57 unsigned long t = m_frameTimer->getFrame();
58 MIDIByte code = (*message)[0];
58 MIDIEvent ev(t, 59 MIDIEvent ev(t,
59 (*message)[0], 60 code,
60 message->size() > 1 ? (*message)[1] : 0, 61 message->size() > 1 ? (*message)[1] : 0,
61 message->size() > 2 ? (*message)[2] : 0); 62 message->size() > 2 ? (*message)[2] : 0);
62 postEvent(ev); 63 postEvent(ev);
63 } 64 }
64 65