Odd OSC and Applescript issue

LXConsole support and feedback
Post Reply
nizer
Posts: 157
Joined: Sun Jan 23, 2011 1:27 pm
Location: Virginia
Contact:

Odd OSC and Applescript issue

Post by nizer »

Try to have LXConsole go to the next dimmer when in dimmer mode (m1) via QLab 4

I can turn on the mode with:

Code: Select all

tell application "LXConsole"
	setMode the front document to "live"
	set startdimmertest to "dimmer:1af"
	set dimmernumber to 1
	tell the front document to doCommand string startdimmertest
	say "Starting Dimmer Setup"
	say "dimmer" & dimmernumber
end tell
I can get channel 1 set to 88 via OSC like this.

Code: Select all

/cmd.lxconsole/1@88
However, I used to be able to move onto the next dimmer with the "u" key in the command line via this Applescript:

Code: Select all

tell application "LXConsole"
	activate
	setMode the front document to "live"
	set nextdimmer to "u"
	tell the front document to doCommand string nextdimmer
	tell application "System Events" to keystroke "u"
end tell
Also this should work but doesn't
OSC message

Code: Select all

/key.lxconsole/u
From my iPad if I send the OSC message

Code: Select all

/key.lxconsole/u
it works.

Not sure what has changed or what I am missing. Thanks for any guidance.
Mark Nizer
mark@nizer.com
admin
Site Admin
Posts: 1643
Joined: Mon Nov 05, 2007 1:26 am
Contact:

Post by admin »

Have you changed the preferences for the command line?

Check the preferences tab to see what you have set for up and down commands. There should be two alternatives for each. The first key should be "u" and "d" respectively. Do these keys work at the computer? Is it only the AppleScript that is a problem?
nizer
Posts: 157
Joined: Sun Jan 23, 2011 1:27 pm
Location: Virginia
Contact:

OSC applescript oddness

Post by nizer »

So I check the preferences and they are set to defaults. Oddly there are 2 keys for "u" one is "unmark" and one is for "up".

So I messed around some more. If I route the OSC from QLab to Osculator port 8889 then have Osculator forward to LXConsole port 8888 it works.

/key.lxconsole/u or /key.lxconsole/+

If I go direct to LXConsole port 8888 from QLab it fails. But I send OSC to change levels of channel 1 to 75% that works.

Also all applescript for u or + also don't work, even directly from ScriptEditor.

SO ODD!!!!!
Mark Nizer
mark@nizer.com
admin
Site Admin
Posts: 1643
Joined: Mon Nov 05, 2007 1:26 am
Contact:

Post by admin »

It may have to do with the fact that the key "u" is contextual. It can be applied as unmark or up. Try the more specific "@++"

Code: Select all

tell application "LXConsole"
	activate
	setMode the front document to "live"
	set nextdimmer to "@++"
	tell the front document to doCommand string nextdimmer
end tell
works for me.
admin
Site Admin
Posts: 1643
Joined: Mon Nov 05, 2007 1:26 am
Contact:

Post by admin »

I would note that using @++ and @-- to move through the dimmers works when used in sequence. Start with a dimmer. Go through the dimmers sequentially. Don't go off and do anything else with the command line in the middle of the dimmer check.
nizer
Posts: 157
Joined: Sun Jan 23, 2011 1:27 pm
Location: Virginia
Contact:

OSC and script issues

Post by nizer »

I will try that in a few minutes. Does OSC work for you from Q lab for sending those commands? It is so strange that it works for Channel levels but not for changing the dimmer.
Mark Nizer
mark@nizer.com
nizer
Posts: 157
Joined: Sun Jan 23, 2011 1:27 pm
Location: Virginia
Contact:

Works

Post by nizer »

per usual your genius comes thru. Applescript works now. Still have no clue why OSC is broken. I will roll back to QLab 3 and see if I can get it to work.

THANK YOU!!!!
Mark Nizer
mark@nizer.com
nizer
Posts: 157
Joined: Sun Jan 23, 2011 1:27 pm
Location: Virginia
Contact:

OSC update QLab 4

Post by nizer »

So this works via QLab 4 OSC

/cmd.lxconsole/@++

but this doesn't

/cmd.lxconsole/u

/cmd.lxconsole/+

All is well.

Thank you again.
Mark Nizer
mark@nizer.com
admin
Site Admin
Posts: 1643
Joined: Mon Nov 05, 2007 1:26 am
Contact:

Post by admin »

For OSC from QLab, you would use

Code: Select all

/key.lxconsole/u 1
or

Code: Select all

/key.lxconsole/= 1
This depends on the command line preferences... Note that the second example uses "=" not "+" because its the same key (without having to use [shift]).

The 1 is an argument for the message. LXConsole requires that messages with the address pattern /key.lxconsole/ have a non-zero argument. The reason for this is that it allows these messages to be used with push buttons where the message is sent with a 1 on press and a zero on release.
nizer
Posts: 157
Joined: Sun Jan 23, 2011 1:27 pm
Location: Virginia
Contact:

OSC Issue

Post by nizer »

Of corse!!! That all makes sense now. Lemur uses the O and 1 as a button input variable.

Thanks for following up.

I will sleep much better knowing the world works in predictable ways.

;-)

My setup is working so nice. I am very happy with it. So many tools and options to crank out the tech.
Mark Nizer
mark@nizer.com
Post Reply