mirror of
https://github.com/thestk/stk
synced 2026-01-17 06:41:51 +00:00
Added missing Twang::setLoopFilter() and ModalBar::setModulationDepth() functions.
This commit is contained in:
@@ -53,7 +53,7 @@ public:
|
||||
//! Select a bar preset (currently modulo 9).
|
||||
void setPreset( int preset );
|
||||
|
||||
//! Set the modulation (vibrato) depth.
|
||||
//! Set the modulation (vibrato) depth (0.0 - 1.0).
|
||||
void setModulationDepth( StkFloat mDepth );
|
||||
|
||||
//! Perform the control change specified by \e number and \e value (0.0 - 128.0).
|
||||
|
||||
@@ -83,6 +83,15 @@ void ModalBar :: setStrikePosition( StkFloat position )
|
||||
this->setModeGain(2, 0.11 * temp);
|
||||
}
|
||||
|
||||
void ModalBar :: setModulationDepth( StkFloat mDepth )
|
||||
{
|
||||
if ( mDepth < 0.0 || mDepth > 1.0 ) {
|
||||
oStream_ << "ModalBar::setModulationDepth: parameter is out of range!";
|
||||
handleError( StkError::WARNING ); return;
|
||||
}
|
||||
vibratoGain_ = mDepth * 0.3;
|
||||
}
|
||||
|
||||
void ModalBar :: setPreset( int preset )
|
||||
{
|
||||
// Presets:
|
||||
|
||||
@@ -90,6 +90,11 @@ void Twang :: setLoopGain( StkFloat loopGain )
|
||||
loopFilter_.setGain( gain );
|
||||
}
|
||||
|
||||
void Twang :: setLoopFilter( std::vector<StkFloat> coefficients )
|
||||
{
|
||||
loopFilter_.setCoefficients( coefficients, true );
|
||||
}
|
||||
|
||||
void Twang :: setPluckPosition( StkFloat position )
|
||||
{
|
||||
if ( position < 0.0 || position > 1.0 ) {
|
||||
|
||||
Reference in New Issue
Block a user