This repository has been archived by the owner on May 2, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Major update of the ResidentSf2Synth
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.
- Loading branch information