From 009f5445bef7571675e03b7be41e5cd55f94a2be Mon Sep 17 00:00:00 2001 From: "Jade (Rose) Rowland" Date: Thu, 29 May 2025 14:33:25 +0200 Subject: [PATCH] codeformat --- packages/superdough/worklets.mjs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/superdough/worklets.mjs b/packages/superdough/worklets.mjs index aa0fe5662..24f7434a9 100644 --- a/packages/superdough/worklets.mjs +++ b/packages/superdough/worklets.mjs @@ -813,8 +813,8 @@ class ByteBeatProcessor extends AudioWorkletProcessor { let { codeText } = event.data; const { byteBeatStartTime } = event.data; if (byteBeatStartTime != null) { - this.t = 0 - this.initialOffset = Math.floor(byteBeatStartTime) + this.t = 0; + this.initialOffset = Math.floor(byteBeatStartTime); } //Optimization pulled from dollchan.net: https://github.com/Chasyxx/EnBeat_NEW, it seemed important @@ -878,7 +878,7 @@ class ByteBeatProcessor extends AudioWorkletProcessor { for (let i = 0; i < output[0].length; i++) { const detune = getParamValue(i, params.detune); const freq = applySemitoneDetuneToFrequency(getParamValue(i, params.frequency), detune / 100); - let local_t = ((this.t / (sampleRate / 256)) * freq) + this.initialOffset + let local_t = (this.t / (sampleRate / 256)) * freq + this.initialOffset; const funcValue = this.func(local_t); let signal = (funcValue & 255) / 127.5 - 1; const out = signal * 0.2;