From 5d6cfc01f840874e917a5383b18226f91c831e12 Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Sat, 30 Aug 2008 00:04:42 +0000 Subject: [PATCH] pass all MIDI events to instrument git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1519 0778d3d1-df1d-0410-868b-ea421aaaa00d --- src/tracks/instrument_track.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/tracks/instrument_track.cpp b/src/tracks/instrument_track.cpp index 90830ba50..e4e5a8265 100644 --- a/src/tracks/instrument_track.cpp +++ b/src/tracks/instrument_track.cpp @@ -205,6 +205,7 @@ void instrumentTrack::processInEvent( const midiEvent & _me, case MidiNoteOn: if( _me.velocity() > 0 ) { + m_instrument->handleMidiEvent( _me, _time ); if( m_notes[_me.key()] == NULL ) { if( !configManager::inst()->value( "ui", @@ -237,6 +238,7 @@ void instrumentTrack::processInEvent( const midiEvent & _me, case MidiNoteOff: { + m_instrument->handleMidiEvent( _me, _time ); notePlayHandle * n = m_notes[_me.key()]; if( n != NULL ) { @@ -282,8 +284,11 @@ void instrumentTrack::processInEvent( const midiEvent & _me, break; default: - printf( "instrument-track: unhandled MIDI-event %d\n", - _me.m_type ); + if( !m_instrument->handleMidiEvent( _me, _time ) ) + { + printf( "instrument-track: unhandled " + "MIDI event %d\n", _me.m_type ); + } break; } } @@ -324,6 +329,7 @@ void instrumentTrack::processOutEvent( const midiEvent & _me, default: break; } + m_instrument->handleMidiEvent( _me, _time ); // if appropriate, midi-port does futher routing m_midiPort.processOutEvent( _me, _time ); } @@ -364,7 +370,7 @@ QString instrumentTrack::instrumentName( void ) const void instrumentTrack::deleteNotePluginData( notePlayHandle * _n ) { - if( m_instrument != NULL && _n->m_pluginData != NULL ) + if( m_instrument != NULL ) { m_instrument->deleteNotePluginData( _n ); }