Results 19 comments of jet

I also encountered this problem. Since it seems not so difficult to fix, I created the PR #2023.

Well, it seems no problem for your code, but I suggest that the function `myHookPlayerEvents` is placed at the separate script file. - foo.js ```js AudioWorkletGlobalScope.myHookPlayerEvents = function (s, type,...

js-synthesizer package in npm includes JS files (ES modules) in dist/lib directory and if you use webpack, `import * as JSSynth from 'js-synthesizer'` will read JS files in dist/lib (since...

I created the repository https://github.com/jet2jet/js-synthesizer-test-webpack for the test. This repository should work (at lease it worked in my environment) so please use and confirm this to check the problem.

> - Would I have to load a soundfont each time when playing the midi? If so, can the soundfont be cached somehow? No, it's OK to load Soundfont only...

> Wouldn't each call load the soundfont? Sorry for the unkind code, but Soundfont is only needed to load once. That sample code was simply intended to play a MIDI...

> Can your module connect to an available midi port? No, Emscripten, used to build wasm version of fluidsynth, does not have ability to send messages to a MIDI port,...

> How would I play a noteOn event with a violin? For MIDI, it is necessary to send Program Change message to change the instrument. So, you need to call...

> is there a way to increase the polyphony with this API? The second parameter of `synth.init` is `SynthesizerSettings`, which has `polyphony` field. To increase the polyphony, please specify `SynthesizerSettings`....

When using `synth.createAudioNode`, the audio node can be used as follows: ```js const node = synth.createAudioNode(ac, 2048); // 2048 is optional ac.destination.connect(node); // after this, `synth.render` is called automatically (from...