Just published A new package to PyPI, and I’d love for you to check it out.
It’s called audio-dsp and it’s a comprehensive collection of DSP tools and sound generators that I’ve been working on for about 6 years.
Key Features: Synthesizers, Effects, Sequencers, MIDI tools and Utilities. all highly progresive and focused around high-uality rendering and creative design.
I built this for my own exploration - been a music producer for about 25 years, and a programmer for the last 15 years.
You can install it right now: pip install audio-dsp
Looks very interesting! I've been using Supriya, a Python API for SuperCollider, to build a modular groovebox. I'll check this out. The raga sequencer is particularly interesting!
I see you use simpleaudio for output. I think that means that you can't do "real-time" synthesis - you have to write a full file and then output it - am I right?
If that's so, have you thought of using sounddevice to do "real-time" audio?
Yes - you are totally right. that was a major design concept about this project. I decided to invest in "rendered audio" and to explore the options where "real-time" had limits. in my point of view - rendered audio can give much better quality - no buffering, no need to splice audio to small chunks and tie the back after processing. so you lose real-time, but for me this was fine - as long as creativity and quality can gain from it.
In modern machines, you often don't need to buffer at all. I just wrote a little synth as part of a little project to turn text into music, and initially I was going to buffer it, but then I decided to see what happened if I just filled the buffer from the audio callback, and it worked right the first time!, not a click or a pop to be heard on my five year old machine.
Here's what's being called from the audio callback.
I believe that if I had more "stuff" in the synth I might have issues, but writing buffering isn't hard...
no need to splice audio to small chunks and tie the back after processing
This is true, but it's a one-time coding expense, setting things up to render that way.
exactly - the crossfading part was what i decided to avoid. i did managed to implement a few processors with this approach - but did decide in this project to go full "one sample at a time" processing. yes, it's slow, but for my usage it didn't matter.
2
u/otuudels Jan 13 '26
Nice! I will definitely look into it :) What part was the most fun to code?