Open-source sound synthesis in Python
Pysound is a simple sound synthesis library written in Python.
Pysound is open-source, and the code is available on github.
Pysound consists of a number of sound synthesis components such as oscillators, envelopes, mixers, and sequencers that can be joined together to create complex sounds.
Pysound has similarities with other modular software synths such as CSound, Supercollider, Pure Data or ChucK, in that it combines simple components to create complex sounds.
However, Pysound has a slightly different emphasis. It is designed to be easy to learn and use, and in particular it is easy to create your own modules in Python.
This design decision comes with a few downsides:
Pysound is not interactive. To create a sound, you write some code, run it, then listen to the sound file it creates.
As a consequence, it doesn't support live coding.
Also as a consequence, you can't use Pysound as a VST instrument or effect.
Pysound would typically be used for relatively short sounds, although there is no upper limit.
Pysound is currently mono only.
Pysound is aimed more at experimentation and sound design. It attempts to make it as easy as possible to create new sound components if you wish, so it can be used for sound design, creating experimental instruments, or crafting detailed instrument solos where you need complete control over every parameter of the sound.
But it is early days yet, currently the software is not fully developed, but hopefully there is enough to start playing with.
Pysound uses NumPy arrays to store sound buffers. This allows sound calculations to be performed very efficiently, and simplifies the creation of new components. As a bonus, it means sound buffers can be combined using Python operators. For example, if
b are sound buffers,
c = a + b will create a new sound buffer that is the sample-by-sample sum of the two original buffers.
Read the rest of this series on martinmcbride.org