From 5b0de3038af8ac1d049fe563601b8afb953e08d5 Mon Sep 17 00:00:00 2001 From: Lumi Pakkanen Date: Mon, 2 May 2022 20:51:34 +0300 Subject: [PATCH] Fix semisine waveform Swap the order of the real and imaginary parts of semisine to produce the intended waveform in the time domain. --- src/js/synth/Synth.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/synth/Synth.js b/src/js/synth/Synth.js index 100cbaa..2a32669 100644 --- a/src/js/synth/Synth.js +++ b/src/js/synth/Synth.js @@ -73,8 +73,8 @@ class Synth { semisineCosineComponents[n] = 1 / (1 - 4*n*n); } this.custom_waveforms.semisine = this.audioCtx.createPeriodicWave( - semisineSineComponents, - semisineCosineComponents + semisineCosineComponents, + semisineSineComponents ); // set up master gain