2026-04-24 14:52:45 +02:00

16 lines
245 B
C

#include "const.h"
#include "state.h"
#include "vco.h"
float phase = 0.0f;
float vco(void) {
float phase_inc = (state.vco_freq * 1760) / SAMPLE_RATE;
phase += phase_inc;
if (phase >= 1.0f) phase -= 1.0f;
return (phase * 2.0f) - 1.0f;
}