Hi, I’m new to making vst plugins, and I would like to make the saw, triangle, and square waves but I don’t know which function to call other than sin(). Can someone help me?
This is my code so far for waveform generation:
Vst::Sample32* outL = data.outputs[0].channelBuffers32[0];
Vst::Sample32* outR = data.outputs[0].channelBuffers32[1];
for (int32 i = 0; i < data.numSamples; i++){
outL[i] = fOsc1 * sin(fOsc1Phase);
outL[i] += fOsc1 * sin(fOsc2Phase);
outL[i] *= fVolume;
outR[i] = outL[i];
fOsc1Phase += fDeltaAngle;
fOsc2Phase += fDeltaAngle * 2.f;
}