Skip to main content

Install

It needs Python 3.9 or later and JupyterLab, Jupyter Notebook 7, VS Code or Colab. Load the extension once per kernel:

%%music

A cell that starts with %%music is evaluated as composer-nb, and each play renders below it. Tab completes inside the cell.

Cells that continue

verse plays at tempo 75, two semitones up, and can use riff. The link is by name, so cell order doesn’t matter.

Song

%%music creates a Song. Build one in Python to generate source. after is the Song it continues from, and name labels the output. Errors in the source show in the output and aren’t raised.