whoops
parent
3dba27fb81
commit
f41af3a0ec
|
@ -57,7 +57,6 @@ void TestSynth::init() {
|
|||
|
||||
void TestSynth::reset() {
|
||||
osc = 0.0;
|
||||
osc2 = 0.0;
|
||||
cvol = 0.0;
|
||||
tvol = 0.0;
|
||||
noteId = 0;
|
||||
|
@ -89,7 +88,7 @@ void TestSynth::process() {
|
|||
if (tvol > cvol) cvol += 64.0 / audioEngine->curSampleRate();
|
||||
else if (tvol < cvol) cvol -= 16.0 / audioEngine->curSampleRate();
|
||||
cvol = std::clamp(cvol, 0.0, 1.0);
|
||||
if (cvol == 0.0) { osc = osc2 = 0.0; }
|
||||
if (cvol == 0.0) { osc = 0.0; }
|
||||
float oscV = static_cast<float>(fOsc(osc) * std::pow(cvol*.5, 4));
|
||||
|
||||
double enote = note + std::sin(lfo * PI*2) * 0.1;
|
||||
|
|
Loading…
Reference in New Issue