dedicated Python module for digital signal processing
Pyo is a Python module written in C to help DSP script creation. Pyo contains classes for a wide variety of audio signal processing. With pyo, the user will be able to include signal processing chains directly in Python scripts or projects, and to manipulate them in real time through the interpreter. Tools in the pyo module offer primitives, like mathematical operations on audio signals, basic signal processing (filters, delays, synthesis generators, etc.), but also complex algorithms to create sound granulation and other creative audio manipulations. pyo supports the OSC protocol (Open Sound Control) to ease communications between softwares, and the MIDI protocol for generating sound events and controlling process parameters. pyo allows the creation of sophisticated signal processing chains with all the benefits of a mature and widely used general programming language.
Pyo was awarded second prize in the Lomus 2012 Free Software Competition.
Installing pyo 1.0.1
python -m pip install pyo
For more details, visit Installing pyo with pip.
Older releases of pyo (prior to 1.0.0) are available here.
Complete documentation of pyo 1.0.1 classes can be found here.
You can subscribe to the pyo-discuss mailing list here.
If you are interested to learn about the integration of pyo on the Bela platform (very low-latency real-time dsp on the BeagleBone Black), you can take a look to the slides (in french) I used in a talk given at Les Rencontres Francophones de Lutherie Augmentées in may 2016. Here are the examples written for this session.
Here is an update of the slides (also in french) about the integration of pyo on the Bela platform.
Pyo Feature Market
You want to help the development of pyo ?
If you want to listen to scripts rendered in real-time, connect to Radio Pyo!
You want to have your script played on the radio ? Download the template and submit your song on the mailing list !
This project is developed by Olivier on his free time to provide a fully integrated Python dsp module for sound exploration and music composition. If you feel this project is useful to you and want to support it and it’s future development, please consider donating money. I only ask for a small donation, but of course I appreciate any amount.
pyo is fully integrated to Python and very simple to use.
– Play a soundfile :
from pyo import * s = Server().boot() s.start() sf = SfPlayer("path/to/your/sound.aif", speed=1, loop=True).out()
– Granulate an audio buffer :
s = Server().boot() s.start() snd = SndTable("path/to/your/sound.aif") env = HannTable() pos = Phasor(freq=snd.getRate()*.25, mul=snd.getSize()) dur = Noise(mul=.001, add=.1) g = Granulator(snd, env, [1, 1.001], pos, dur, 32, mul=.1).out()
– Generate melodies :
s = Server().boot() s.start() wav = SquareTable() env = CosTable([(0,0), (100,1), (500,.3), (8191,0)]) met = Metro(.125, 12).play() amp = TrigEnv(met, table=env, dur=1, mul=.1) pit = TrigXnoiseMidi(met, dist='loopseg', x1=20, scale=1, mrange=(48,84)) out = Osc(table=wav, freq=pit, mul=amp).out()