diff --git a/include/note_play_handle.h b/include/note_play_handle.h index 78a696b9b..89baf7415 100644 --- a/include/note_play_handle.h +++ b/include/note_play_handle.h @@ -198,6 +198,7 @@ private: private slots: + void processMidiTime( const midiTime & _time ); void updateFrequency( void ); } ; diff --git a/src/core/note_play_handle.cpp b/src/core/note_play_handle.cpp index b05a5a0d0..b157e3613 100644 --- a/src/core/note_play_handle.cpp +++ b/src/core/note_play_handle.cpp @@ -59,6 +59,17 @@ notePlayHandle::notePlayHandle( instrumentTrack * _it, m_arpNote( _arp_note ), m_muted( FALSE ) { + setDetuning( _n.detuning() ); + if( detuning() ) + { + connect( m_instrumentTrack, + SIGNAL( sentMidiTime( const midiTime & ) ), + this, + SLOT( processMidiTime( const midiTime & ) ) ); + processMidiTime( pos() ); + connect( detuning(), SIGNAL( valueChanged( float ) ), + this, SLOT( updateFrequency() ) ); + } connect( m_instrumentTrack, SIGNAL( baseNoteChanged() ), this, SLOT( updateFrequency() ) ); updateFrequency(); @@ -403,6 +414,15 @@ void notePlayHandle::updateFrequency( void ) + +void notePlayHandle::processMidiTime( const midiTime & _time ) +{ + detuning()->getAutomationPattern()->processMidiTime( _time - pos() ); +} + + + + #include "note_play_handle.moc"