OSC.cpp
// set the phase increment to travel across wave table every frame
set the phase increment to travel across wave table every frame
set the phase increment to travel across wave table every frame
void OSC::setIncrement(double noteFreq)
{
	adjustedFreq = noteFreq + detune;
	increment = ( static_cast<double>(OSC_TABLE_SIZE) / ( OSC_SAMPLE_RATE / adjustedFreq ) );
	if(increment < 0)
		increment = 0;
}
void OSC :: setIncrement ( double noteFreq ) { adjustedFreq = noteFreq + detune ; increment = ( static_cast < double > ( OSC_TABLE_SIZE ) / ( OSC_SAMPLE_RATE / adjustedFreq ) ) ; if ( increment < 0 ) increment = 0 ; }
set the phase increment to travel across wave table every frame
set the phase increment to travel across wave table every frame
// calculate with detune // finally, set the phase increment