diff --git a/include/instrument_track.h b/include/instrument_track.h index 3922396b0..6817310bb 100644 --- a/include/instrument_track.h +++ b/include/instrument_track.h @@ -131,6 +131,11 @@ public: return( &m_audioPort ); } + inline midiPort * getMidiPort( void ) + { + return( &m_midiPort ); + } + intModel * baseNoteModel( void ) { return( &m_baseNoteModel ); diff --git a/src/core/note_play_handle.cpp b/src/core/note_play_handle.cpp index fd1f4d179..7feb1b42b 100644 --- a/src/core/note_play_handle.cpp +++ b/src/core/note_play_handle.cpp @@ -101,7 +101,7 @@ notePlayHandle::notePlayHandle( instrumentTrack * _it, setFrames( _frames ); // send MIDI-note-on-event m_instrumentTrack->processOutEvent( midiEvent( MidiNoteOn, - m_instrumentTrack->m_midiPort.outputChannel(), + m_instrumentTrack->getMidiPort()->outputChannel(), key(), tLimit( (Uint16) ( ( getVolume() / 100.0f ) * @@ -303,7 +303,7 @@ void notePlayHandle::noteOff( const f_cnt_t _s ) m_instrumentTrack->m_soundShaping.releaseFrames() ); // send MIDI-note-off-event m_instrumentTrack->processOutEvent( midiEvent( MidiNoteOff, - m_instrumentTrack->m_midiPort.outputChannel(), + m_instrumentTrack->getMidiPort()->outputChannel(), key(), 0 ), midiTime::fromFrames( m_framesBeforeRelease, engine::framesPerTick() ) );