home/ atoms/ sardine-repl-evaluation-model

Sardine's live coding relies on a REPL: evaluate-and-update any code while the scheduler keeps running

Sardine’s performance workflow is REPL-based: a text editor sends code to a running Python interpreter via a key shortcut (Shift+Enter in the web editor, or configured hotkeys in VSCode/Vim/Emacs). The interpreter executes each submitted block immediately and the scheduler picks up any changes on the next cycle. Patterns jump to their new definition as soon as code is submitted — no stop/restart needed. To halt all output gracefully use silence(); for an emergency stop use panic(). Individual patterns can be stopped with Pa.stop() or silence(Pa).

Examples

Write Pa * d(‘bd cp’) and evaluate → drum loop starts. Change to Pa * d(‘bd bd cp’) and re-evaluate → new pattern takes over on the next bar. Type silence() → all patterns stop.

Assessment

During a live performance the wrong pattern fires. Name two Sardine commands that stop it and describe when you would use each.

“Your main document is your playing interface. Write / edit / change code. Send code for evaluation by pressing a key or keystroke combination.”