I have multiple audio inputs, but only want one to play at a time

Elizaveta Weber's icon

Im having some trouble playing only one reverbed sound at a time. Basically what I want is if the number falls between a specific range it will trigger a reverbed version of what the mic is inputting, however, when i make a sound every single range plays at once? anyone know how i can make it so only one plays at a time depending on the number range?

face detection samples.maxhelp
maxhelp 25.53 KB

Jean-Francois Charles's icon

Hi, welcome on the Max forum.
When you post questions here, try to:
- make your patch as focused as possible on your question (in this case, the whole video part is not relevant to your question)
- select the objects in your patch, use Edit -> Copy Compressed, then paste in your post: that way, more users are going to look at your question
Now, about your question: you are currently giving quite high numbers to [live.gain~], which are interpreted as dB values.

Max Patch
Copy patch and select New From Clipboard in Max.

Elizaveta Weber's icon

Hey thanks so much for the instructions on how to properly post! Below is my revised patch upload, I've opted to use a gate now however the gate only outputs the selected data if i reset the audio input (click and reclick the button), I want it to be triggered automatically and not have to be manually reset

Max Patch
Copy patch and select New From Clipboard in Max.

Jean-Francois Charles's icon

Hi. Among the problems in your patch:
- the way you use [ezadc~] doesn't make sense
- using just one [ezadc~] instead of two would be more idiomatic
- using [< 75] rather than [if then else] would be more idiomatic
- most importantly, you're using [gswitch] to route signals: you should use a signal object instead.
To keep things simple, I'm going to give you an example that doesn't take into account the necessary fade in/out that will prevent clicks to happen when you switch.

Max Patch
Copy patch and select New From Clipboard in Max.

Learning Max takes time. Make sure you go through some basic Max tutorials (to be able to do basic Max and logical operations) and some basic MSP tutorials (to know the basics of digital audio, etc.)

As I said, the snippet I gave you will include clicks when you switch. To avoid that, you could look into the [matrix~] object using attribute @ramp 20 for instance. If it's not clear why you'll get clicks, make sure you study MSP Basics Tutorial 2: Adjustable Oscillator.