1 Fader, Multiple OSC Custom Addresses?

Discuss problems and solutions.
Post Reply
crob2017
Newbie
Posts:4
Joined:14 Sep 2014 07:46
1 Fader, Multiple OSC Custom Addresses?

Post by crob2017 » 17 Jul 2015 23:18

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.

ndivuyo
Regular
Posts:279
Joined:23 May 2014 00:24

Re: 1 Fader, Multiple OSC Custom Addresses?

Post by ndivuyo » 19 Jul 2015 17:31

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.

Traxus
Regular
Posts:216
Joined:30 Nov 2012 06:19
Location:Detroit
Contact:

Re: 1 Fader, Multiple OSC Custom Addresses?

Post by Traxus » 21 Jul 2015 18:56

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


Post Reply