pass all MIDI events to instrument

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1519 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2008-08-30 00:04:42 +00:00
parent d3763240b3
commit 5d6cfc01f8

View File

@@ -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 );
}