Page 1 of 1

1 Fader, Multiple OSC Custom Addresses?

Posted: 17 Jul 2015 23:18
by crob2017
Hi Liine Forums!

I'm curious and pretty unsure of how to move forward with this, but if it's possible that'd be great. In Resolume Arena, I'd like to be able to use a single fader to step through the individual layer focuses - if the fader's all the way at the left, it's sending the message "/layer1/select," and when the fader's all the way to the right, it's sending "/layer 9/select" and it sweeps through layers 1-9 in between. I have a feeling this has to do with the oscout command but I'm still pretty confused by that. Any guidance would be appreciated :)

Cheers.

Re: 1 Fader, Multiple OSC Custom Addresses?

Posted: 19 Jul 2015 17:31
by ndivuyo
Hmmmmm you may be able to do it with a custom expression too, as an array (that would be nice). But if you need all these different addresses, then oscout() be the answer

the osc out arguments: oscout(target,address,args[[]), so yea, you will make some condition to dynamically change the address of the command based on the fader's range. Execute the script "on expression x" of the fader.
you can even make the fader gridded depending on the values you send....

I can make you an example, but need some details..... What value does it send to the "/layer#/select" addresses as you sweep through them? A "0", or a "1", or "0" when going left "1" when goin right? or does it go through a float 0-1 in 9 small ranges on the fader? I don't know, I don't use resolume haha.

Re: 1 Fader, Multiple OSC Custom Addresses?

Posted: 21 Jul 2015 18:56
by Traxus
going to need a custom script

ive never written anything to output osc before so you will need to look up that syntax but...

For the fader, on expression x

Code: Select all

//-----fader value (x) is 0 to 1, we need to divide this into 9 slots
//-----1/9 = 0.1111111 repeating
//-----lets keep it to 4 decimals, less stressful on system

var s = 0.1111;

if (x <= s ) {
    //-----select slot 1
} else if (x > s && x <= (s*2)) {
    //-----select slot 2
} else if (x > (s*2) && x <= (s*3)) {
    //-----select slot 3
} else if (x > (s*3) && x <= (s*4)) {
    //-----select slot 4
} else if (x > (s*4) && x <= (s*5)) {
    //-----select slot 5
} else if (x > (s*5) && x <= (s*6)) {
    //-----select slot 6
} else if (x > (s*6) && x <= (s*7)) {
    //-----select slot 9
} else if (x > (s*7) && x <= (s*8)) {
    //-----select slot 8
} else if (x > (s*8) && x <= 1) {
    //-----select slot 9
    //-----notice we compare whether x equals 1, since 9 * 0.1111 leaves opportunity to miss a tiny fraction of the fader.
}


Or if you want to get iterative

Code: Select all


//-----fader value (x) is 0 to 1, we need to divide this into 9 slots
//-----1/9 = 0.1111111 repeating
//-----lets keep it to 4 decimals, less stressful on system

var s = 0.1111;
var t = 1 + floor(x/s);

//-----t is the integer step value of your slot