From 184b53a08962bc08d714efda44609f23fa846232 Mon Sep 17 00:00:00 2001 From: Javier Serrano Polo Date: Fri, 14 Jul 2006 20:08:32 +0000 Subject: [PATCH] handle detuning automation git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@227 0778d3d1-df1d-0410-868b-ea421aaaa00d --- include/note_play_handle.h | 1 + src/core/note_play_handle.cpp | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) 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"