Description
From WebMIDISynthHost issue #6:
- Start the WebMIDISynthHost application,
- Select the ResidentSf2Synth synthesizer
- Using the default "grand piano" preset, send the default noteOn.
There is a delay before the synth responds to the first noteOn. Why?
Even when the noteOn is reponding correctly, the noteOff does not respond immediately if it comes too soon. Why?
.................
I've now solved both these issues, but have been unable to discover why the first noteOn is delayed, and my solution to the noteOff problem is also not entirely satisfactory.
My kludge for the delayed NoteOn problem is as follows:
When the first soundfont has loaded:
- set the first synth's master volume to 0.
- set its soundFont to the first soundFont
- send a dummy noteOn/noteOff pair
- after ca.2 seconds, reset the master volume and tell the host that the font has loaded.
Not nice, but it works. I think there may be an uninitialized buffer somewhere, but have been unable to find it...
NoteOffs now end the sound much earlier.
In the original gree code, notes stop sounding instrument.volRelease
seconds after the noteOff arrives.
In the Arachno font, instrument.volRelease
is 3.08 in preset 0 (grand piano).
It cannot be the case that a piano note only stops 3.08 seconds after a noteOff arrives. Multiplying the instrument's volRelease
and modRelease
attributes by 0.1 sounds much more realistic...
This is probably not the correct, official solution, but it produces acceptable behaviour for all the presets I've tried. Anyone know what that correct solution is?