mirror of
https://github.com/thestk/stk
synced 2026-01-11 20:11:52 +00:00
New default argument to keyOn and keyOff in Envelope, fix in setTime function, updates to Guitar string coupling, EGuitar tcl interface, reordering of operations in Flute algorithm.
This commit is contained in:
@@ -5,7 +5,8 @@
|
||||
This class implements a simple linear line envelope generator
|
||||
which is capable of ramping to an arbitrary target value by a
|
||||
specified \e rate. It also responds to simple \e keyOn and \e
|
||||
keyOff messages, ramping to 1.0 on keyOn and to 0.0 on keyOff.
|
||||
keyOff messages, ramping to a specified target (default = 1.0) on
|
||||
keyOn and to a specified target (default = 0.0) on keyOff.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995--2019.
|
||||
*/
|
||||
@@ -64,7 +65,8 @@ void Envelope :: setTime( StkFloat time )
|
||||
handleError( StkError::WARNING ); return;
|
||||
}
|
||||
|
||||
rate_ = 1.0 / ( time * Stk::sampleRate() );
|
||||
//rate_ = 1.0 / ( time * Stk::sampleRate() );
|
||||
rate_ = fabs(target_ - value_) / ( time * Stk::sampleRate() );
|
||||
}
|
||||
|
||||
void Envelope :: setTarget( StkFloat target )
|
||||
|
||||
Reference in New Issue
Block a user