mirror of
https://github.com/thestk/stk
synced 2026-01-12 20:41:52 +00:00
Version 2.01
This commit is contained in:
committed by
Stephen Sinclair
parent
6485746ee9
commit
ea749b71d2
20
Rhodey.cpp
20
Rhodey.cpp
@@ -13,19 +13,19 @@ Rhodey :: Rhodey() : FM4Alg5()
|
||||
"rawwaves/sinewave.raw",
|
||||
"rawwaves/sinewave.raw",
|
||||
"rawwaves/fwavblnk.raw");
|
||||
this->setRatio(0,1.0);
|
||||
this->setRatio(1,0.5);
|
||||
this->setRatio(2,1.0);
|
||||
this->setRatio(3,15.0);
|
||||
this->setRatio(0,(MY_FLOAT) 1.0);
|
||||
this->setRatio(1,(MY_FLOAT) 0.5);
|
||||
this->setRatio(2,(MY_FLOAT) 1.0);
|
||||
this->setRatio(3,(MY_FLOAT) 15.0);
|
||||
gains[0] = __FM4Op_gains[99];
|
||||
gains[1] = __FM4Op_gains[90];
|
||||
gains[2] = __FM4Op_gains[99];
|
||||
gains[3] = __FM4Op_gains[67];
|
||||
adsr[0]->setAll(0.05,0.00003,0.0,0.02);
|
||||
adsr[1]->setAll(0.05,0.00003,0.0,0.02);
|
||||
adsr[2]->setAll(0.05,0.00005,0.0,0.02);
|
||||
adsr[3]->setAll(0.05,0.0002,0.0,0.02);
|
||||
twozero->setGain(1.0);
|
||||
adsr[0]->setAllTimes((MY_FLOAT) 0.001,(MY_FLOAT) 1.50,(MY_FLOAT) 0.0,(MY_FLOAT) 0.04);
|
||||
adsr[1]->setAllTimes((MY_FLOAT) 0.001,(MY_FLOAT) 1.50,(MY_FLOAT) 0.0,(MY_FLOAT) 0.04);
|
||||
adsr[2]->setAllTimes((MY_FLOAT) 0.001,(MY_FLOAT) 1.00,(MY_FLOAT) 0.0,(MY_FLOAT) 0.04);
|
||||
adsr[3]->setAllTimes((MY_FLOAT) 0.001,(MY_FLOAT) 0.25,(MY_FLOAT) 0.0,(MY_FLOAT) 0.04);
|
||||
twozero->setGain((MY_FLOAT) 1.0);
|
||||
}
|
||||
|
||||
Rhodey :: ~Rhodey()
|
||||
@@ -35,7 +35,7 @@ Rhodey :: ~Rhodey()
|
||||
|
||||
void Rhodey :: setFreq(MY_FLOAT frequency)
|
||||
{
|
||||
baseFreq = frequency * 2.0;
|
||||
baseFreq = frequency * (MY_FLOAT) 2.0;
|
||||
waves[0]->setFreq(baseFreq * ratios[0]);
|
||||
waves[1]->setFreq(baseFreq * ratios[1]);
|
||||
waves[2]->setFreq(baseFreq * ratios[2]);
|
||||
|
||||
Reference in New Issue
Block a user