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.)
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 ofMIDI.Soundfont
. A Watch ofMIDI.Soundfont
in Chrome Developer Tools doesn't trigger a breakpoint and shows an outdated value ofMIDI.Soundfont
.)