Forums > MaxMSP

making sound trigger sound without the sound triggering itself max msp

Nov 03 2011 | 3:37 pm

Hey i think the title explains my problem… i need to make sound trigger sound (through input) without the sound triggering itself (at the output) max msp.

So basically when u clap or say something in front of the computer, a random sound will trigger – but the sound itself wont trigger a new one.

This is what i’ve got so far :)

I appreciate any help on the topic

Best regards Malte

  1. Untitled2.maxpat

Nov 03 2011 | 4:09 pm


A quick search through the forums:

There’s a lot of ways to get what you want, but i noticed you’ve asked the same question a couple of days ago. I’m not an expert myself, but if i were you, i would definitely take the time to go through the tutorials. Some basic objects and a bit of trial and error will get you where you want to be.

Good luck.

Nov 04 2011 | 6:42 pm

Thanks but the question i asked before is not at all the same. Im sorry if i described it poorly… i solved the other problem but this one is still bugging me.. cant seem to fix it.

Nov 05 2011 | 10:56 am

Sounds a bit the same to me though. So, this random sound, you mean a random note, or a random sound from a folder on your computer….?
What you have now seems to be correct to me, outputting a random note number between 0 and 49, with a fixed velocity and duration.

Not sure if i would add the left and right channel input together (your +~ object) though.

So what’s your next step? Do you mean that the sound that’s been triggered coming from your laptop speaker shouldn’t trigger a new sound? If that’s the case, what about following this route: since you know how long your triggered sound will play, you can use that length/info to "block" new input to your microphone for that amount of time. Probably a few ways to do that, but it’s more fun to look for that yourself.

Does it help?

Nov 06 2011 | 1:42 pm

Yeah that helps a lot man! Thanks! and to ur first question i want it to play random soundfiles from a folder.. i havent managed that but i think i can find out how by reading more tutorials – if u dont wanna spoil me and tell me :)

Nov 06 2011 | 5:01 pm


sfplay~ and umenu are your friends here. And note that sfplay~’s right output sends a bang when your file is done playing, so that’s probably the easiest way to open the gates (pun intended) of your sound input again.

Enough spoiling for now :)

Nov 06 2011 | 6:16 pm

Here is a beginning. As I couldn’t figure out what you wanted to achieve with this random piano stuff, I replaced it with a random file menu.
Note that I’m also a beginner so that might not be the smarter way to do it. And you’ll have to sort out the gate system on the input because I have to make dinner for now !

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

Nov 07 2011 | 12:07 am

Hey Stephane! Thanks for the code. However i dont understand why it doesnt react to an input?

Nov 07 2011 | 5:53 am

It does. did you toggle on the metro ?

Nov 07 2011 | 11:12 am

yeah but it still doesnt work :S

Nov 07 2011 | 11:15 am

it says: sfplay~ bad argument for message "open"

Nov 07 2011 | 11:49 am

That’s probably because the umenu refers to a folder that doesn’t exist on your computer (and that’s obvious). You have to point to a folder on your computer In the inspector of umenu.

Nov 07 2011 | 11:54 am

already did that. Still not working …

Nov 07 2011 | 11:59 am

got it workin.. dno how but suddenly… magical :)

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

Forums > MaxMSP