Skip to content
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

Where in the code is MIDI.Soundfont being filled? #42

Open
page200 opened this issue Jul 9, 2023 · 1 comment
Open

Where in the code is MIDI.Soundfont being filled? #42

page200 opened this issue Jul 9, 2023 · 1 comment

Comments

@page200
Copy link

page200 commented Jul 9, 2023

When loading a MIDI file, I'd like to load only the audio for the notes that will play in that file, rather than also all other notes in the SoundFont for that instrument. The goal is to save loading time, internet traffic, and RAM.

Could you please give me a hint where in the code the global variable MIDI.Soundfont gets set?

(I tried various things to find that out. I didn't find it by searching the code. When I step through the code in debug mode, MIDI.Soundfont doesn't get updated, maybe because the code notices the slowness of my stepping and has a mechanic of giving up when some steps take too long. Surprisingly, debugPropertySet(MIDI, "Soundfont") from https://github.com/mattzeunert/javascript-breakpoint-collection doesn't get triggered by changes of MIDI.Soundfont. A Watch of MIDI.Soundfont in Chrome Developer Tools doesn't trigger a breakpoint and shows an outdated value of MIDI.Soundfont.)

@gleitz
Copy link
Owner

gleitz commented Jul 14, 2023

You may want to post in the main MIDI.js repo - this is just a repo for soundfonts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants