making sound trigger sound without the sound triggering itself max msp

Nov 3, 2011 at 3:37pm

making sound trigger sound without the sound triggering itself max msp

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

Attachments:
  1. Untitled2.maxpat
#59780
Nov 3, 2011 at 4:09pm

Hi,

A quick search through the forums:

http://cycling74.com/forums/topic.php?id=26499

http://cycling74.com/forums/topic.php?id=33200

http://cycling74.com/forums/topic.php?id=32291

http://cycling74.com/forums/topic.php?id=23913

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.

#215144
Nov 4, 2011 at 6:42pm

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.

#215145
Nov 5, 2011 at 10:56am

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?

#215146
Nov 6, 2011 at 1:42pm

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 :)

#215147
Nov 6, 2011 at 5:01pm

Good.

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 :)

#215148
Nov 6, 2011 at 6:16pm

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. –
#215149
Nov 7, 2011 at 12:07am

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

#215150
Nov 7, 2011 at 5:53am

It does. did you toggle on the metro ?

#215151
Nov 7, 2011 at 11:12am

yeah but it still doesnt work :S

#215152
Nov 7, 2011 at 11:15am

it says: sfplay~ bad argument for message “open”

#215153
Nov 7, 2011 at 11:49am

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.

#215154
Nov 7, 2011 at 11:54am

already did that. Still not working …

#215155
Nov 7, 2011 at 11:59am

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

#215156

You must be logged in to reply to this topic.