Awesome
<p align='center'> <img src="src/website/spessasynth_logo_rounded.png" width='300' alt='SpessaSynth logo'> </p>SoundFont2 based realtime synthetizer and MIDI player written in JavaScript using Web Audio API. Can also be used as a synthesis library.
Exporting modified MIDIs now available!
Live demo
Youtube video
This repo is essentially 2 programs in one:
spessasynth_lib
A flexible, powerful, and feature-packed soundfont synthesizer library for the WebAudio API.
[!TIP] Looking for a Node.js version? try spessasynth_core
Features
- SoundFont2 Generator Support
- SoundFont2 Modulator Support
- SoundFont3 (vorbis compressed sf2) Support (thanks to stbvorbis.js)
-
- Can provide very hiqh quality audio while being relatively light on file size thanks to sf3 support
- Reverb and chorus support
- Render audio to file
- A few custom modulators to support some additional controllers (see
modulators.js
) - Written using AudioWorklets (Firefox and Chrome both work perfectly)
- Can load really large soundfonts (4GB!) (but only on Firefox, Chromium has a memory limit)
- Multi-port MIDIs support (more than 16 channels)
- MIDI Controller Support (Default supported controllers can be found here).
- Supports some Roland GS and Yamaha XG sysex messages
- High performance mode for playing black MIDIs (Don't go too crazy with the amount of notes though)
- Can be used as a library (learn more here)
- Modular design allows easy integrations into other projects
- Written in pure JavaScript using WebAudio API (Every modern browser supports it)
- No dependencies
Limitations
- The performance is questionable, especially on mobile devices.
Installation
- Clone this repository.
- copy
src/spessasynth_lib
to your project. - Use the library
Web app / Local Edition
The complete GUI for spessasynth_lib, allowing remixing experimenting and playing MIDIs in the coolest way possible.
Features
- Visualization of the played sequence with effects like visual pitch bend and note on effects
- Playable keyboard with various sizes
- Integrated controller for the synthetizer with a lot of options
- Mobile friendly
the ui, not the synthesizer - Mutliple languages support, currently: english, polish, japanese
Web MIDI API
support (Enables physical MIDI devices to be used with the program)- WebMidiLink support
- Play around with the MIDI file, edit instruments controllers and more!
- Render the MIDI file (either modified or unmodified) to wav
- Export the modified MIDI file to .mid
- Comes bundled with a compressed SGM SoundFont to get you started
- Also no dependencies!
Still not convinced? Here are some more screenshots:
<img src="https://github.com/user-attachments/assets/b0c9a1f3-3278-4208-8d35-f63b0943ae39" width="45%"></img> <img src="https://github.com/user-attachments/assets/3bfd9de0-ed13-4667-b843-47c956454136" width="45%"></img> <img src="https://github.com/user-attachments/assets/7499503e-9dec-4f7c-8c58-b4960f63bc39" width="45%"></img> <img src="https://github.com/user-attachments/assets/688b4ecc-0ba5-4990-92a5-8b567e08d7d6" width="45%"></img>
Installation
[!IMPORTANT] Firefox is recommended, due to unconstrained memory size. Also a decent computer for large soundfonts.
Recommended high quality soundfont (better than the built-in one)
Requires node.js to be installed
Windows
- Download the code as zip and extract or use
git clone https://github.com/spessasus/SpessaSynth
- Put your soundfonts into the
soundfonts
folder. (you can select soundfonts in the program) - Double click the
start.bat
- Enjoy!
Linux
-
git clone https://github.com/spessasus/SpessaSynth cd SpessaSynth node src/website/server.js
- Put your soundfonts into the
soundfonts
folder. (you can select soundfonts in the program) - Enjoy!
todo
- make the worklet system perform good
- port the worklet system to emscripten (maybe) (not really)
- improve the built-in chorus and reverb effects
- fix release during attack
Special thanks
- Fluidsynth - the source code really helped me understand and implement a lot of functionality and fixes
- Polyphone - a wonderful testing tool for soundfonts and how they should sound
- Meltysynth - for the initial low-pass filter implementation
- RecordingBlogs - for the detailed explanations on MIDI messages
- And You! - for checking out this project. I hope you like it :)
License
Copyright © 2024 Spessasus. Licensed under the MIT License.
[!IMPORTANT] Please note that bundled stbvorbis_sync.js licensed under the Apache-2.0 license.