Calculate saw and triangle wave from specific data
I need to calculate a triangle and saw wave but it is a little complicate because of my model and the data I'm able to work with (but maybe I'm just confused). I'm able to calculate my sine wave but I'm not really using a frame counter. What I do is, calculate a theta_increment variable which I can use the next time I need to calculate a sample. This works like this: float x = note.frequency / AppSettings::sampleRate; float theta_increment = 2.0f * M_PI * x; float value = 0; if(waveType == SINE){ value = sin(note.theta) * fixedAmplitude; } Now that I have the value of the currend frame/sample