-
Notifications
You must be signed in to change notification settings - Fork 641
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
Consuming a lot of ram #245
Comments
Chrome tab* |
On load it decompresses all the samples back to raw PCM audio. The sound fonts (if generated with the included soundfont builder script) have 3 seconds of stereo audio for 80+ notes.. that is where your 100Mb+ per instrument comes from. I reduced it in my application by trimming silence in the sound fonts so that they are not all 3 seconds. That will help for any instrument sound that decays, like a piano, or drums. It helps for drums especially because some of the notes do not even have a sound - with the original script you have 3 seconds of silence loaded! |
@hmoffatt , Could you please share how you have managed to trim silence in the audio file ? |
I modified the converter (soundfont_builder.rb) to run sox before encoding in order to strip off the silence. The extra line is
I haven't published my whole modified script anywhere as it has other unrelated changes but you get the idea from the above. |
Thank you @hmoffatt |
Hi,
Is there another way to load an instrument than :
Because each time I load an instrument the google tab has an increase of 100Mb of ram.
If there is no other way to load them can we unload instruments ?
The text was updated successfully, but these errors were encountered: