FM Synthesis With Python

FMSynth.py is a module which implements basic real-time polyphonic FM synthesis in Python.

Python is one of the most popular programming languages currently used, but is most commonly used for data analytics and web applications, not audio.

FMSynth.py has the following features:

  • Controllable by MIDI. Note that this is very CPU-intensive;
  • Configurable polyphony;
  • AD envelope (no sustain yet); and
  • Dispatches MIDI IN events like NOTE_ON and NOTE_OFF events to the synthesizer.

You can preview an example of how FMSynth.py sounds above.

FMSynth.py is available via Github.

 

12 thoughts on “FM Synthesis With Python

  1. Wish it were actually a Python-interpreting plugin. A p5js one would be cool, too. At this point, our setups are powerful enough that we should be able to shove scripts into plugins. A bit like the way Cabbage leverages Csound, maybe?

  2. I’m a retired programmer, so the last thing I want to do is program anything, especially related to music. I just want to play.

      1. I retired from programming a while ago, now I am an investor who fortunately bought thousands of shares of Apple when it was cheap. I’m now a rich mofo, so I’m not too sad. ?

        1. I know exactly what you mean. I designed commercial computer system for years. I don’t find computers stimulate music in me at all. Give me hardware. Period.

          But I do love the Korg Prologue – I can write software to hide inside a keyboard, and it sounds beautiful.

  3. I am also a retired programmer (I no longer need to be paid for it) and I love to read other peoples code and I still love to program as to me that is play – horses for courses.

Leave a Reply