For my final project, I'd like to create an interactive projections piece, wherein an audience member changes the color of the lights in this dollhouse using a remote, and max responds to the color change with a corresponding video projection.
4/29
This week, I'm starting to structure out how my max patch will look. This involves some reading on civ.jit packages, to understand how to get the camera to look only at one spot (if I don't go the route of arduinos).
https://docs.cycling74.com/max7/tutorials/jitterchapter25
I'm also working on getting the lighting in the dollhouse working; if the whole idea is predicated on the lights changing colors, then I need the lighting...installed. I'm currently waiting for some glue to finish drying, and then I can make the hanging mechanisms a bit prettier.
After some more reading, I think if I don't use arduinos, I'll want to use getcell and turn the dollhouse feed into a matrix, with which I can check & then respond to the color of a specific object in the space. I'm thinking of using the white kitchen island, as it will best reflect the color of the lights.
To see if this is possible, I'm testing different colors of the LEDs to see what I get in terms of RGB values.
The patch thus far:
The color grid corresponds to my remote for the lights (color names are...very approximate).
The highlighted colors are the ones I think are different enough to be useful in this endeavor. The downside to this is the level of specificity, I think - my next steps will be determining if I can find a way to check the RGB values in combination in an if/then statement. IE - check both that R is over 240 and G is under 20 and then play the red video. Check if R is under 50 and B is over 250 and play the dark blue video. And so forth.
5/5
This week I created a Teachable Machine model to see White, Blue, Red, Green, and Pink light in the dollhouse.
Then...Kwame and I, with the help of an irc buddy of mine, went down a huge rabbit hole of trying to make it so I can change my camera input within the code TM provides. We managed to get a button that lets you choose your camera...and then doesn't actually change anything.
We know we need to incorporate this code:
https://github.com/webrtc/samples/tree/gh-pages/src/content/devices/input-output
into this code:
https://github.com/googlecreativelab/teachablemachine-community/blob/master/libraries/image/src/utils/webcam.ts
to replace the default webcam stuff in the TM-provided code. However, neither of us know how to use TS files. We tried taking the code from both and integrating it into my index file directly, and that did not work. (well, the first one kind of did - we got the drop down menu! but it didn't actually do anything).
So, that's where I'm at right now. Have a working model, but it wants to insist on using my personal webcam instead of my external one. I might spend some time trying to get the next bit working - the video player checking the TM for changes and operating on that - and come back to this.
Update as of 5/11!
I figured out, after some struggling, how to get the logic to work where the data stops inputting while the video is playing!
The next step will be doing this with my actual projector & webcam set up. If I can get chrome to see the right webcam, I need to try to get this patch working with maxmapper - it wasn't earlier, so I removed that aspect of the patch just to get the video working in the first place.