home/ atoms/ sonic-pi-osc-path-matching

Sonic Pi's Time State paths support OSC-style wildcard pattern matching for sync and get

Paths in Sonic Pi’s Time State support OSC-compatible wildcards: * matches any segment content; ** matches nested path segments of any depth; ? matches a single character; {a,b} matches enumerated alternatives; [a-z] matches character ranges. Multiple wildcards can be combined freely. A single sync call can listen to multiple event sources. Rules are based on the Open Sound Control specification.

Examples

sync ”/?oo/[a-z]/ba/{quux,quaax}/“

Assessment

Write a sync pattern that matches /midi/any_device/0/1/note_on for any device name. Explain what ** adds compared to *.

“these matching rules are based on the Open Sound Control pattern matching specification”
corpus · sonic-pi-built-in-tutorial · chunk 21