I am trying to figure out a way to use Resolume as a random video player for an installation.
I have got a one button controller that when pressed I want to jump to a random clip on one layer, play it and then for the clip to stop. And when the button is pressed again, to go and do it to another clip etc etc
Software developer, Sound Engineer,
Control Your show with ”Enter” - multiple Resolume servers at once - SMPTE/MTC column launch
try for free: http://programs.palffyzoltan.hu
What I have is an old games console button its hacked to give a mouse click.
I used to use it with a keystroke generator app working in Flash, It is just the random part of the process I can get my head around, is randomly jumping to a different clip with the press of a same button possible in Arena?
a simple http://processing.org sketch could send a /layer1/clipN/connect int 1 on mouseClick event, N being a random number you generate at the time of the mouse click.
or if you can place your mouse pointer at a short clip with autoPilot set to Random as described in this thread: viewtopic.php?f=12&t=14303 you can do it in resolume.
Software developer, Sound Engineer,
Control Your show with ”Enter” - multiple Resolume servers at once - SMPTE/MTC column launch
try for free: http://programs.palffyzoltan.hu
I am trying with my amateurish coding skills, not sure about the N part to make the layer number increment/random.. can you help?
import oscP5.*;
import netP5.*;
OscP5 oscP5;
NetAddress myRemoteLocation;
void setup() {
size(400,400);
// start oscP5, telling it to listen for incoming messages at port 5001 */
oscP5 = new OscP5(this, 9001);
// set the remote location to be the localhost on port 5001
myRemoteLocation = new NetAddress("127.0.0.1",7001);
}
void draw()
{
}
void mousePressed() {
// create an osc message
OscMessage myMessage = new OscMessage("/layer1/clipN/connect int 1");
//myMessage.add(123); // add an int to the osc message
// myMessage.add(12.34); // add a float to the osc message
// myMessage.add("1"); // add a string to the osc message
// send the message
oscP5.send(myMessage, myRemoteLocation);
}
void oscEvent(OscMessage theOscMessage)
{
// get the first value as an integer
int firstValue = theOscMessage.get(0).intValue();
// print out the message
print("OSC Message Recieved: ");
print(theOscMessage.addrPattern() + " ");
println(firstValue);
}
This is what I have been doing:
1. Add a layer router with duration of 0 or something small
2. Assign Midi mapping to it
3. Set its auto pilot to play random clip
When triggered it now triggers a random clip in the same layer.
if you don't need feedback from resolume then you can empty the oscEvent function.
In this state it will throw a very high number of exceptions for string an float values making your sketch crash, as most of the data coming from resolume is floats.
void mousePressed() {
//generate random column/clip number
int minColumnNumber=1 ; // the fist clip in a layer;
int maxColumnNumber=20+1; //the last column where you clips are + 1
int randomClip = int(random(minColumnNumber, maxColumnNumber));
//you can do the same for the layers if you want.
int minLayerNumber=1 ; // the fist layer;
int maxLayerNumber=3+1; //the last layer + 1
int randomLayer = int(random(minColumnNumber, maxColumnNumber));
// create an osc message
OscMessage myMessage = new OscMessage("/layer"+randomLayer+"/clip"+randomClip+"/connect");
myMessage.add(1); // add an int to the osc message
// send the message
oscP5.send(myMessage, myRemoteLocation);
}
Software developer, Sound Engineer,
Control Your show with ”Enter” - multiple Resolume servers at once - SMPTE/MTC column launch
try for free: http://programs.palffyzoltan.hu
Thanks, removing the feedback makes a lot of sense. I will work it out and see what I can make happen in processing. & thanks to t13swift too, that layer router option is a great workaround.