diff --git a/ChangeLog b/ChangeLog index 7e5fa243a..b81a48e97 100644 --- a/ChangeLog +++ b/ChangeLog @@ -66,6 +66,10 @@ - Move smoothing button to a more noticable location - Some coding style changes + * plugins/stk/mallets/mallets.cpp: + * plugins/stk/mallets/mallets.h: + Add support for pitch bend + 2008-09-20 Paul Giblock * plugins/sf2_player/sf2_player.cpp: diff --git a/plugins/stk/mallets/mallets.cpp b/plugins/stk/mallets/mallets.cpp index 694c5cd27..b155355c6 100644 --- a/plugins/stk/mallets/mallets.cpp +++ b/plugins/stk/mallets/mallets.cpp @@ -267,6 +267,8 @@ void malletsInstrument::playNote( notePlayHandle * _n, bool, const fpp_t frames = _n->framesLeftForCurrentPeriod(); malletsSynth * ps = static_cast( _n->m_pluginData ); + ps->setFrequency( freq ); + sample_t add_scale = 0.0f; if( p == 10 ) { diff --git a/plugins/stk/mallets/mallets.h b/plugins/stk/mallets/mallets.h index b15134736..5e46ec3e9 100644 --- a/plugins/stk/mallets/mallets.h +++ b/plugins/stk/mallets/mallets.h @@ -105,6 +105,14 @@ public: return( s ); } + inline void setFrequency( const StkFloat _pitch ) + { + if( m_voice ) + { + m_voice->setFrequency( _pitch ); + } + } + protected: Instrmnt * m_voice;