home/ atoms/ strudel-dollar-voice-prefix

Each independent Strudel voice in a multi-pattern session must be on its own $: prefixed line

Strudel supports multiple independent pattern voices in a single session. Each voice must be defined on its own line with the $: prefix (e.g. $: s('bd*4') for drums, $: note('c2').s('sawtooth') for bass). A missing prefix or accidentally chained lines cause voices to be merged, silenced, or not registered. The $: is not JavaScript syntax but Strudel’s session notation that the evaluate function parses to create parallel pattern runners.

Examples

$: s('bd*4').gain(0.7) — one drum voice. $: note('c2 eb2').s('saw') — separate bass voice. Without $: on the second line — may merge or not run.

Assessment

Write a Strudel session with two independent voices (drums and bass). Explain what the $: prefix does and what happens if it is missing from one of the lines.

“Each independent voice is its own `$: …` line; ensure the prefix and t”
context/ · L5-debug/strudel.md · chunk 1