Live show safety

Just wanted to share a bit of code that saved my bacon last night.

In a live set, one of my SynthDefs produced a NaN (not-a-number). NaN is bad because it’s unrecoverable in math operations, and if it gets into a feedback delay line or reverb, you’re toast. This has happened to me… so, some years ago, I added lines 51-56 or so into my MixerChannel quark.

In my setup, all signals go through mixer channels, and this logic instantly kills any bad values – they’re replaced by 0. That can sound glitchy, but all the other channels play normally. So the audience might be aware that something went wrong, but the bad value doesn’t destroy the whole output.

I’m also sending a message back to the language, so that it can post a message saying which channel is affected. I could use that last night to clear the offending channel and rebuild it, without panicking and stopping the whole performance.

This is something you might not think you need… until you’re on stage and your set crashed and burned because a 700 dB signal flooded your reverb and made 20 seconds of godawful distortion. (True story.)

Moral of the story: Safety checks matter.

hjh

7 Likes

Sage. Code added. Many thanks :]
Nick