Skip to content

Add SpessaSynth - #608

Merged
ryohey merged 7 commits into
ryohey:mainfrom
spessasus:spessasynth
Apr 27, 2026
Merged

Add SpessaSynth#608
ryohey merged 7 commits into
ryohey:mainfrom
spessasus:spessasynth

Conversation

@spessasus

Copy link
Copy Markdown
Contributor

This pull request replaces the wavelet audio engine with SpessaSynth!

The features added include:

  • complete SF2 support
  • SF3 support
  • DLS support (the famous gm.dls can be used directly!)
  • effects (chorus, reverb, delay and insertion)

Tested on Brave (Chrome) and Floorp (Firefox)
Both export methods (WAV and MP3) work.

Notes on the implementation:

  • I use webstorm so i added its config folder to .gitignore, feel free to remove
  • Updated README.md of the player package
  • Allowed all the supported types by spessasynth in the soundfont input
  • No idea about changes to package-lock.json, i ran npm install, and only installed spessasynth in the player package
  • Allowed the player to send sysEx events as spessasynth supports them extensively
  • Changed the timer interval to 100 as this helps with latency according to my testing
  • Audio render uses spessasynth's MIDIBuilder (translates PlayerEvents to it). This allows the worklet for frame-perfect timing when rendering
  • I believe that SF3 support could allow of changing the default soundfont to a higher quality one (my vote is GeneralUser-GS, the same one spessasynth web app uses by default)

Fixes #458
Fixes #514
Fixes #459
Fixes #428
Fixes #372

CC: @ryohey @robertnhart

@vercel

vercel Bot commented Mar 22, 2026

Copy link
Copy Markdown

@spessasus is attempting to deploy a commit to the Ryohei Kameyama's projects Team on Vercel.

A member of the Team first needs to authorize it.

@robertnhart

Copy link
Copy Markdown
Collaborator

About the list of Fixes at the end of your message...

Just to make sure you are aware, Signal already lets you change to a custom soundfont. Can you explain more why you feel this pull request will fix issues 458 and 514?

  • Issue 458 Fix/add custom SoundFonts seems to be reporting that a specific soundfont with a "hey!" sound in it doesn't work in Signal. But the author of the issue has not provided the exact soundfont they were talking about nor responded with any other details.
  • Issue 514 Unable to add custom SoundFonts has no information other than the title. (The body of the message appears to just be the default issue template with nothing changed or added to it.) Since Signal MIDI editor already lets you add custom soundfonts, it's unclear what problem the person that created this issue was actually having.

@spessasus

Copy link
Copy Markdown
Contributor Author

@robertnhart

Hi!
Issue 458 is on the list because author mentions that it works fine on MuseScore (which uses fluidsynth), but not on signal. Since spessasynth has a feature parity with fluidsynth (in terms of SF2 support), the issue should be fixed.

Issue 514 is on the list because it's an issue that should've been closed long ago (because there's no data there), but Ryohey doesn't seem to close invalid issues. Since it's related to soundfonts, I included it. Ryohey can edit my comment to remove it if he thinks otherwise.

@ryohey

ryohey commented Mar 24, 2026

Copy link
Copy Markdown
Owner

wow it looks amazing!
i'll check it later thanks

@spessasus

Copy link
Copy Markdown
Contributor Author

wow it looks amazing! i'll check it later thanks

No problem! If you have any questions about the way I implemented it, feel free to ask.

@vercel

vercel Bot commented Mar 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
signal Ready Ready Preview, Comment Apr 27, 2026 1:50am

Request Review

@robertnhart

Copy link
Copy Markdown
Collaborator

When I tired the preview, I get a dialog box that says:

Error occured in launch process
Could not create the AudioWorkletNode. Did you forget to addModule()?

And in the Developer Tools Console page I see various errors such as:

Uncaught TypeError: Failed to execute 'registerProcessor' on 'AudioWorkletGlobalScope': Property "process" doesn't exist
at spessasynth_processor.min-Cffy10vs.js:21:11737

DOMException: Failed to construct 'AudioWorkletNode': AudioWorkletNode cannot be created: The node name 'spessasynth-worklet-processor' is not defined in AudioWorkletGlobalScope.
at WorkletSynthesizer.workletConstructor (https://signal-git-fork-spessasus-spessasynth-ryohei-kameyamas-projects.vercel.app/assets/CheckCircleIcon-CIaixDZf.js:25876:16)
[...]

@spessasus

Copy link
Copy Markdown
Contributor Author

@robertnhart

It works for me, but this is presumably due to the libs still not supporting your outdated chrome. I've updated them now, it should work. But please clone and build manually, as vercel might not have updated them.

@ryohey

ryohey commented Mar 26, 2026

Copy link
Copy Markdown
Owner

@spessasus Just testing it a bit. It seems to be working perfectly! I'm enjoying touhou projects midis on signal :)
I’d like to try more tests to find any bugs before merging it. So far, there’s just one issue: since I set the timer interval to 100 ms, the red cursor isn’t moving smoothly. I’m considering either simply reverting it to 50 ms or using a different timer for rendering—do you have any suggestions?

@spessasus

Copy link
Copy Markdown
Contributor Author

@spessasus Just testing it a bit. It seems to be working perfectly! I'm enjoying touhou projects midis on signal :) I’d like to try more tests to find any bugs before merging it. So far, there’s just one issue: since I set the timer interval to 100 ms, the red cursor isn’t moving smoothly. I’m considering either simply reverting it to 50 ms or using a different timer for rendering—do you have any suggestions?

@ryohey

I'm glad the patch is working so far! Regarding your question:
I think it's fine to revert it to 50 ms if it works better, I haven't tested it extensively.

In the ideal world, we'd maintain a MIDIBuilder instance of the MIDI sequence that would allow Sequencer processing in the audio worklet (for 2ms precision, regardless of UI lag in the main thread), but it would mean a lot of rewrites for a small benefit (since we already schedule the events). So the current implementation is fine.

Looking forward to the merge!

@spessasus

Copy link
Copy Markdown
Contributor Author

@ryohey

I have reverted the interval to 50ms and updated spessasynth libraries to latest (which fixed some small issues).

I think it's ready to merge now.

@spessasus

Copy link
Copy Markdown
Contributor Author

Any updates on this? Can it be merged now?

@TSFBCE24RhythmHeaveners

Copy link
Copy Markdown

@ryohey ryohey left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's working perfectly! Thank you @spessasus!.

Due to family circumstances, I haven't had much time to check Discord. @robertnhart If there are any issues, please let me know by creating an issue on GitHub. I know that many people, including students, are using this app, so I'd like to know right away if there are any problems on their devices.

@ryohey
ryohey merged commit 559249a into ryohey:main Apr 27, 2026
3 checks passed
@spessasus
spessasus deleted the spessasynth branch April 27, 2026 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

4 participants