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

ResidentSf2Synth: First notes are silent after synth initialisation #30

Open
notator opened this issue Jun 16, 2017 · 0 comments
Open

Comments

@notator
Copy link
Owner

notator commented Jun 16, 2017

This problem may be is related to issue:

Go to http://james-ingram-act-two.de/open-source/assistantPerformer/assistantPerformer.html
Select Pianola Music 1967 (scroll) as the score and Resident Sf2 Synth as the output device.
Click the Start button. The score appears with a set of performance controls along the top of the page. Click the green 'Go' button.
Bug: The first chords are silent, but notes soon start sounding.
Stop the performance by clicking the red 'Stop' button. Then restart by pressing the 'Go' button again.
The score restarts from the green start-marker and this time the first notes sound (correctly).

I think this is an initialisation problem... Probably the synth's init() function needs changing somehow...

This problem does not occur when using the Virtual MIDI Synth.

.........

I've added a similar kludge to the Assistant Performer's Controls.init() function. This simply sends a dummy noteOn/noteOff pair to each channel (except the percussion channel 9 - which is not used) immediately after the synth has loaded the soundfont.
Somehow it must be possible to initialize the buffers some other way, but I have been unable to find out how, even after studying the docs at
https://developer.mozilla.org/en-US/docs/Web/API/AudioContext
The synth uses samples contained in the soundFont's instruments as AudioBufferSourceNode buffers. See sf2synth1/SoundFontSynthNote.prototype.noteOn(...)

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

No branches or pull requests

1 participant