Is there a simple way, in code or with modules to test if a patch cable is connected to an input?
There are plenty of situations with subpatches for example, when one might want to know if a user has a patch cable connected.
The prime example that I'm struggling with tonight, is having a combined Noise and Sample-and-Hold module. If there's no signal connected to the input the patcher should route the noise to the SnH input. If there is a signal connected the patcher should use that. I'm not exactly sure how to test. "input !=0" would route to noise if the input was quiet. There are several other incorrect tests my brain went through.
If there was a way to do it in code (C) I might take a basic module's code and hack together an "is connected" module. If the input is connected to a patch cable send a high gate and pass the signal through. Otherwise basically do literally nothing.
Any smart ideas would be appreciated. I feel this functionality could also be handy in other modules - certain code could take precedence in specific conditions.