Skip to content
This repository has been archived by the owner on May 2, 2022. It is now read-only.

Sf2Synth1: Bad noteOn/noteOff responses #6

Closed
notator opened this issue Nov 10, 2015 · 2 comments
Closed

Sf2Synth1: Bad noteOn/noteOff responses #6

notator opened this issue Nov 10, 2015 · 2 comments

Comments

@notator
Copy link
Owner

notator commented Nov 10, 2015

  1. Start the WebMIDISynthHost application,
  2. Select the Sf2Synth1 synthesizer
  3. 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?

@notator notator changed the title Patch 0 (grand piano) NoteOff responds slowly on jigSf2synth Patch 0 (grand piano) NoteOff responds slowly on Sf2Synth1 Nov 18, 2015
@notator notator changed the title Patch 0 (grand piano) NoteOff responds slowly on Sf2Synth1 Bad noteOn/noteOff responses on Sf2Synth1 when playing preset 0 (grand piano) Nov 18, 2015
@notator notator changed the title Bad noteOn/noteOff responses on Sf2Synth1 when playing preset 0 (grand piano) Sf2Synth1: Bad noteOn/noteOff responses when playing preset 0 (grand piano) Nov 18, 2015
@notator notator changed the title Sf2Synth1: Bad noteOn/noteOff responses when playing preset 0 (grand piano) Sf2Synth1: Bad noteOn/noteOff responses Nov 19, 2015
@notator
Copy link
Owner Author

notator commented Nov 26, 2015

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:

  1. set the first synth's master volume to 0.
  2. set its soundFont to the first soundFont
  3. send a dummy noteOn/noteOff pair
  4. 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?

@notator
Copy link
Owner Author

notator commented Dec 7, 2015

This issue has moved to SimpleSoundFontSynthHost issue #5

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

No branches or pull requests

1 participant