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
Do you think theres a way??
Random clip player
Re: Random clip player
what kind of controller, midi?I have got a one button controller
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
Control Your show with ”Enter” - multiple Resolume servers at once - SMPTE/MTC column launch
try for free: http://programs.palffyzoltan.hu
-
- Posts: 70
- Joined: Fri Apr 30, 2010 23:34
Re: Random clip player
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?
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?
Re: Random clip player
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.
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
Control Your show with ”Enter” - multiple Resolume servers at once - SMPTE/MTC column launch
try for free: http://programs.palffyzoltan.hu
-
- Posts: 70
- Joined: Fri Apr 30, 2010 23:34
Re: Random clip player
Thanks, Processing looks the way to go.
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);
}
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);
}
-
- Posts: 156
- Joined: Thu Mar 26, 2015 14:00
Re: Random clip player
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.
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.
Re: Random clip player
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.
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.
Code: Select all
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
Control Your show with ”Enter” - multiple Resolume servers at once - SMPTE/MTC column launch
try for free: http://programs.palffyzoltan.hu
-
- Posts: 70
- Joined: Fri Apr 30, 2010 23:34
Re: Random clip player
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.