From 93a4e3d688eea8338dca986d2388def6ad82203a Mon Sep 17 00:00:00 2001 From: tildearrow Date: Wed, 25 May 2022 00:34:35 -0500 Subject: [PATCH] WaveSynth: fix phase modulation fixes #481 --- src/engine/waveSynth.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/waveSynth.cpp b/src/engine/waveSynth.cpp index 0dbe852d6..205f3c41c 100644 --- a/src/engine/waveSynth.cpp +++ b/src/engine/waveSynth.cpp @@ -186,7 +186,7 @@ bool DivWaveSynth::tick(bool skipSubDiv) { break; case DIV_WS_PHASE_MOD: for (int i=0; i<=state.speed; i++) { - int mod=(wave2[pos]*(state.param2-stage))>>8; + int mod=(wave2[pos]*(state.param2-stage))/((height+1)*2); output[pos]=wave1[(pos+mod)%width]; if (++pos>=width) { pos=0;