float getNextSample(){ float vca1 = sine->getNextSample(); vca1 += chirp->getNextSample(); vca1 *= env1->getNextSample(); float vca2 = 0.0f; vca2 += impulse->getNextSample(); // vca2 += filter->process(noise->getNextSample()); // vca2 *= env2->getNextSample(); vca2 += noise->getNextSample(); vca2 = filter->process(vca2); vca2 *= env2->getNextSample(); float sample = vca1*(1.0-balance) + vca2*balance; return sample; }
float getNextSample(float fm){ return env.getNextSample()*index*osc.getNextSample(fm); }