codeformat
This commit is contained in:
parent
3d37c73103
commit
009f5445be
1 changed files with 3 additions and 3 deletions
|
|
@ -813,8 +813,8 @@ class ByteBeatProcessor extends AudioWorkletProcessor {
|
||||||
let { codeText } = event.data;
|
let { codeText } = event.data;
|
||||||
const { byteBeatStartTime } = event.data;
|
const { byteBeatStartTime } = event.data;
|
||||||
if (byteBeatStartTime != null) {
|
if (byteBeatStartTime != null) {
|
||||||
this.t = 0
|
this.t = 0;
|
||||||
this.initialOffset = Math.floor(byteBeatStartTime)
|
this.initialOffset = Math.floor(byteBeatStartTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Optimization pulled from dollchan.net: https://github.com/Chasyxx/EnBeat_NEW, it seemed important
|
//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++) {
|
for (let i = 0; i < output[0].length; i++) {
|
||||||
const detune = getParamValue(i, params.detune);
|
const detune = getParamValue(i, params.detune);
|
||||||
const freq = applySemitoneDetuneToFrequency(getParamValue(i, params.frequency), detune / 100);
|
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);
|
const funcValue = this.func(local_t);
|
||||||
let signal = (funcValue & 255) / 127.5 - 1;
|
let signal = (funcValue & 255) / 127.5 - 1;
|
||||||
const out = signal * 0.2;
|
const out = signal * 0.2;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue