There is currently no way to directly trigger a sound effect from style code.
As you point out, TrDoEffect<>
is probably what you want, but normally that will require some code somewhere to trigger the actual sound effect.
Interestingly I’ve recently found a way to make strings into templates, so something that directly plays a wav file could be possible, although I’m not sure that’s actually a good idea, as it sort of breaks what styles are supposed to do.
Maybe what we need is “sound styles”.