Thanks very much for the example. @jamshark70 proposed a slightly different solution which seems to work, so I’ve been working with that, but I may try your method, too.
I actually worked with SuperCollider quite intensively for a period last year, but seem to have forgotten everything, now, so I feel like I’m starting from scratch again. I’m excited by the possibilities again, though!