mirror of
https://github.com/thestk/stk
synced 2026-04-19 14:06:55 +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).
|
//! Select a bar preset (currently modulo 9).
|
||||||
void setPreset( int preset );
|
void setPreset( int preset );
|
||||||
|
|
||||||
//! Set the modulation (vibrato) depth.
|
//! Set the modulation (vibrato) depth (0.0 - 1.0).
|
||||||
void setModulationDepth( StkFloat mDepth );
|
void setModulationDepth( StkFloat mDepth );
|
||||||
|
|
||||||
//! Perform the control change specified by \e number and \e value (0.0 - 128.0).
|
//! 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);
|
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 )
|
void ModalBar :: setPreset( int preset )
|
||||||
{
|
{
|
||||||
// Presets:
|
// Presets:
|
||||||
|
|||||||
@@ -90,6 +90,11 @@ void Twang :: setLoopGain( StkFloat loopGain )
|
|||||||
loopFilter_.setGain( gain );
|
loopFilter_.setGain( gain );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Twang :: setLoopFilter( std::vector<StkFloat> coefficients )
|
||||||
|
{
|
||||||
|
loopFilter_.setCoefficients( coefficients, true );
|
||||||
|
}
|
||||||
|
|
||||||
void Twang :: setPluckPosition( StkFloat position )
|
void Twang :: setPluckPosition( StkFloat position )
|
||||||
{
|
{
|
||||||
if ( position < 0.0 || position > 1.0 ) {
|
if ( position < 0.0 || position > 1.0 ) {
|
||||||
|
|||||||
Reference in New Issue
Block a user