DEV Community

Cover image for The Anti-Realtime Manifesto: Why I spent 8 years building a Python Audio DSP Library
Dominique Grys
Dominique Grys

Posted on

The Anti-Realtime Manifesto: Why I spent 8 years building a Python Audio DSP Library

I’ve been a music producer for 25 years and a software developer for 15. For a long time, I've been hooked on understanding music at every level—from physical acoustics down to bit-level computing.
About eight years ago, while creating YouTube tutorials on Python, I sat down to create an "Audio DSP" playlist. In the beginning, it was just a fun way to deep-dive into the math of audio generation. I was in the "wow, sine functions are cool" phase. But slowly, I went deeper. I started creating tone generators, time-based effects, and distortion modules.
It was all fun and games until I set my eyes on the boss battle of DSP: The Compressor.
Man, that was a tough cookie. I spent hours calculating variable gain reduction, smoothing the envelope, and fighting for a clean output. But this process taught me something crucial. Because I was looking at this from an algorithmic point of view, I didn’t care about CPU usage. I didn’t care about latency. I didn’t care if it would work as a VST plugin.
I just wanted the math to be perfect. And that became the philosophy of my library: Quality over Real-time.

Live Preformance with my Python scripts

The Art School Experiment

At the time, I was lecturing at a forward-thinking art school in Jerusalem. We explored modular synths, live techno, and building custom instruments. After teaching Pro Tools and mixing for a few years, I realized my students were craving something more modern.
I pitched a year-long "Python Audio DSP" course to the school manager. It started with a bang—20+ students eager to code their own drum machines. But let’s be honest: learning to code from scratch and learning DSP math simultaneously is brutal. By the end, I was left with about 15% of the class.
But those who stayed? They were incredible.
One student built a "Genetics Synth," where audio segments fought for survival to enter a new signal chain.
Another created a Facial Recognition Controller, modulating synth parameters by making silly faces at a webcam.
I built a Game of Life Sequencer, listening to cellular automata loops scrolling across a matrix universe.


(Glitched Drum Loop)

The Rabbit Hole

When the course ended, I took it as a sign to go deeper on my own. I spent the next few years studying AI and advanced mathematics, saving bits and pieces of code along the way. I was building a playground in my head.
About two years ago, I decided to pour it all out.
I went back to those snippets and started pushing them further than any commercial VST would allow.
"Super Saw with 10 oscillators?" Boring. Why not 10,000 oscillators?
"White Noise?" Basic. I hunted down 17 different noise algorithms.
Then came the Effects. Once I had recreated the classics (reverbs, vocoders, distortion), I started getting weird. I implemented compression algorithms based on Calculus and Surface Tension Dynamics. I built tools for Spectral Quantization and Frequency Splicing.
I even built a complete Audio-to-Image suite, allowing you to process sound using visual manipulation tools (blur, pixelate, edge detect) and convert it back to audio. The results are glitchy, unpredictable, and sound amazing.

A code snippet


(poly-tonal chord progression going through an audio to image effect)

What is audio-dsp today?

Today, the library has grown into a massive collection of 65+ modules focused on offline rendering and sound design.

  1. The Synths From classic dx7_fm_synth emulations to the physical_modeling_synth and the SAM inspired chip_tone.
  2. The Effects Beyond the standard filters, you'll find temporal_gravity_warp, melt_spectrum, and the fractional_calculus_compressor.
  3. The Sequencers This is where the "Generative" aspect shines. Tools like game_of_life, tree_composer, and raga_generator allow you to grow melodies rather than just write them.


(A drum loop is sliced-up to micro slices, each one is calculated for it’s dominant frequency and a chain of synthesised pitched sines is created)

Try It Yourself

I built this for the true music geeks—the ones who want to explore sonic possibilities that don't exist in standard DAWs.
You can install it right now:

pip install audio-dsp
Enter fullscreen mode Exit fullscreen mode

Documentation:python_audio_dsp

GitHub:github.com/Metallicode/python_audio_dsp

I’ve also been working on packaging this up properly (with some assistance from AI tools to get the docs and distribution ready), so it's easier than ever to get started. A friend of mine has even started working on a UI wrapper for the project, so hopefully, we will bridge the gap between code and interface soon.

Go break it. I can’t wait to hear what you make.


(triangle_fold_distortion on drums)

Top comments (0)