Change the video to webcam input/output

jur24's icon

Hello!

Iam new to MAX and learning quite quick but iam stuck. I know my way around javascript but not yet in MAX msp.
My question is: Is there a way to change the video into a webcam?? I found this patcher on the forums but I want to change the input into a live feed instead of a video.

Iam working on a metal mirror installation and I need to get the data from the webcam feed to control the mirror plates.

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

Hopefully the patcher explains what I want to get fixed.

movieToBang.js
js
SID's icon

This should get you on your way. (from the jit.qt.grab helper)

Simply replace the jit.qt.grab with your jit.dx.grab and you should be good to go (that is if jit.dx objects work in the same way as jit.qt objects).

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

Best of Luck

yaniki's icon

Or use [jit.grab] - this object is platform independent.

jur24's icon

Hey!

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

Thanks for the reply and I can get the webcam to work just fine, but since the installation Iam building needs to control each ''pixel'' I want to translate that webcam feed to the one I got working with the video(See attached patcher). I need to control each pixel to create an image.

SID's icon

I couldn't get any visuals from your patch. Admittedly, I don't know anything about JS, so your JS object is a mystery to me.

For what it's worth, here is a jit.grab and a jit.qt.movie controlled at a switch. The placement of your JS object would depend on what it does.

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

yaniki's icon

Use [jit.iter] to covert matrix data into values represent single pixels (use also [jit.rgba2luma] before).

jur24's icon

Yes! Thanks for the help and guidance, this helped me alot!