use audio input change video color

rayon's icon

Hi,

I'll try the best to explain what I want but I apologize if this doesn't make any sense.
I'm trying to use audio input to interactive with jitter video. What I want is that base on the audio input frequency and amplitude, the video change color.

I've search everywhere on the internet and couldn't get any help at all.

Thank you!

rayon

Rob Ramirez's icon

maybe this will get you started.
this is for amplitude.
for frequency you want to download an external called fiddle~

Max Patch
Copy patch and select New From Clipboard in Max.

rayon's icon

That helps a lot...
Okay, now I'm using peakamp~ and jit.brcosa in my patch. I am able to use audio input to change the brightness, contrast and saturation of the video. Great!!! Here comes my next question. If I want only one channel change saturation, say Red channel. What should I do???

Thank you very much!

Rob Ramirez's icon

jit.unpack.

also, if you are using peakamp~ with live input, i strongly suggest you look at and dissect jitter tutorial #28.

rayon's icon

Thanks! I'll try it now.

rayon's icon

robtherich,

Thank you so much for your help. I am almost there...
I tried the jit.unpack and it does what I want. But here is another problem, when my audio input hooked up with the Rscale (to change red channel only), my video turn blue immediately. Suppose I want the video remain no change until there is a change in audio input then the video Red channel increases.

I hope this make sense.

Thank you again for your help!

Here is what I have:

Max Patch
Copy patch and select New From Clipboard in Max.

Rob Ramirez's icon

you need to find the range of the audio signal that you are using as the control signal. something like .001 to .5.
then you want to use the scale object to translate that range into your red video channel scale value:
scale .001 .5 1.0 2.0

you are going to want to clamp your control signal to that range, so that the scale value doesn't dip below 1.0. again, you really want to look at that tutorial i mentioned, to find the best way to do this.

rayon's icon

Thanks again. I'm really just a beginner and learning everything on my own. Your reply helps a lot... I'll check the tutorial again tonight.