let sound respond to the presence of color

Bram Wicherson's icon
Hi, I'm new to Max MSP. I'm working on a patch that turns on a sound when it recognizes a certain color. Currently I have managed to trace a color, but I am not yet able to get it to trigger a specific sound. I'm a bit stuck at the moment. Can anyone help me?

Source Audio's icon

would you compare 3 rgb values and pick highest one ?

Bram Wicherson's icon

thank you for your answer. I would like to play a sound by seeing the presence of a color. And that by each color Im tracking. In this case: yellow, blue and red. So the patch will play a sound by seeing the values of the presence of the color.

Source Audio's icon

I don't understand what you mean by play a sound by seeing values.

start / stoop when what ?

or loop all the time and adjust level depending on value ?

Or anything else ?

Bram Wicherson's icon

hi, at this moment I can trigger sound by the value of color. Only now it plays continuously. How can I ensure that it only plays once when it is triggered? I tried with the bang output from sfplay to a 0 message output and back to gate 1. But that doesn't work. What am I doing wrong?


Source Audio's icon

ok, so you want to start playback when color value is > 20.

and allow next start only after playback finished, right ?

that gate is wired wrong.

this would be one option :

you don't need to tell sfplay~ to open same file every time playback triggers.

As soon as playback is finished, > 20 detector can trigger again.

I don't know if you need some delay in between or other conditions,

like change from < 20 to > 20 etc