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

Promises should be used when loading soundFonts. #26

Open
notator opened this issue Feb 26, 2016 · 0 comments
Open

Promises should be used when loading soundFonts. #26

notator opened this issue Feb 26, 2016 · 0 comments

Comments

@notator
Copy link
Owner

notator commented Feb 26, 2016

Currently, soundFonts are loaded sequentially into the residentSf2synth.
It would be better if they were loaded in parallel using Promises.

notator added a commit that referenced this issue Sep 1, 2017
See issue #26:
I've just completed a detailed review of the code while
looking as closely as possible at the SoundFont 2.04 specification.
The terminology is a nightmare, but I understand a lot more now,
and am confident that the parsing is working correctly. (At least
of the variables that are currently being used.)
Made a lot of changes to the code, and have given up trying to
document the changes I made to the original gree version.
The most important/drastic correction was to the way envelope
decay times are calculated. The above noteOff function has now
become much simpler (!).
I've tested this version on the Assistant Performer (using just the
Arachno Grand Piano), and on the WebMIDISynthHost (using all
the available presets there). It has to be said that the Grand Piano
does not yet sound as good as it does on the VirtualMIDISynth, so
 there's still some work to do. (I think that work would be best
done by people who are experts with the Web Audio API.)
I've left extensive comments in the code, and think that the
soundFont parsing is now complete and substantially bug-free.
The tweeking will have to be done in only a few functions:
createKeyInfo() in soundFont.js, and the functions in
soundFontSynthNote.js (All the necessary variables have been set.
It will usually just be a case of deciding what to do with them, and
fixing decimal point positions...).
Note: There were some artefacts at loop endings when I first tested
the French Horn in the WebMIDISynthHost. Second time round,
everything was very clean.
The code is uncompressed and currently very verbose. Maybe some
optimization will have to be done, or compromises made, before
this code works perfecly.
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