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
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.
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.
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?
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 :)
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 :)
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 !
----------begin_max5_patcher---------- 1889.3oc0b98iaZDDG+469q.41GuyGyr6xORkpThxC8gl9PR6SUUVb1XezZC VFbxkDk72dWVv9Lt.9KmswWkhHA7WCy7gYmcv6P950WM39jGCSGX8Jq+z5pq 950Wck4P4G3px8uZvhfGGOOH0HaPVxrYyCGbSwGEudQx5r4gYlOjJOZwgx97 xvhy7fn3rAV+U4mtLHa7CQwyFsJ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FxzUlW9zmffflEoeyO.XQ8a XOT1Am9MJCvj5XZcx2DUQpxeVAyzUU2i4surppx8NR+Pd58ii8Qx.rHYuZQH CQcdwk0kr6Z3WQPkWw+WHPps6cBpt+k1b6HAY4qyXWdr+dyldtbRuy2t9eYA gwLN -----------end_max5_patcher-----------
Hey Stephane! Thanks for the code. However i dont understand why it doesnt react to an input?
It does. did you toggle on the metro ?
yeah but it still doesnt work :S
it says: sfplay~ bad argument for message "open"
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.
already did that. Still not working …
got it workin.. dno how but suddenly… magical :)