A cross-technology FM synthesizer project featuring:
- A standalone Python application with a modern Tkinter GUI
- A Faust DSP source with generated C++ for real-time audio
- A Wwise Source plugin integration
Runs on Windows and supports real-time synthesis, presets, musical scales, and keyboard play.
- License: MIT
- Author: Li Szaj
- FM synthesis with carrier + modulator
- Polyphony up to 3 voices
- ADSR envelopes per voice
- Hard Sync with ratio presets
- AM modulation across components
- Stereo processing with width control
- Preset save/load/delete
- Musical scales and keys
- CPU usage monitor
- Two-tab GUI: “Play” and “Design” with accordion sections
faustFM/fm_synth_standalone.py— Python GUI appfaustFM/fm_source.dsp— Faust DSP sourcefaustFM/build/FaustDSP.cpp— Generated C++ DSPbuild/FaustFM/— Wwise plugin sources and solutionsfaustFM/run_fm_synth.bat— Windows launcher (optional)faustFM/presets/— User presets directory
Requirements: Python 3.11+, pip, Windows
- Clone the repository
git clone https://github.com/Atomcio/Faust_vst_builder.git
cd Faust_vst_builder
- Create and activate a virtual environment
python -m venv .venv
.\.venv\Scripts\activate
- Install dependencies
pip install pygame numpy psutil
# Optional performance
pip install numba
- Run the synthesizer
cd faustFM
python fm_synth_standalone.py
Or double-click run_fm_synth.bat on Windows.
The GUI is split into two tabs for clarity:
-
Play
- Trigger button for quick note tests
- Master Volume
- FM Amount
- Mix Level
- Hard Sync (enable + ratio)
- “Open Presets...” for quick access
-
Design (accordion sections)
- Oscillators: ranges, frequency, amplitude, wave shape for Osc1/Osc2
- ADSR Envelopes: attack/decay/sustain/release per voice
- Scale: musical key, scale type, octave, buffer size, CPU monitor
- Presets: save, load, delete, list
- Tabs:
Ctrl+1switches to Play,Ctrl+2to Design - Piano mapping (QWERTY, depends on octave): typical chromatic mapping from
Q
- Real-time block generation via
pygame.mixerthread - FM deviation computed per sample based on modulator and FM index
- Envelope shaping via ADSR per voice
- Stereo output with width control
- Master gain in dB converted to linear
faustFM/fm_source.dspdefines carrier/modulator, FM index, AM envelopes, stereo processing- Generated C++ in
faustFM/build/FaustDSP.cppwith optimized sine table
Directory: build/FaustFM
- Solutions:
FaustFM_Windows_vc170_static.slnFaustFM_Windows_vc170_shared.sln
- Config:
FaustFMConfig.hwithCompanyIDandPluginID - Build in Visual Studio 2022 (v17) and install into Wwise
- Saved under
faustFM/presets/in JSON format - Save current, load selected, delete, refresh list
- Sample rate:
44100 - Buffer size: adjustable in the Scale section
- Defaults:
fm_amount=8.0,mix_level=0.8, ADSR:A=0.0 D=0.2 S=0.7 R=0.3, Hard Sync on
- No audio: ensure
pygamemixer initializes; try larger buffer size - High CPU: reduce polyphony, increase buffer size; Numba optional
- Osc2 locked: intentional when Hard Sync is enabled
- Fork, create a feature branch, keep changes focused, open a PR
MIT — see LICENSE.
- Pygame community
- Faust and stdfaust.lib
- Audiokinetic Wwise SDK