Page 1 of 2

how to select a layer with OSC?

Posted: Wed Mar 10, 2010 1:55 am
by retake7
Hello, so I know know how to link Max and Modul8 using OSC. It's very cool!
Now I have a problem to choose a layer using this :
md8key/ctrl_layerStack_focusPosition/10 $1
i don't understand, it's not working at all!!
Anyone knows this problem?

When I press the layer2 the send message is :
SEND ['/md8key/ctrl_layerStack_focusPosition/10', ',i', 2]
SEND ['/md8key/ctrl_layerStack_focusPosition/-1', ',i', 2]

thanx

Posted: Wed Mar 10, 2010 11:43 am
by sigmasix
I use touchOSC to send messages to Modul8, if I receive this message

RECEIVE : ['/md8key/ctrl_layer_stackPosition/2', ',f', 1.0]

notice, the keyword is: ctrl_layer_stackPosition

it selects the second layer.

the value next to the keyword is the layer where you want to apply the keyword value. it goea from 1 to 10 for each layers, 0 means the selected one and -1 means all the layer. In your case, you can only use numbers from 1 to 10 as you cannot select more than 1 layer and selecting the selectd layer is a non sense ;)

try

Posted: Thu Mar 11, 2010 12:10 am
by retake7
Thanx i ll try tomorow!

still a problem

Posted: Fri Mar 12, 2010 5:17 pm
by retake7
hi, so I still have the same problem because in max my osc message is :
/md8key/ctrl_layer_stackPosition/ $1
I send through max a 1 or a two and the message is still :
RECEIVE : [['/md8key/ctrl_layer_stackPosition/', ',i', 1]]

so I don't see why i don't have an f' instead i have a i'?

and when you go to modul8 and you press the layer 2 for instance it send in the script output :
SEND ['/md8key/ctrl_layerStack_focusPosition/10', ',i', 2]
SEND ['/md8key/ctrl_layerStack_focusPosition/-1', ',i', 2]

please help me
thanx a lot

Posted: Fri Mar 12, 2010 5:31 pm
by sigmasix
the f or i doesn't matter, the value does not matter either. but you miss one value after the last / of the message, a value from 1 to 10 representing layer from 1 to 10… I don't know how you can change that in maxmsp… can't you change the field where you write the keyword and add this /1 at the end?

change

Posted: Fri Mar 12, 2010 5:34 pm
by retake7
I can change anything in max
but what is the message that you are sending from oscTouch???
this could be easier...

why?

Posted: Fri Mar 12, 2010 6:29 pm
by retake7
If i put this :
/md8key/ctrl_layer_stackPosition/1

doesn't work either

or this

/md8key/ctrl_layer_stackPosition/1 $1

either......
I don't understand!

Posted: Wed Mar 17, 2010 4:23 pm
by sigmasix
Can you tell me what version of modul8 you are using?
Does everything work as expected with the other keywords?

Can you give me an extract of the output log with some working messages and some of the not working ones.

working/not working

Posted: Thu Mar 18, 2010 12:48 am
by retake7
Hello thanx for the reply

So I have modul8 2.6

for the other command as /md8key/ctrl_layer_alpha/1 $1
it works

