MCPcopy Index your code
hub / github.com/belangeo/pyo

github.com/belangeo/pyo @1.0.6

Chat with this repo
repository ↗ · DeepWiki ↗ · release 1.0.6 ↗ · + Follow
8,740 symbols 24,751 edges 367 files 2,564 documented · 29% updated 16d ago★ 1,44330 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Pyo - Python DSP module

pyo is a Python module written in C to help digital signal processing script creation.

pyo is a Python module containing classes for a wide variety of audio signal processing types. With pyo, 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 pyo module offer primitives, like mathematical operations on audio signal, basic signal processing (filters, delays, synthesis generators, etc.), but also complex algorithms to create sound granulation and others creative audio manipulations. pyo supports OSC protocol (Open Sound Control), to ease communications between softwares, and MIDI protocol, for generating sound events and controlling process parameters. pyo allows creation of sophisticated signal processing chains with all the benefits of a mature, and widely used, general programming language.

Available from Pypi:

  • python 3.7 (Windows amd64, MacOS x86_64, linux x86_64)
  • python 3.8 (Windows amd64, MacOS x86_64 et arm64, linux x86_64)
  • python 3.9 (Windows amd64, MacOS x86_64 et arm64, linux x86_64)
  • python 3.10 (Windows amd64, MacOS x86_64 et arm64, linux x86_64)
  • python 3.11 (Windows amd64, MacOS x86_64 et arm64)

For more informations and documentation, visit the PYO DOCUMENTATION.

How to install pre-built packages on any platform using pip: INSTALL Instructions.

How to get pyo running from sources on macOS and linux: COMPILE Instructions.

pyo was awarded second prize in the Lomus 2012 Free Software Competition.

You want to help the development of pyo ? Go to the pyo features market and make a donation for the feature you want to promote. You can also submit new features on the mailing-list ( pyo-discuss@googlegroups.com ).

Radio Pyo

If you want to listen to scripts rendered in real-time, just connect to Radio Pyo !

You want to have your script played on the radio ? Download the template radiopyo_template.py, follow the rules and post it on the mailing-list !

Software using Pyo as audio engine

Cecilia 5 : An audio signal processing environment.

PsychoPy : An open-source application to allow the presentation of stimuli and collection of data for a wide range of neuroscience, psychology and psychophysics experiments.

Soundgrain : A graphical interface where users can draw and edit trajectories to control granular sound synthesis.

Zyne : A modular soft synthesizer.

Pyo Synth : Pyo Synth is an open source application that makes the manipulation of pyo scripts easier by letting you control it with a midi keyboard.

Examples

pyo is fully integrated to Python and very simple to use.

Play a sound:

>>> 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, 24, 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, mul=.1)
>>> pit = TrigXnoiseMidi(met, dist='loopseg', x1=20, scale=1, mrange=(48,84))
>>> out = Osc(table=wav, freq=pit, mul=amp).out()

Donation

This project is developed by Olivier Bélanger 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.

Support via PayPal

Core symbols most depended-on inside this repo

wrap
called by 2000
pyo/lib/_core.py
pyoArgsAssert
called by 1107
pyo/lib/_core.py
Stream_getData
called by 895
src/engine/streammodule.c
convertArgsToLists
called by 851
pyo/lib/_core.py
range
called by 649
docs/_static/underscore-1.13.1.js
get
called by 354
pyo/lib/_maps.py
append
called by 337
pyo/lib/tables.py
module_add_object
called by 333
src/engine/pyomodule.c

Shape

Function 4,600
Method 3,666
Class 449
Route 25

Languages

Python49%
C45%
TypeScript6%
C++1%

Modules by API surface

pyo/editor/EPyo.py405 symbols
src/objects/oscilmodule.c358 symbols
pyo/lib/filters.py301 symbols
pyo/lib/triggers.py299 symbols
pyo/lib/tableprocess.py298 symbols
pyo/lib/_wxwidgets.py296 symbols
src/objects/phasevocmodule.c235 symbols
src/objects/tablemodule.c230 symbols
pyo/lib/_core.py209 symbols
src/objects/trigmodule.c203 symbols
src/objects/randommodule.c186 symbols
src/objects/filtremodule.c184 symbols

For agents

$ claude mcp add pyo \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page