Reader Andrew Clark let us know about a new project, Supriya, that is a Python API for the SuperCollider server.
SuperCollider is a free and open source platform for audio synthesis and algorithmic composition.
“Since Supriya is relatively new, and was created and is maintained by one person (not me), there isn’t much documentation. So adoption has been slow,” notes Clark. “I found it while looking for the right synthesis engine for my modular groovebox project.”
To help raise awareness, Clark has started writing a series of demo scripts that show off what Supriya is capable of. All of the scripts are being kept in a public GitHub repository. His latest demo shows how to create polyphonic MIDI synth in Python, using less than 100 lines of code.
“I think it’s pretty amazing that it’s possible to create a polyphonic synth with so little code,” adds Clark.
Are you making coding audio or music applications with Python? If so, leave a comment and share the details!
tbf, most mainline code is a small part of a product. it’s all the user glop, features, switches, glitz, and configuration.
if someone made a turn key box with this for easy synth design that would be cool.
I just had Grok2 write code for a poly midi synth in Python in 5 seconds.
I’m just messing
(But really, it did)
Clickbait title. Python is just glue to existing synthesis software here. And while it’s still neat, Python isn’t doing any synthesis.
I raise you the sound subsystem from the PHP Demo Engine, which *is* a completely modular synthesiser (oscillators, envelopes, filters, pitch/phase/amplitude modulation etc), with a sequencer also implemented entirely in PHP and steaming the generated PCM data out through a pipe into Sox or APlay so that it can be heard. It has the first, and probably only modelled 808 cowbell implemented in a scripting language intended for serving web pages, because we all need more cowbell.
https://github.com/0xABADCAFE/php-demo-engine
Hullo there, old chap—first off, bravo on your PHP Demo Engine’s sound subsystem! A modular synthesiser in PHP is quite the splendid oddity, and I must tip my hat to your 808 cowbell implementation. One can never have too much cowbell, especially when it’s piping PCM out to Sox. Absolutely marvellous.
Now, if I may indulge in a spot of self-promotion (and a touch of friendly rivalry), allow me to introduce the Intuition Engine’s audio chip.
It’s doing real-time synthesis and hardware-like modulation entirely in around 800 lines of pure Golang. No pulling in someone else’s synth like this Python effort.
Oscillators, envelopes, pitch/phase modulation, overdrive, you name it. Think ring mod, noise generation, and enough filters to make an audiophile blush and rather than rely on third-party gubbins, it’s all neatly tucked into one nimble code file.
In short, I’m chuffed to bits that PHP can don the electronic composer’s mantle, but if you ever fancy trying a similarly self-contained approach in a different language, do pop by one’s repository. And do keep that cowbell chiming—especially at tea time.
Cheers!
https://github.com/IntuitionAmiga/IntuitionEngine/blob/main/audio_chip.go
https://www.youtube.com/watch?v=jBEvtF2EyWA
Oh, obligatory reference to Florian’s Bad Gear channel:
https://youtu.be/qr4CvcSNHtM?si=RDeMXKYGeCTYfzaY
“You’ve already heard realtime PHP synthesis in our little intro tune…”