• Audio
  • Bela Pepper-Pd: HOw to detect that that a jack is connected to an input?

Hello All,

Maybe this is a trivial question : I would like to know if it is possible to detect if a jack-plug is connected to an input in Pd.
I would like to achieve the following : if there is a mono entry (only one jack plug in) in ADC 1-2 => duplicate the signal to both channels stereo for treatment ; if 2 inputs => treat the stereo signal . As the inputs are mainly short bursts, I am afraid that using env~ or dbm will not be usable.

Thnak you for your help

    Just a quick reply as a soluce : env~ seems to do the trick. Just checking if env~ > 30 does the trick.
    Any better solution is welcome !

      JMC64 I would like to know if it is possible to detect if a jack-plug is connected to an input in Pd.

      This really depends on what you connect to the inputs: the input signals are shorted to ground when nothing is plugged in, so if you have something "quiet enough" you won't have a way to detect this.

      JMC64 Just checking if env~ > 30 does the trick.

      great that this works in your case!