Need help with triggering audio (newcomer and lost)

Nov 2, 2011 at 10:19am

Need help with triggering audio (newcomer and lost)

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

M

#59747
Nov 2, 2011 at 10:26am

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

#215055
Nov 2, 2011 at 10:28am

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.?

#215056
Nov 2, 2011 at 10:29am

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

#215057
Nov 2, 2011 at 10:30am

Vektoren:

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

#215058
Nov 2, 2011 at 11:08am

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. –
#215059
Nov 2, 2011 at 11:22am

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. –
#215060
Nov 2, 2011 at 11:34am

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

#215061
Nov 2, 2011 at 12:58pm

bump

#215062
Nov 2, 2011 at 4:29pm

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.

#215063

You must be logged in to reply to this topic.