Write Python. Save the file. Hear it change.
Your code structure becomes music — in real time.
How it works
PyCodeDJ analyses the AST of your Python code and maps structural features to audio parameters — no music theory required.
Get started
Python 3.10+, SuperCollider, and one pip command.
$ pip install 'pycodedj[watch]' # Evaluate a loop block once $ pycodedj eval demo.py::bass # Watch file — auto-reload on save $ pycodedj watch demo.py
sc/synths.scd in the SC IDE → Ctrl+A → Ctrl+Enter. Wait for Ready.
pip install 'pycodedj[watch]'
pycodedj watch myfile.py and start editing
Examples
Try changing these patterns — each one shifts the sound in a different direction.
from pycodedj import loop @loop("bass", interval=2.0) def bass(volume=0.4): for i in range(8): for j in range(4): if i == j: pass
from pycodedj import loop @loop("chord", interval=1.0) def chord(volume=0.2): def voice_a(): pass def voice_b(): pass def voice_c(): pass def voice_d(): pass
from pycodedj import loop @loop("pad", interval=4.0) def pad(volume=0.15): # smoke above the kick # late reflections # concrete room tail # crowd heat pass