diff --git a/include/instrument.h b/include/instrument.h index 122fcbc22..a1be74c6f 100644 --- a/include/instrument.h +++ b/include/instrument.h @@ -85,12 +85,6 @@ public: return( 0 ); } - // TO BE REMOVED - virtual bool isMonophonic( void ) const - { - return( FALSE ); - } - // instrument-play-handle-based instruments should return FALSE inline virtual bool notePlayHandleBased( void ) const { diff --git a/include/instrument_track.h b/include/instrument_track.h index 8bee54fdd..2995eb75f 100644 --- a/include/instrument_track.h +++ b/include/instrument_track.h @@ -70,8 +70,7 @@ public: notePlayHandle * _n ); virtual void processInEvent( const midiEvent & _me, - const midiTime & _time, - bool _lock = TRUE ); + const midiTime & _time ); virtual void processOutEvent( const midiEvent & _me, const midiTime & _time ); diff --git a/include/midi_controller.h b/include/midi_controller.h index 3da728fc9..d6e52f4f4 100644 --- a/include/midi_controller.h +++ b/include/midi_controller.h @@ -51,8 +51,7 @@ public: virtual void processInEvent( const midiEvent & _me, - const midiTime & _time, - bool _lock = TRUE ); + const midiTime & _time ); virtual void processOutEvent( const midiEvent& _me, const midiTime & _time) diff --git a/include/midi_event_processor.h b/include/midi_event_processor.h index ff9dfdd08..bd3b1646f 100644 --- a/include/midi_event_processor.h +++ b/include/midi_event_processor.h @@ -44,8 +44,7 @@ public: // to be implemented by inheriting classes virtual void processInEvent( const midiEvent & _me, - const midiTime & _time, - bool _lock = TRUE ) = 0; + const midiTime & _time ) = 0; virtual void processOutEvent( const midiEvent & _me, const midiTime & _time ) = 0; diff --git a/include/midi_port.h b/include/midi_port.h index 46d78d29a..d01dab6eb 100644 --- a/include/midi_port.h +++ b/include/midi_port.h @@ -111,9 +111,9 @@ public: } void subscribeReadablePort( const QString & _port, - bool _subscribe = TRUE ); + bool _subscribe = TRUE ); void subscribeWriteablePort( const QString & _port, - bool _subscribe = TRUE ); + bool _subscribe = TRUE ); const map & readablePorts( void ) const { diff --git a/src/core/midi/midi_controller.cpp b/src/core/midi/midi_controller.cpp index 2196abb40..376844155 100644 --- a/src/core/midi/midi_controller.cpp +++ b/src/core/midi/midi_controller.cpp @@ -79,7 +79,7 @@ void midiController::updateName( void ) void midiController::processInEvent( const midiEvent & _me, - const midiTime & _time, bool _lock ) + const midiTime & _time ) { Uint8 controllerNum; const Uint8 * bytes; diff --git a/src/core/note_play_handle.cpp b/src/core/note_play_handle.cpp index 1f023f896..6ad9516ff 100644 --- a/src/core/note_play_handle.cpp +++ b/src/core/note_play_handle.cpp @@ -260,10 +260,6 @@ void notePlayHandle::play( bool _try_parallelizing, f_cnt_t notePlayHandle::framesLeft( void ) const { -/* const instrument * i = ( m_instrumentTrack != NULL ) ? - m_instrumentTrack->getInstrument() : NULL; - f_cnt_t rftd = ( i != NULL && i->isMonophonic() ) ? - 0 : actualReleaseFramesToDo();*/ if( m_released && actualReleaseFramesToDo() == 0 ) { return( m_framesBeforeRelease ); diff --git a/src/tracks/instrument_track.cpp b/src/tracks/instrument_track.cpp index a217b9495..e1d4d5e42 100644 --- a/src/tracks/instrument_track.cpp +++ b/src/tracks/instrument_track.cpp @@ -207,7 +207,7 @@ void instrumentTrack::processAudioBuffer( sampleFrame * _buf, void instrumentTrack::processInEvent( const midiEvent & _me, - const midiTime & _time, bool _lock ) + const midiTime & _time ) { switch( _me.m_type ) { @@ -246,10 +246,6 @@ void instrumentTrack::processInEvent( const midiEvent & _me, case MidiNoteOff: { - if( _lock ) // TO BE REMOVED - { - engine::getMixer()->lock(); - } notePlayHandle * n = m_notes[_me.key()]; if( n != NULL ) { @@ -270,10 +266,6 @@ void instrumentTrack::processInEvent( const midiEvent & _me, emit noteDone( done_note ); } - if( _lock ) // TO BE REMOVED - { - engine::getMixer()->unlock(); - } break; } @@ -360,60 +352,6 @@ void instrumentTrack::playNote( notePlayHandle * _n, bool _try_parallelizing, if( _n->arpBaseNote() == FALSE && m_instrument != NULL ) { - // TO BE REMOVED - if( m_instrument->isMonophonic() ) - { - constNotePlayHandleVector v = - notePlayHandle::nphsOfInstrumentTrack( this, - TRUE ); - if( v.size() > 1 ) - { - constNotePlayHandleVector::iterator - youngest_note = v.begin(); - for( constNotePlayHandleVector::iterator it = - v.begin(); it != v.end(); ++it ) - { - if( !( *it )->arpBaseNote() && - ( *it )->totalFramesPlayed() <= - ( *youngest_note )-> - totalFramesPlayed() ) - { - youngest_note = it; - } - } - if( *youngest_note != _n && - !( *youngest_note )->arpBaseNote() && - !_n->released() ) - { - processInEvent(midiEvent( - MidiNoteOff, 0, - _n->key(), 0 ), midiTime(), - FALSE ); - if( ( *youngest_note )->offset() > - _n->offset() ) - { - _n->noteOff( ( *youngest_note )-> - offset() - - _n->offset() ); - } - else - { - // for the case the youngest - // note has an offset smaller - // then the current note we - // already played everything - // in last period and have - // to clear parts of it - _n->noteOff(); - engine::getMixer()->clearAudioBuffer( m_audioPort.firstBuffer(), - engine::getMixer()->framesPerPeriod() - - ( *youngest_note )->offset(), - ( *youngest_note )->offset() ); - return; - } - } - } - } // all is done, so now lets play the note! m_instrument->playNote( _n, _try_parallelizing, _working_buffer );