Skip to content

Atomcio/Faust_vst_builder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FM Synthesizer — Python GUI, Faust DSP, Wwise Plugin

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

Features

  • 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

Repository Structure

  • faustFM/fm_synth_standalone.py — Python GUI app
  • faustFM/fm_source.dsp — Faust DSP source
  • faustFM/build/FaustDSP.cpp — Generated C++ DSP
  • build/FaustFM/ — Wwise plugin sources and solutions
  • faustFM/run_fm_synth.bat — Windows launcher (optional)
  • faustFM/presets/ — User presets directory

Quick Start (Python GUI)

Requirements: Python 3.11+, pip, Windows

  1. Clone the repository
git clone https://github.com/Atomcio/Faust_vst_builder.git
cd Faust_vst_builder
  1. Create and activate a virtual environment
python -m venv .venv
.\.venv\Scripts\activate
  1. Install dependencies
pip install pygame numpy psutil
# Optional performance
pip install numba
  1. Run the synthesizer
cd faustFM
python fm_synth_standalone.py

Or double-click run_fm_synth.bat on Windows.

GUI Overview

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

Keyboard Controls

  • Tabs: Ctrl+1 switches to Play, Ctrl+2 to Design
  • Piano mapping (QWERTY, depends on octave): typical chromatic mapping from Q

Audio Engine (Python)

  • Real-time block generation via pygame.mixer thread
  • 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

DSP (Faust)

  • faustFM/fm_source.dsp defines carrier/modulator, FM index, AM envelopes, stereo processing
  • Generated C++ in faustFM/build/FaustDSP.cpp with optimized sine table

Wwise Plugin (Windows, Visual Studio)

Directory: build/FaustFM

  • Solutions:
    • FaustFM_Windows_vc170_static.sln
    • FaustFM_Windows_vc170_shared.sln
  • Config: FaustFMConfig.h with CompanyID and PluginID
  • Build in Visual Studio 2022 (v17) and install into Wwise

Presets

  • Saved under faustFM/presets/ in JSON format
  • Save current, load selected, delete, refresh list

Configuration

  • 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

Troubleshooting

  • No audio: ensure pygame mixer initializes; try larger buffer size
  • High CPU: reduce polyphony, increase buffer size; Numba optional
  • Osc2 locked: intentional when Hard Sync is enabled

Contributing

  • Fork, create a feature branch, keep changes focused, open a PR

License

MIT — see LICENSE.

Acknowledgements

  • Pygame community
  • Faust and stdfaust.lib
  • Audiokinetic Wwise SDK

About

Real-time FM synth with polyphony, ADSR, hard sync, AM, stereo, presets, and musical scales.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors