home/ atoms/ strudel-error-keeps-pattern-playing

A failed Strudel evaluate leaves the previously running pattern playing rather than stopping audio

Strudel evaluates code inside a try/catch on every save. When a thrown error occurs — syntax error, undefined function, bad mini-notation — the error is displayed in the on-page #err element as strudel: <message>, but the previously running pattern continues playing. The failed evaluate installs nothing new. Recovery is always: fix the code and save again. This forgiving property means a syntax error never silences a live performance. Some failures (unknown sample, locked AudioContext, missing .analyze) throw nothing and produce only silent-symptom bugs.

Examples

Type .fasttt(2) (misspelled method) and save — the #err shows ‘fasttt is not a function’, but the pattern keeps playing. Fix to .fast(2) and save — the pattern updates.

Assessment

Explain what Strudel does when evaluate() throws an error. Describe two failure modes that do NOT throw an error, and how each manifests.

“the previously running pattern keeps playing** — a failed `evaluate` does not st”
context/ · L5-debug/strudel.md · chunk 1