From 52bc3dff874cd0c02bf5faa93760af42ab0bcaa1 Mon Sep 17 00:00:00 2001 From: Djkato Date: Sat, 18 Feb 2023 19:18:00 +0100 Subject: [PATCH] performance --- index.js | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/index.js b/index.js index eb0a839..7a7c39c 100644 --- a/index.js +++ b/index.js @@ -9,8 +9,6 @@ audio_element.src = "Jamie xx - Sleep Sound.mp3" let track let audio_context_analyzer -let prev_data = new Array() - function main() { audio_context = new AudioContext() @@ -61,19 +59,6 @@ function animate() { path += `Z ` path = `` - /** - * compare FFTData to previous ones - */ - let matched_amount = 0 - for (let prev_dat in prev_data) { - if (prev_dat == fft_data_array) { - matched_amount += 1 - } - } - console.log(`Matched ${matched_amount} times!`) - - prev_data.push(fft_data_array) - svg_canvas.innerHTML = path const drawVisual = requestAnimationFrame(animate)