diff --git a/js-programming/bytebeat-render.js b/js-programming/bytebeat-render.js index 7402c78..95f5206 100644 --- a/js-programming/bytebeat-render.js +++ b/js-programming/bytebeat-render.js @@ -92,11 +92,11 @@ for (let buffer = 0; t < PRODUCT; buffer++) { let sample = generateAudio(t * FINAL_SAMPLE_RATE_CONVERSION) if (sample.constructor === Array) sample.forEach((sample, index) => { - audioData[CHANNELS * idx + index] = constrainValue(sample); + audioData[CHANNELS * idx + index] = constrainValue(sample) }) else - audioData[idx] = constrainValue(sample); - t++; + audioData[idx] = constrainValue(sample) + t++ } if (t >= PRODUCT) {