Pyo for Python

Pyo is the most popular DSP audio library for Python which allow us to synthesise sounds and therefore create music and sounds using Python’s syntax. I will be exploring it in depth for my practice based research in this unit and I will use it to compose my Creative Sound Work. But in order to successfully create great sounds with this library first I had to learn a bit of coding in Python and I researched about it online. Installing all the software is also a complicated task, we’ll need the Python 3 compiler, a code editor named PyCharm, to compile our code and then we’ll be able to start installing libraries; Installing them is not as straightforward as other software, we need to use utilities like Pip, Homebrew or Github to setup them. Some commands that we’ll need to type on the terminal are the following:

#to install Pyo on Mac

python3.7 -m pip install --user pyo

#Installing latest version from Github

git clone https://github.com/belangeo/pyo.git

#installing Homebrew

$ brew install wget

#installing other needed libraries
#Portaudio

$ brew install portaudio

#Portmidi

$ brew install portmidi

#and more...

Once Pyo has all needed dependencies to run we can try and type our first code and we will hear a Sinewave tone, this is known as the ‘Hello world’ of audio programming.

from pyo import *
s = Server().boot()
s.start()
a = Sine(mul=0.01).out()
s.gui(locals())

After doing some research on the available objects for Pyo I ended up with cool composition, combining different waveforms, lfo’s and noise and I did a little jam where I used some sounds from the modular synth and from the OP-1 too.

Leave a Reply

Your email address will not be published. Required fields are marked *