Forums > MaxMSP

Need help with triggering audio (newcomer and lost)

Nov 02 2011 | 10:19 am

Hey people!

I need to make a program that triggers a random soundfile (from a list of several files) whenever the computers microphone "hears" anything.

So far i can only make MAX play what the computer "hears".

I cant find any answers through searching but something tells me this is quite simple to do.

Sorry for the inconvenience, i hope someone is able to help

Kind Regards


Nov 02 2011 | 10:26 am

Have you tried ezadc for mic input? or adc~ ?
a problem ive recently overcome too.
fellow rookie!

Nov 02 2011 | 10:28 am

You mean to choose a random file after a "audio trigger" over your mic? But you don’t want to recognize the speech (like Siri on iPhone 4S), right? So lets say anybody claps in the hands – the next random file is playing etc.?

Nov 02 2011 | 10:29 am

Yeah i use ezadc – and it picks up the mic. The problem is however that i cant make the input trigger a soundfile – i can only make it play the input back in the headphones. Thanks for the quick reply

Nov 02 2011 | 10:30 am


Thats exactly what i want to do :) audio trigger that plays when someone speaks or clap their hands etc.

Nov 02 2011 | 11:08 am

Here is a solution. But I can’t remeber how to convert a signal to bang. This is a TODO in that patch. But you can see the "1" inside the number~ object if you clap. Maybe you have to change the numbers a little bit for your mic. With my Mac Book Pro it works perfect.

I’m sure that the convert-thing into bang is very simple, but can’t remeber…

-- Pasted Max Patch, click to expand. --

Nov 02 2011 | 11:22 am

Now it works! The right outlet of number~ provides the float value, so compare that with 1 and done :-)

-- Pasted Max Patch, click to expand. --

Nov 02 2011 | 11:34 am

Thanks this is very neat… my only problem now is how to make it actually play a sound. I see that it recieves my the input but nothing is playing and i dno how … sorry im so green to this

Nov 02 2011 | 12:58 pm


Nov 02 2011 | 4:29 pm

What are you using to play the sound files? Figure out what that needs and what your result from the earlier patch is and try to bridge the gap.

Viewing 10 posts - 1 through 10 (of 10 total)

Forums > MaxMSP