I am trying to build a patch in which multiple videos are overlayed and triggered from Supercollider using OSC. There are four things I am seeking to do which I have not yet achieved.
- Have multiple videos play at the same time with transparency. In the code below I have used tint, but it has not made the video transparent.
- I want the video to disappear after play() is complete, but instead it remains there with the final frame.
- For testing purposes I am trying to trigger a new video using mouseClicked, however when I click the mouse there is no sign of a new video.
- I want the trigger for the new video to come from OSC. As a beginner in Processing, coming from a music background, I am struggling with this conceptually. Essentially - as I see it - I need to call a function each time an OSC message is sent. However, in terms of code I am not sure what that would look like.
Here is the very basic code I am working with.
import processing.video.*;
Movie movie;
void setup() {
size(400, 480);
movie = new Movie(this, "Earth.mp4");
}
void movieEvent(Movie movie) {
movie.read();
}
void mouseClicked() {
movie.play();
tint(255, 120);
}
void draw() {
image(movie, 0, 0);
}
Thank you for any help, and my apologies if this question seems naive or ignorant. I am constantly reading the documentation/watching Shiffman videos to try to get my head around this language.
One final remark. For this to work, the videos will have to be triggered with a high level of timing accuracy. This project is intended as a video to accompany music that has accurate timing down to the milliseconds. That’s easy with sound, but I’m inexperienced with video, and not sure if the time taken to load a video with mess up the timing.
My concern is that I might be using the wrong tool for the job. I far prefer Processing to MaxMSP or TouchDesigner, for many reasons, but a two big ones being that Processing is a coding environment and Open Source. However, perhaps those environments are better suited to this kind of video manipulation? I hope not.
Many thanks!