diff --git a/js-programming/bytebeat-render.js b/js-programming/bytebeat-render.js index 48967b9..7402c78 100644 --- a/js-programming/bytebeat-render.js +++ b/js-programming/bytebeat-render.js @@ -53,7 +53,6 @@ const tan = Math.tan const tanh = Math.tanh const generateAudio = t => { - t *= FINAL_SAMPLE_RATE_CONVERSION return t&t>>8 } @@ -90,7 +89,7 @@ for (let buffer = 0; t < PRODUCT; buffer++) { let idx = 0 for (; idx < BUFFER_SIZE && t < PRODUCT; idx++) { - let sample = generateAudio(t) + let sample = generateAudio(t * FINAL_SAMPLE_RATE_CONVERSION) if (sample.constructor === Array) sample.forEach((sample, index) => { audioData[CHANNELS * idx + index] = constrainValue(sample);