Version 4.3.0

This commit is contained in:
Gary Scavone
2009-03-24 23:02:15 -04:00
committed by Stephen Sinclair
parent 2cbce2d8bd
commit 27d9b79dc7
271 changed files with 22219 additions and 8834 deletions

View File

@@ -9,7 +9,7 @@
\e keyOff messages, ramping to 1.0 on
keyOn and to 0.0 on keyOff.
by Perry R. Cook and Gary P. Scavone, 1995 - 2005.
by Perry R. Cook and Gary P. Scavone, 1995 - 2007.
*/
/***************************************************/
@@ -21,6 +21,7 @@ Envelope :: Envelope(void) : Generator()
value_ = 0.0;
rate_ = 0.001;
state_ = 0;
Stk::addSampleRateAlert( this );
}
Envelope :: Envelope ( const Envelope& e )
@@ -29,10 +30,12 @@ Envelope :: Envelope ( const Envelope& e )
value_ = 0.0;
rate_ = 0.001;
state_ = 0;
Stk::addSampleRateAlert( this );
}
Envelope :: ~Envelope(void)
{
Stk::removeSampleRateAlert( this );
}
Envelope& Envelope :: operator= ( const Envelope& e )
@@ -47,6 +50,12 @@ Envelope& Envelope :: operator= ( const Envelope& e )
return *this;
}
void Envelope :: sampleRateChanged( StkFloat newRate, StkFloat oldRate )
{
if ( !ignoreSampleRateChange_ )
rate_ = oldRate * rate_ / newRate;
}
void Envelope :: keyOn(void)
{
target_ = 1.0;