Add pitchbend to Mallets instrument
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1671 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -267,6 +267,8 @@ void malletsInstrument::playNote( notePlayHandle * _n, bool,
|
||||
const fpp_t frames = _n->framesLeftForCurrentPeriod();
|
||||
|
||||
malletsSynth * ps = static_cast<malletsSynth *>( _n->m_pluginData );
|
||||
ps->setFrequency( freq );
|
||||
|
||||
sample_t add_scale = 0.0f;
|
||||
if( p == 10 )
|
||||
{
|
||||
|
||||
@@ -105,6 +105,14 @@ public:
|
||||
return( s );
|
||||
}
|
||||
|
||||
inline void setFrequency( const StkFloat _pitch )
|
||||
{
|
||||
if( m_voice )
|
||||
{
|
||||
m_voice->setFrequency( _pitch );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected:
|
||||
Instrmnt * m_voice;
|
||||
|
||||
Reference in New Issue
Block a user