tidalcycles / strudel

Web-based environment for live coding algorithmic patterns, incorporating a faithful port of TidalCycles to JavaScript
https://strudel.cc/
GNU Affero General Public License v3.0
642 stars 111 forks source link

transpile label expressions to `p` calls #990

Closed felixroos closed 6 months ago

felixroos commented 6 months ago

label expressions could be used to set the key of the pattern:

p1: s("bd*4")

p2: note("c e g b")

could be made equivalent to:

s("bd*4").p('p1')
note("c e g b").p('p2')

label expressions are a niche js syntax that is very much unused, so perfect for overloading. This benefits readability, especially in combination with inline widgets:

before:

image

after:

image