Ever wondered how computers make sound? This interactive presentation takes you on a journey through digital audio synthesis, from the physics of sound waves to creating actual music. It starts with simple sine waves and builds up to a multi-instrument compositios -- all in a reactive Python notebook you can play with!
Originally presented at the February 2026 edition of the Python Lisbon Meetup.
- Physics & Anatomy - How sound works and how our ears perceive it.
- Digital Audio Fundamentals - Sample rates, waveforms, and envelopes.
- Harmonics & Timbre - Why different instruments sound differently.
- Musical Theory - Scales, chords, and the relationships between notes.
- Synthesis & Effects - Building your own instruments and adding audio effects.
-
Clone this repository.
-
Install
uvif you don't have it yet. -
Launch the notebook:
uv run marimo edit beep.py
- Python 3.13 or newer.
- Speakers or headphones.
- A modern web browser.
- marimo - Reactive Python notebook.
- numpy - Numerical computation and array operations.
- sounddevice - Audio playback.
- matplotlib - Waveform visualization.
© 2026 by Tiago Montes is licensed under CC BY-NC-SA 4.0.