kittykatattack / sound.js

A micro-library to load, play and generate sound effects and music for games and interactive applications
300 stars 44 forks source link

optimization for modern JS. decluttered global javascript memory and … #31

Open Keon-Kim-0 opened 3 years ago

Keon-Kim-0 commented 3 years ago

optimization for modern JS. decluttered global javascript memory and optimized reverb/impulseResponse efficiency.

Keon-Kim-0 commented 3 years ago

Hey I absolutely loved your library, I used it extensively with my react/redux/sql/express music production application (website) with it. But reverb was not as efficient/fast as I needed it to be for the computational load my app produces(100s of notes at ones using synth), causing stutters and buffer lagging. I then attempted to improve the library's time/space complexity by optimizing mathematical calculations, specifically for reverb function (impulseResponse) and switching out var to modern declarations to free up global memory. And I'am happy to say that I was able to bring significant improvements on the performence. I would love it if you can review it and compare for your self, I left all the original comments. Much love, keep up the great work! I genuinely thought there was no other all in one package audiocontext.api library better than yours. I really hope you keep this repo going! Kudos to you my man!