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:
Gary Scavone
2020-03-15 16:45:30 -04:00
parent 444dab21fd
commit a8b6affd8c
6 changed files with 67 additions and 29 deletions

View File

@@ -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 )