-
-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve Performance #4
Comments
When the website is loaded and before a MIDI file is selected or something is changed, the RAM usage, on my PC, is already at 470 MB (but likely Firefox itself uses two third here independent of the website). Replacing algorithms here can lower the amount of RAM quite a bit. I assume, the soundfont loader is not optimized, maybe loads the complete soundfont into RAM even though only small parts are required for a given MIDI file later. Replacing js core code by wasm will most likely reduce the amount of RAM by half. My guess is, that changes to the pure js code can already achieve the wanted performance improvements, but first, it has to be clear what are the morst resource-hungry task w.r.t. RAM usage and CPU runtime. My guess without looking into the code: soundfont loader and soundfont renderer, gui renderer (especially the notes and effects at high FPS), calculating and rendering the wave effects. Nonetheless, so far I have not seen the performance to be problematic on my laptop. It could play all MIDIs I have tested and RAM usage was also still OK. |
Unfortunately RAM is a big problem, because of a few reasons:
|
Maybe it is possible to supply a "bad quality" default soundfont which uses high compression but has a lower filesize. If it's mainly about RAM, then WASM can indeed give a factor 2 improvement according to the linked benchmarks. Have you tried WASM and were there any problems with it? I could port the code to Rust if the c++ code has issues. |
somehow improve performance of the synthesizer
Either:
Port the worklet system to wasm/emscripten in c++ to improve performance
AudioWorkletProcessor would be a wrapper for a cpp renderOut(left, right) function
or improve the current JavaScript implementation.
The text was updated successfully, but these errors were encountered: