Page 1 of 1

A couple of OSC ones :)...

Posted: Tue Jul 23, 2013 2:15 am
by freadZdead
Hi Claude,


Just minor questions...

one, I have adapted your TouchOSC layout for iPad and used in the last performance. together with a bit of tweaking by an interims program (OSCulator), I have a usable layout as seen below...

https://www.dropbox.com/s/mim3keuw79vbv ... onsole.jpg

the top row of red multifader are groups 1 to 10, the bottom rows of green multifaders are channel 1 to 20. through OSCulator, I have also a numeric feedback that writes the values underneath the multifaders, and in between, I have (hard coded into the TouchOSC layout) short names for the groups and channels, i.e. "HL" for house lights, "Plane" for the paper plane special, etc...

Here the question, would it be possible to send channel name strings alongside with all the other OSC Data periodically? I would be happy if it would simply be the channel and group names as they are, and could deal with the abrevation myself (i.e. make my own short names and have them written at the beginning of the names, i.e. channel 10 name: "Plane<Space><Space><Space>The Plane Special". TouchOSC conveniently crops/ignores characters if the field is not big enough to display them. Obviously, it would not need to be constantly broadcasted, maybe every second, or whenever other values change... That way, you could use the iPad remote like the better Audio Mixers (DiGiCo springs to mind, where over every fader a customisable LCD display shows the typed in channel name per show).

The other thing I found was that two controls via OSC did not seem to work:

/Keypad/G (for including Group references)

and

/Keypad/z (for putting selected items to 00 intensity)


Thanks for looking at this :).

Posted: Wed Jul 24, 2013 2:50 am
by admin
TouchOSC does this thing that requires that a trailing "z" be removed from an OSC address. Unfortunately, this interferes with /key.lxconsole/z as a shortcut for @00. But, you can use /key.lxconsole/x instead.

The latest build 3.1.9 adds support for including a group in a cue via OSC using /key.lxconsole/G.

Automatic labeling via OSC is an interesting idea. Whether it makes sense to try to make this work with TouchOSC is another. It is possible to change a label in a TouchOSC setup. But, you'd need some way of telling LXConsole which label to send the text to.

Posted: Wed Jul 24, 2013 7:15 pm
by admin
Today's build 3.1.9 (6624A) exposes some additional AppleScript functionality that would allow you to make a script to set the text of labels in TouchOSC based on information contained in LXConsole. Here is the text for two example scripts.

The first one will use the "what" field from subs 1 to 10 to set the labels for the ten sub-masters in the TouchOSC remote file included with LXConsole. It shows how to get the text of the what and then send it to TouchOSC.

The second script will ask for a channel number. It will then combine the group and use information for that channel and send it to an OSC address. This is pretty close to what was suggested in the post that started this thread. You can pretty easily modify this script an hard code the channels and addresses from your custom TouchOSC setup.

Code: Select all

&#40;*
	This script sends the what  field of subs 1 to 10 to
	
	the labels of the TouchOSC remote
*&#41;

tell application "LXConsole"
	
	tell the front document to getSub withNumber 1
	copy the result to the_sub
	
	if the_sub is not missing value then
		copy the what of the_sub to the_what
		tell the front document to sendOSC toAddress "/3/label1" string the_what
	end if
	
	tell the front document to getSub withNumber 2
	copy the result to the_sub
	
	if the_sub is not missing value then
		copy the what of the_sub to the_what
		tell the front document to sendOSC toAddress "/3/label3" string the_what
	end if
	
	tell the front document to getSub withNumber 3
	copy the result to the_sub
	
	if the_sub is not missing value then
		copy the what of the_sub to the_what
		tell the front document to sendOSC toAddress "/3/label4" string the_what
	end if
	
	tell the front document to getSub withNumber 4
	copy the result to the_sub
	
	if the_sub is not missing value then
		copy the what of the_sub to the_what
		tell the front document to sendOSC toAddress "/3/label5" string the_what
	end if
	
	tell the front document to getSub withNumber 5
	copy the result to the_sub
	
	if the_sub is not missing value then
		copy the what of the_sub to the_what
		tell the front document to sendOSC toAddress "/3/label6" string the_what
	end if
	
	tell the front document to getSub withNumber 6
	copy the result to the_sub
	
	if the_sub is not missing value then
		copy the what of the_sub to the_what
		tell the front document to sendOSC toAddress "/3/label7" string the_what
	end if
	
	tell the front document to getSub withNumber 7
	copy the result to the_sub
	
	if the_sub is not missing value then
		copy the what of the_sub to the_what
		tell the front document to sendOSC toAddress "/3/label8" string the_what
	end if
	
	tell the front document to getSub withNumber 8
	copy the result to the_sub
	
	if the_sub is not missing value then
		copy the what of the_sub to the_what
		tell the front document to sendOSC toAddress "/3/label9" string the_what
	end if
	
	tell the front document to getSub withNumber 9
	copy the result to the_sub
	
	if the_sub is not missing value then
		copy the what of the_sub to the_what
		tell the front document to sendOSC toAddress "/3/label10" string the_what
	end if
	
	tell the front document to getSub withNumber 10
	copy the result to the_sub
	
	if the_sub is not missing value then
		copy the what of the_sub to the_what
		tell the front document to sendOSC toAddress "/3/label11" string the_what
	end if
end tell

Code: Select all

&#40;*
	This script obtains the group and use labels for the desired channel
	
	Then, it sends them to an OSC address
*&#41;

display dialog "Enter channel&#58;" default answer "" buttons &#123;"Cancel", "OK"&#125; default button 2
set the target_channel to &#40;the text returned of the result&#41;

tell application "LXConsole"
	
	tell the front document to getChannelGroup ofChannel target_channel
	copy the result to channel_group
	tell the front document to getChannelUse ofChannel target_channel
	copy the result to channel_use
	
	copy channel_group & " " & channel_use to message
	
	display dialog "Send " & message & " to oscaddress&#58;" default answer "" buttons &#123;"Cancel", "OK"&#125; default button 2
	set the address to &#40;the text returned of the result&#41;
	
	tell the front document to sendOSC toAddress address string message
	
end tell
NOTE: AppleScript scripting definition are cached. If you have prior versions of LXConsole installed, the new AppleScript may not work unless you open the correct version of LXConsole prior to attempting to run the script. If the AppleScript scripting definition is already cached, you may need to restart the computer to get these new scripts to work or to save compiled scripts using the new commands.