- Python 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .gitignore | ||
| main.py | ||
| pyproject.toml | ||
| README.md | ||
| uv.lock | ||
fomosynth
A simple FM synthesizer in Python
This is a (free) FM synthesizer (just a hobby, won't be big and professional like dexed) for Python.
I mainly wrote it to try out PortAudio / pyaudio programming, and because I've had a fascination with FM synthesis ever since getting a Yamaha PSS-680 way back in 1989. Currently it is very much a hobby project and very much tailored to my specific use case. In particular, I've hard-coded the controls for my M-Audio Oxygen 8 v2. To use this with any other MIDI controller would require some code changes.
The synth implemented here is a simple two-oscillator FM synth with attack/decay envelopes on each operator. The C5 knob controls the feedback on the first oscillator, and the C1 controls the amount it oscillates the second oscillator. Oscillator frequencies and envelope values are hard-coded.
Running fomosynth
- Install
uv - From the
fomosynth/directory:
uv pip install -e .
uv run fomosynth
TODO
Things I would like to implement in the future:
- Control ALL THE THINGS! (oscillator frequencies, envelope values, etc.)
- Refactor so I can pass an
FMobject to theSynthesizerinstead of hard-coding it - Allow the use of any arbitrary MIDI controller (maybe with a config file for mappings)
- Make thread safe (sometimes it crashes because the callbacks modify
self.streamswhile it's being looped through)