A fast Rust-based SoundFont synthesizer designed for high voice counts and low latency.
core: Handles the core audio rendering functionality.clib: C/C++ bindings for XSynth.soundfonts: A module to parse soundfonts to be used in XSynth.realtime: The real-time rendering module within XSynth.render: Offline rendering support, exposed both as a reusable library and a command line utility for rendering MIDIs to audio using XSynth.kdmapi: A cdylib wrapper around XSynth to act as a drop in replacement for OmniMIDI/KDMAPI.Most integrations should use the native Rust crates directly:
- xsynth-core for soundfont loading and sample rendering
- xsynth-realtime for realtime playback against an audio device
- xsynth-render for offline rendering to WAV, either as a library or CLI
The non-Rust entry points exist for compatibility:
- xsynth-clib exposes a C ABI intended for legacy integrations
- xsynth-kdmapi exposes a KDMAPI-compatible DLL for Windows MIDI stacks
XSynth is designed around a performance-first voice engine. The hot rendering path is heavily specialized so common voice configurations can stay simple and compiler-optimized.
That design has an important consequence: features that require a large generic runtime modulation graph or many optional per-voice stages are intentionally treated with caution, because they can increase both CPU overhead and binary size. In practice, XSynth prefers to resolve as much soundfont behavior as possible up front during load time.
XSynth supports a practical subset of SFZ centered around sample-region playback and amplitude/filter shaping.
Supported today:
- lovel, hivel, lokey, hikey
- pitch_keycenter
- volume, pan, tune
- sample, default_path
- loop_mode, loop_start, loop_end, offset
- cutoff, resonance, fil_veltrack, fil_keycenter, fil_keytrack, filter_type
- ampeg_start, ampeg_delay, ampeg_attack, ampeg_hold, ampeg_decay, ampeg_sustain, ampeg_release
- nested includes and #define substitution in the parser
The SFZ path is intended to cover the common sample-playback workflow well. It is not a claim of full SFZ opcode coverage.
XSynth aims for high-performance practical SF2 playback rather than full SoundFont 2 spec emulation.
Supported today: - static sample-region playback, including offsets, loop points, stereo links, root key, tuning, scale tuning, key/velocity ranges, fixed key/velocity, filter cutoff/Q, volume envelope generators, and exclusive class - a baked subset of note-on modulators, resolved at soundfont load time, covering key/velocity sources with linear/concave/convex/switch curves for practical destinations such as attenuation, filter cutoff, pan, volume envelope timings, and static pitch offsets
Intentionally out of scope for performance and binary-size reasons: - modulation envelope generators and their destinations - modulation LFO / vibrato LFO generators and destinations - generic runtime SF2 modulators driven by CCs, aftertouch, or pitch wheel - SF2 chorus and reverb send behavior
xsynth-realtime is the realtime playback layer and is the right choice when
you need low-latency live MIDI synthesis against an audio devicexsynth-render uses the same synth stack for offline rendering and now
exposes a reusable library API in addition to the CLIxsynth-core remains the lowest-level crate for the shared rendering and
soundfont logic used by both pathshttps://github.com/user-attachments/assets/d100e3d2-efa0-4367-a774-d5a171ac0bf8
https://github.com/user-attachments/assets/f509a36c-6019-4d38-9e5e-1bf0eeb9b43d
XSynth and all of its components is licensed under the GNU Lesser General Public License 3.0.
$ claude mcp add xsynth \
-- python -m otcore.mcp_server <graph>