the log is :
RECEIVE : [['/md8key/ctrl_layer_alpha/1', ',f', 0.32727271318435669]]
SEND ['/md8key/ctrl_layer_alpha/1', ',f', 0.32727271318435669]
SEND ['/md8key/ctrl_layer_alpha/-1', ',fiffffffff', 0.15454545617103577, 1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
SEND ['/md8key/ctrl_layer_alpha/0', ',f', 0.32727271318435669]




for /md8key/ctrl_layer_movie_speedFactor/2 $1
it works

the log is :
RECEIVE : [['/md8key/ctrl_layer_movie_speedFactor/2', ',f', 0.14140908420085907]]
SEND ['/md8key/ctrl_layer_movie_speedFactor/2', ',f', 0.14140908420085907]
SEND ['/md8key/ctrl_layer_movie_speedFactor/-1', ',ffffffffff', 0.25, 0.039409089833498001, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]


for /md8key/ctrl_layer_movie_shuttle1/0 $1
it works

the log is :
RECEIVE : [['/md8key/ctrl_layer_movie_shuttle1/0', ',f', 0.55454546213150024]]
SEND ['/md8key/ctrl_layer_movie_shuttle1/1', ',f', 0.55454546213150024]
SEND ['/md8key/ctrl_layer_movie_shuttle1/-1', ',ffffffffff', 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
SEND ['/md8key/ctrl_layer_movie_shuttle1/0', ',f', 0.55454546213150024]



for /md8key/ctrl_layer_stackPosition/10 $1
It doesn't work

the log is :
RECEIVE : [['/md8key/ctrl_layer_stackPosition/10', ',i', 2]]



only one line compare to the others?????
I don't understand

please help me!!

PS : I have a serial for one Modul8, is it possible to make it work on two machines??

Posted: Thu Mar 18, 2010 11:41 am
by sigmasix
OOOOKAY… I figured out what was going on… I WAS COMPLETELY WRONG hum hum

So… first mistake, I told you the wrong keyword, you were right at the beginning…

keyword is:

ctrl_layerStack_focusPosition

Second mistake, the layerPosition value is not used to choose what layer to select, this layerPosition can be anything but we will use 0 so it doesn't mess anything.

so your keyword should look like: '/md8key/ctrl_layerStack_focusPosition/0'

So in the end, if modul8 receive this:

RECEIVE : ['/md8key/ctrl_layerStack_focusPosition/0', ',f', 2.0]

it should select layer 2, and

RECEIVE : ['/md8key/ctrl_layerStack_focusPosition/0', ',f', 6.0]

it should select the first layer of group B

Try to deactivate the feedback sender to avoid the SEND stuff if you don't need it.



To answer your PS question, one standard licence of modul8 can be installed on 2 computers. Be careful to deauthorize a computer you won't use anymore or you send for reparation so you don't have one licence stuck on our database.

Thanx a lot it works

Posted: Sat Mar 20, 2010 7:17 pm
by retake7
So yes it works in max with this message :
/md8key/ctrl_layerStack_focusPosition/0 $1

so we did it

thanx again

PS : I tried to put my serial in another machine and offline or online it doesnt't work!!!
online tehe server is unable to reach
offline my serial is wrong
i need to put modul! on 2 new machines and nothing works!!!

Posted: Sun Mar 21, 2010 12:39 am
by sigmasix
please do not post your serial number anywhere… this is secure data…

send an email to the support and we'll figure it out… this kind of problems doesn't need to be public

Posted: Mon Apr 12, 2010 12:55 am
by influx
Hi, not to derail this thread, buti'm trying to accomplish this same thing with TouchOSC and Modul8. I've programmed my layout in TouchOSC to control the layer alpha, using:

Code: Select all

/md8key/ctrl_layer_alpha/1

for layer one, and changed the "1" with 2, 3, 4 etc. for the other layers.

That works properly. However, I would like to be able to select a layer within TouchOSC and am not able to get it to work. I've tried:

Code: Select all

/md8key/ctrl_layerStack_focusPosition/1

which works for layer 1, but when I change the "1" to 2, 3, etc. for the other layers it will still select the first layer.

Any ideas?

Posted: Mon Apr 12, 2010 9:24 am
by sigmasix
the /1 or /2 value is here to define on wich layer to apply the keyword AND its value. For master keywords, this value is useless. We usually use 0 but you can write anything you want.

The keyword ctrl_layerStack_focusPosition is a master keyword. So this layer ID is not used. Modul8 gets the value given with the keyword to select a layer. In the case of touchOSC it is kind of problematic as a button sends value 1.0 when pressed and 0.0 when released… and you cannot change that… We've sent an email to the developer to ask him to give the option of what value a controls sends, as in the module editor within modul8, but didn't get any feedback (yet)…

One option would be to hack the OSC module and intercept this particular message, but we don't want to do it as not everybody is using only touchOSC to control modul8 with OSC…

Sorry for that. Maybe in some spare time I can try to make a custom module for touchOSC, but this is not my priority and touchOSC is not working anymore on my ipod touch… (anybody else? ;) )

Posted: Mon Apr 12, 2010 1:36 pm
by influx
Thanks for the quick update sigma6. I'll stay tuned on this issue.