A professional XG (eXtended General MIDI) synthesizer and real-time workstation implemented in Python, featuring advanced synthesis engines, Yamaha S.Art2 articulation, Vibexg live performance interface, comprehensive effects processing, and vectorized audio processing.
The XG Synthesizer project aims to provide:
- Complete XG Specification Implementation - Full Yamaha XG compatibility with GS extension support
- Professional Audio Quality - Studio-grade synthesis and effects processing
- Real-Time Performance - Low-latency (<5ms) suitable for live performance
- Multiple Interface Options - Library, CLI, and workstation interfaces
- Extensible Architecture - Plugin system for custom engines and effects
- Cross-Platform Support - Windows, macOS, and Linux compatibility
- Full SF2 Specification - Complete SoundFont 2.0 format support
- Velocity Layers - Multi-velocity zone mapping with crossfading
- Loop Support - Loop start/end points with crossfade loops
- Envelope Generators - AHDSR envelopes per sample
- Filters - Low-pass, high-pass, band-pass filters per preset
- LFO Modulation - Vibrato, tremolo, and filter modulation
- Performance: 256+ voices with efficient sample caching
- Modern SFZ Format - SFZ v1 and v2 opcode support
- Real-Time Modulation - CC-controlled parameters
- Round Robin - Multiple sample alternation
- Legato - Smooth note transitions
- Portamento - Glide between notes
- Advanced Grouping - Sample groups with independent processing
- 8 Operators - Full 8-operator FM synthesis
- 88 Algorithms - Complete operator routing matrix
- Envelope Generator - 8-stage ADSR1R1D1R2 per operator
- Frequency Ratios - Fixed frequency and ratio modes
- Velocity Sensitivity - Per-operator velocity curves
- Output Levels - Independent operator level control
- Additive - Harmonic synthesis with custom spectra
- Wavetable - Dynamic wavetable synthesis with morphing
- Physical Modeling - Waveguide and modal synthesis
- Granular - Advanced granular processing
- Spectral - FFT-based spectral processing and morphing
- 275+ Articulations - Comprehensive articulation library
- 30 Articulation Presets - Ready-to-use articulation configurations
- Real-time Switching - Seamless articulation transitions
- Velocity Layers - Dynamic articulation response (0-127)
- Expression Control - Nuanced performance expression
- Crossfade Zones - Smooth articulation blending
- Release Samples - Natural note decay articulations
| Effect Type | Variations | Description |
|---|---|---|
| Reverb | 13 types | Hall, Room, Plate, Delay, and more |
| Chorus | 18 types | Chorus 1-4, Celeste, Flanger, Phaser |
| Delay | 6 types | Delay L/R, Delay LCR, Echo, Cross-delay |
- Modulation: Phaser, Flanger, Symphonic, Tremolo, Rotary Speaker
- Filters: EQ 2-band, EQ 3-band, Low-pass, High-pass, Band-pass
- Distortion: Overdrive, Distortion, Amp Simulator, Bit Crusher
- Spatial: Stereo Enhancer, Auto Pan, Reverb, Delay variations
- Dynamics: Compressor, Limiter, Gate, Expander
Per-channel processing including:
- EQ (5-band parametric)
- Distortion/Overdrive
- Chorus/Flanger
- Reverb
- Delay
- Rotary Speaker
- Wah/EFX
- 5-Band EQ - Parametric equalizer with shelving
- Stereo Enhancer - Width control and spatial enhancement
- Limiter - Peak limiting to prevent clipping
- Compressor - Master bus compression
| Feature Category | Implementation | Status |
|---|---|---|
| Basic Messages | Note On/Off, Control Change, Program Change | β Complete |
| Channel Messages | Poly Pressure, Channel Pressure, Pitch Bend | β Complete |
| System Exclusive | XG SysEx, Parameter Changes | β Complete |
| NRPN Support | Non-Registered Parameter Numbers | β Complete |
| RPN Support | Registered Parameter Numbers | β Complete |
| Bank Select | MSB/LSB Bank Selection | β Complete |
| Drum Setup | Drum Kit Parameters, Note Shift | β Complete |
| Effects | System/variation/Insertion Effects | β Complete |
| Multi-Part | 32-part Multi-timbral Operation | β Complete |
| Arpeggiator | Pattern-based Note Generation | β Complete |
| Microtonal | Scale Tuning, Master Tuning | β Complete |
| Feature | Implementation | Status |
|---|---|---|
| GS Reset | GM2/GS Mode Switching | β Complete |
| Bank Select | GS Bank Mapping | β Complete |
| Control Changes | GS-specific CCs | β Complete |
| NRPN | GS NRPN Parameters | β Complete |
| Drum Kit | GS Drum Kit Support | β Complete |
| JV-2080 Extensions | Advanced Parameter Control | β Complete |
| Feature | Status | Notes |
|---|---|---|
| Preset Loading | β Complete | Full preset tree navigation |
| Sample Loading | β Complete | All sample formats (8/16/24-bit) |
| Velocity Splitting | β Complete | Multi-velocity zone mapping |
| Loop Points | β Complete | Loop start/end with crossfade |
| Envelope | β Complete | AHDSR per sample/instrument |
| Filters | β Complete | Low-pass with resonance |
| LFO | β Complete | Vibrato, tremolo, filter modulation |
| Key Tracking | β Complete | Pitch and filter key tracking |
| Velocity Curves | β Complete | Custom velocity response curves |
| Modulation Matrix | β Complete | Source β destination routing |
- Multiple MIDI Inputs: Keyboard, physical ports, virtual ports, network, file, stdin
- Real-Time Audio: Low-latency output via sounddevice to any audio interface
- TUI Control Surface: Rich text-based interface with live visualization
- Preset Management: Save and recall complete setups with pickle serialization
- MIDI Learn: Map hardware controllers to parameters with curve shaping
- Demo Mode: Built-in test patterns (scale, chords, arpeggio)
- Recording & Playback: Capture and replay MIDI performances
- Style Engine: Auto-accompaniment with .sty/.sff file support
- Metronome: Built-in click track with tempo sync
- File Rendering: Render directly to WAV, FLAC, OGG, MP3, AAC, M4A
- Native Plugin Format: VST3 and AAX (Pro Tools) support
- DAW Integration: Works with Ableton Live, Logic Pro, FL Studio, Pro Tools, Reaper
- Full Parameter Automation: Automate all synthesizer parameters via DAW
- Pattern Sequencer: Grid-based pattern editing and real-time playback
- Python Integration: pybind11 bridge to XG synthesizer engine
- Professional UI: JUCE-based interface with real-time controls and status display
- Cross-Platform: Windows, macOS, Linux support
- MIDI I/O: Full MIDI input/output support within DAW
- XGML v2.1 - Human-readable YAML configuration language
- MPE Support - Microtonal expression with per-note control
- GS Compatibility - Roland GS mode with JV-2080 enhancements
- Arpeggiator - Yamaha Motif-style pattern generation (128+ patterns)
- Modulation Matrix - 128 assignable modulation routings
- Scale Tuning - Custom temperaments and microtonal scales
- Vectorized Processing - SIMD-optimized audio generation
- Real-time Synthesis - Low-latency performance (<5ms)
- Multi-format Support - WAV, AIFF, FLAC, OGG, MP3, SF2, SFZ samples
- Cross-platform - Windows, macOS, Linux support
- Extensible Design - Plugin architecture for custom engines
- Memory Efficient - Sample caching and buffer pooling
- Thread-Safe - Concurrent MIDI and audio processing
# Clone repository
git clone https://github.com/drbye78/syxg.git
cd syxg
# Install core package (PyAV for audio I/O)
pip install -e .
# Install with workstation features (Vibexg)
pip install -e ".[workstation]"
# Full installation with all features
pip install -e ".[full]"
# Development installation
pip install -e ".[dev,audio,visualization,workstation]"
from synth.engine.modern_xg_synthesizer import ModernXGSynthesizer
# Create synthesizer
synth = ModernXGSynthesizer(sample_rate=44100, max_channels=32)
# Load SoundFont
synth.load_soundfont("soundfonts/GM.sf2", priority=0)
# Load XGML configuration
synth.load_xgml_config("examples/simple_piano.xgdsl")
# Generate audio from MIDI
synth.render_midi_file("input.mid", "output.wav")
# Run with keyboard input and TUI
python -m vibexg
# Run with physical MIDI port
python -m vibexg --midi-input "mido_port:USB MIDI Device"
# Run demo mode (test audio output)
python -m vibexg --demo scale
# List available MIDI ports
python -m vibexg --list-ports
# Render MIDI file to high-quality FLAC
python -m vibexg --midi-input "file:song.mid" --audio-output "file:output.flac"
# Network MIDI session
python -m vibexg --midi-input "network_midi:host=192.168.1.100,port=5004"
# Render MIDI file to audio
render-midi input.mid output.wav
# Render with custom XGML configuration
render-midi --config my_config.xgdsl input.mid output.wav
# Convert MIDI to XGML
midi-to-xgml input.mid > config.xgdsl
# Build VST3 plugin (requires CMake, pybind11, JUCE)
cd vst3_plugin
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build . --config Release
# Install to system VST3 directory
sudo make install # Linux/macOS
# Or copy manually to:
# - Windows: %APPDATA%\VST3\
# - macOS: ~/Library/Audio/Plug-Ins/VST3/
# - Linux: ~/.vst3/
# Build AAX plugin for Pro Tools (requires AAX SDK)
cmake .. -DBUILD_AAX=ON -DAAX_SDK_ROOT="/path/to/aax/sdk"
cmake --build . --config Release --target XGWorkstationVST3_AAX
Usage in DAW:
- Load "XG Workstation" plugin in instrument track
- Click "Initialize" to start Python integration
- Send MIDI notes to trigger synthesis
- Use pattern sequencer for arrangement
- Automate parameters via DAW automation
- Getting Started - Quick start guide
- User Manual - Complete usage guide
- Vibexg Workstation - Real-time workstation manual
- XGML Reference - XGML v2.1 specification
- Configuration - All configuration options
- FM-X Engine - 8-operator FM synthesis
- SF2 Engine - SoundFont 2.0 playback
- SFZ Engine - Modern sample playback
- S.Art2 Articulation - Yamaha articulation system
- Physical Modeling - Waveguide synthesis
- Spectral Processing - FFT-based effects
- VST3 Plugin - VST3/AAX plugin build and usage
- Plugin Architecture - Plugin integration design
- Parameter Automation - DAW automation guide
- System Effects - Reverb, Chorus, Delay
- Variation Effects - 62+ effect types
- Insertion Effects - Per-channel processing
- Master Processing - EQ, limiting, enhancement
- API Reference - Complete API documentation
- Vibexg Package - Workstation API reference
- Architecture - System design
- Contributing - Development guidelines
- Testing - Test suite documentation
- Python 3.11 Migration - Migration guide and new features
The XG Synthesizer now requires Python 3.11+ and leverages modern Python features:
- Pattern Matching - Clean MIDI message handling with
match/case - Type Safety - Comprehensive type hints with
typing.Self,TypeAlias,Annotated - Exception Groups - Better batch error handling with
ExceptionGroupandexcept* - Exception Notes - Rich error context with
add_note() - Performance - 10-60% faster audio processing (automatic Python 3.11 improvement)
See docs/PYTHON_311_FEATURES.md for details.
- Basic Synthesis - Simple patches
- Advanced Effects - Professional processing
- Articulation Setup - S.Art2 configuration
- Live Performance - Vibexg workstation setup
- SF2 Programming - SoundFont creation
# XGML v2.1 Configuration
xg_dsl_version: "2.1"
description: "Professional piano with S.Art2 articulation and effects"
# Basic MIDI setup
basic_messages:
channels:
channel_1:
program_change: "acoustic_grand_piano"
bank_select: [0, 0]
volume: 100
pan: 64
reverb_send: 40
chorus_send: 20
# S.Art2 Articulation System
sart2_articulation:
enabled: true
articulations:
- name: "legato"
velocity_range: [0, 60]
crossfade: true
release_sample: true
- name: "staccato"
velocity_range: [61, 100]
release: short
loop_mode: one_shot
- name: "forte"
velocity_range: [101, 127]
attack: fast
filter_cutoff: 8000
# SF2 Engine Configuration
sf2_engine:
soundfonts:
- path: "soundfonts/GM.sf2"
priority: 0
blacklist: [] # Disable specific programs
remap: {} # Program remapping
# Professional effects
effects_configuration:
system_effects:
reverb:
type: hall
time: 2.5
level: 0.8
high_damp: 0.7
chorus:
type: chorus1
level: 0.6
rate: 1.2
depth: 0.5
variation_effects:
type: eq_3band
parameters:
low_gain: 2.0
low_freq: 400
mid_gain: 0.0
mid_freq: 2500
high_gain: 3.0
high_freq: 8000
insertion_effects:
channel_1:
type: chorus
parameters:
rate: 1.5
depth: 0.6
master_processing:
equalizer:
type: "jazz"
bands:
low: {gain: 2.0, frequency: 80, q: 1.0}
mid: {gain: 0.0, frequency: 2500, q: 1.5}
high: {gain: 3.0, frequency: 8000, q: 0.7}
limiter:
threshold: -1.0
release: 0.3
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β XG Synthesizer Engine β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Synthesis Engines β β
β β βββββββββββ¬ββββββββββ¬ββββββββββ¬ββββββββββ β β
β β β SF2 β SFZ β FM-X βPhysical β β β
β β β Engine β Engine β Engine βModelingβ β β
β β βββββββββββ΄ββββββββββ΄ββββββββββ΄ββββββββββ β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Yamaha S.Art2 Articulation β β
β β βββββββββββββββββββββββββββββββββββββββββββ β β
β β β 275+ Articulations | 30 Presets β β β
β β β Real-time Switching | Velocity Layers β β β
β β βββββββββββββββββββββββββββββββββββββββββββ β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Vibexg Real-Time Workstation β β
β β βββββββββββ¬ββββββββββ¬ββββββββββ¬ββββββββββ β β
β β β MIDI β TUI β Preset β MIDI β β β
β β β Inputs β Control β Manager β Learn β β β
β β βββββββββββ΄ββββββββββ΄ββββββββββ΄ββββββββββ β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Effects Processing β β
β β βββββββββββ¬ββββββββββ¬ββββββββββ¬ββββββββββ β β
β β β System βVariationβInsertionβ Master β β β
β β βEffects βEffects βEffects βProcessingβ β β
β β βββββββββββ΄ββββββββββ΄ββββββββββ΄ββββββββββ β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Audio Output β β
β β βββββββββββ¬ββββββββββ¬ββββββββββ¬ββββββββββ β β
β β βVectorizedβOptimizedβ Multi- β Format β β β
β β βProcessingβCoefficientsβformat βSupport β β β
β β βββββββββββ΄ββββββββββ΄ββββββββββ΄ββββββββββ β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
| Engine | Type | Polyphony | Features |
|---|---|---|---|
| SF2Engine | Sample-based | 256+ | Velocity layers, loops, envelopes, filters |
| SFZEngine | Sample-based | 256+ | SFZ v1/v2, round robin, legato |
| FMEngine | FM synthesis | 128+ | 8 operators, 88 algorithms |
| PhysicalEngine | Physical modeling | 64+ | Waveguide, modal synthesis |
| SpectralEngine | Spectral | 32+ | FFT processing, morphing |
- ArticulationController: Real-time articulation switching
- ArticulationPreset: 30 pre-configured articulation setups
- ArticulationMapping: Velocity-based articulation zones
- Modifiers: Dynamic articulation response curves
- XGWorkstation: Main orchestrator class
- MIDI Inputs: Keyboard, MidoPort, Virtual, Network, File, Stdin
- Audio Outputs: SoundDevice, File rendering
- Managers: PresetManager, MIDILearnManager, StyleEngineIntegration
- TUI: Rich-based text user interface
- Demo: Built-in test patterns (scale, chords, arpeggio)
- PluginProcessor: Main VST3/AAX audio processing and MIDI handling
- PythonIntegration: pybind11 bridge between C++ plugin and Python XG synthesizer
- XGParameterManager: VST3 parameter management and DAW automation
- PluginEditor: JUCE-based user interface with real-time controls
- Pattern Sequencer: Grid-based pattern editing and playback integration
- DAW Support: Ableton Live, Logic Pro, FL Studio, Pro Tools, Reaper
- XGML Parser/Translator: Human-readable YAML to MIDI conversion
- MPE Manager: Per-note expression control
- Arpeggiator Engine: Pattern-based note generation (128+ patterns)
- Modulation Matrix: 128 assignable modulation routings
| Section | Types | Description |
|---|---|---|
| System | 37 | Reverb (13), Chorus (18), Delay (6) |
| Variation | 62+ | Modulation, filters, distortion, spatial |
| Insertion | 17 | Per-channel EQ, distortion, modulation |
| Master | 4 | 5-band EQ, stereo enhancer, limiter |
| Metric | Value | Notes |
|---|---|---|
| Latency | <5ms | End-to-end audio processing |
| Polyphony | 256+ | Depends on engine and sample memory |
| CPU Usage | Optimized | Vectorized SIMD processing |
| Memory | Efficient | Sample caching and buffer pooling |
| Real-time | β | Suitable for live performance |
| Task | CPU Usage | Latency |
|---|---|---|
| SF2 Playback (64 voices) | 15% | 3.2ms |
| FM-X Synthesis (32 voices) | 12% | 2.8ms |
| Full Mix (128 voices + FX) | 45% | 4.5ms |
| Vibexg Live (TUI + Audio) | 25% | 3.5ms |
- Python: 3.8+
- RAM: 4GB
- Disk: 1GB for samples and temporary files
- OS: Windows 10+, macOS 10.15+, Linux (Ubuntu 18.04+)
- CPU: Dual-core processor
- Python: 3.9+
- RAM: 8GB+
- Disk: SSD with 10GB+ free space
- OS: Windows 11+, macOS 12+, Linux (Ubuntu 22.04+)
- CPU: Multi-core processor with AVX2 support
- Audio Interface: ASIO/CoreAudio/ALSA compatible (for low latency)
- MIDI Controller: USB MIDI keyboard or controller
- Audio Interface: Low-latency USB audio interface
- SoundFonts: SF2/SFZ sample libraries
We welcome contributions! Please see our Contributing Guide for details.
# Clone repository
git clone https://github.com/drbye78/syxg.git
cd syxg
# Install development dependencies
pip install -e ".[dev,audio,performance,workstation]"
# Run tests
pytest tests/ -v
# Run linting
flake8 synth/ vibexg/
black synth/ vibexg/
mypy synth/ vibexg/
- Black for code formatting
- Flake8 for linting
- MyPy for type checking
- Pytest for testing
- Google/NumPy style docstrings
- Additional synthesis engines
- New effect types
- SoundFont/SFZ improvements
- Documentation
- Test coverage
- Bug fixes
- Performance optimizations
This project is licensed under the MIT License - see the LICENSE file for details.
- Yamaha Corporation - For the XG specification and S.Art2 articulation system inspiration
- SoundFont Technical Committee - For the SF2 specification
- SFZ Format Community - For modern sample standards
- FFmpeg/PyAV - For audio file I/O
- Open Source Community - For the libraries that make this possible
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Documentation: Full Documentation
- Vibexg Guide: docs/WORKSTATION.md
πΉ Transform your MIDI files into professional audio with the power of modern synthesis engines, Yamaha S.Art2 articulation, comprehensive effects processing, Vibexg real-time workstation, and VST3/AAX plugin integration.