mirror of
https://github.com/thestk/stk
synced 2026-01-14 05:21:53 +00:00
Version 4.1
This commit is contained in:
committed by
Stephen Sinclair
parent
81475b04c5
commit
2f09fcd019
@@ -18,7 +18,7 @@ Modulate :: Modulate()
|
||||
// Concatenate the STK RAWWAVE_PATH to the rawwave file
|
||||
char file[128];
|
||||
strcpy(file, RAWWAVE_PATH);
|
||||
vibrato = new WaveLoop( strcat(file,"rawwaves/sinewave.raw"), TRUE );
|
||||
vibrato = new WaveLoop( strcat(file,"sinewave.raw"), TRUE );
|
||||
vibrato->setFrequency( 6.0 );
|
||||
vibratoGain = 0.04;
|
||||
|
||||
@@ -57,7 +57,7 @@ void Modulate :: setRandomGain(MY_FLOAT aGain)
|
||||
filter->setGain( randomGain );
|
||||
}
|
||||
|
||||
MY_FLOAT Modulate :: tick()
|
||||
MY_FLOAT Modulate :: tick()
|
||||
{
|
||||
// Compute periodic and random modulations.
|
||||
lastOutput = vibratoGain * vibrato->tick();
|
||||
@@ -65,6 +65,14 @@ MY_FLOAT Modulate :: tick()
|
||||
return lastOutput;
|
||||
}
|
||||
|
||||
MY_FLOAT *Modulate :: tick(MY_FLOAT *vector, unsigned int vectorSize)
|
||||
{
|
||||
for (unsigned int i=0; i<vectorSize; i++)
|
||||
vector[i] = tick();
|
||||
|
||||
return vector;
|
||||
}
|
||||
|
||||
MY_FLOAT Modulate :: lastOut() const
|
||||
{
|
||||
return lastOutput;
|
||||
|
||||
Reference in New Issue
Block a user