Version 4.4.2

This commit is contained in:
Gary Scavone
2013-09-29 23:15:24 +02:00
committed by Stephen Sinclair
parent b6a2202011
commit baca57040b
221 changed files with 1281 additions and 913 deletions

View File

@@ -19,7 +19,7 @@
Alternately, control changes can be sent to all voices in a given
group.
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
*/
/***************************************************/
@@ -165,10 +165,10 @@ void Voicer :: setFrequency( long tag, StkFloat noteNumber )
void Voicer :: pitchBend( StkFloat value, int group )
{
StkFloat pitchScaler;
if ( value < 64.0 )
pitchScaler = pow(0.5, (64.0-value)/64.0);
if ( value < 8192.0 )
pitchScaler = pow( 0.5, (8192.0-value) / 8192.0 );
else
pitchScaler = pow(2.0, (value-64.0)/64.0);
pitchScaler = pow( 2.0, (value-8192.0) / 8192.0 );
for ( unsigned int i=0; i<voices_.size(); i++ ) {
if ( voices_[i].group == group )
voices_[i].instrument->setFrequency( (StkFloat) (voices_[i].frequency * pitchScaler) );
@@ -178,10 +178,10 @@ void Voicer :: pitchBend( StkFloat value, int group )
void Voicer :: pitchBend( long tag, StkFloat value )
{
StkFloat pitchScaler;
if ( value < 64.0 )
pitchScaler = pow(0.5, (64.0-value)/64.0);
if ( value < 8192.0 )
pitchScaler = pow( 0.5, (8192.0-value) / 8192.0 );
else
pitchScaler = pow(2.0, (value-64.0)/64.0);
pitchScaler = pow( 2.0, (value-8192.0) / 8192.0 );
for ( unsigned int i=0; i<voices_.size(); i++ ) {
if ( voices_[i].tag == tag ) {
voices_[i].instrument->setFrequency( (StkFloat) (voices_[i].frequency * pitchScaler) );