Page 1 of 2
OSC and command line
Posted: Mon Oct 22, 2012 9:36 pm
by pagaille
Hi,
First of all, let me THANKS Claude for this incredible piece of software. I can't believe my eyes : I tried nearly all the mac-based soft consoles existing and this one puts together :
- ease of use, user friendly
- OS/X native
- open to the external world using well known protocols/channels but also more weird ones (like applescript)
- well documented
- ........
- and best of all : free ! I wish I could make a donation !
Now here's my first question : as soon as i started with lxconsole, I immediately decided it would be really useful to hook it to a wireless touchscreen interface. In my case, the iPad.
I rapidly understood how to send and link OSC events & strings to actions in lxconsole. But I didn't found a way to send command line strings in order to mimic the virtual keyboard like the one presented when enabling the web network sharing.
One would probably think : use the web interface ! True, but using it on the iPad is almost impossible : the iPad detects fast typing as "double click" and reacts as it should : zooming.
Could someone tell me if it is possible and if yes, how ?
Thanks
Matthieu
Posted: Tue Oct 23, 2012 10:56 pm
by pagaille
Reply to self, at least partly :
2.4.4 (5610) (...) Adds remote osc commands using the address format "/cmd.lxconsole/commandline". This allows incoming OSC to specify the commandline rather than needing to setup an action in LXConsole. An example of using a control with a value of 0-1 to set the level of channel 10 would use the OSC address "/cmd.lxconsole/10@%p".
But this doesn't solve my "problem" : It seems impossible to send keystrokes for the command line through OSC ?
Posted: Wed Oct 24, 2012 1:49 am
by admin
The way OSC currently works is that a message can be mapped to an action in the OSC tab of the setup window.
Or, the OSC message can contain the complete command string.
There's not currently a provision for using OSC to build up a command line bit by bit.
Posted: Thu Nov 01, 2012 1:04 pm
by admin
The latest build of LXConsole (5731) adds an additional way of addressing OSC messages.
As before, OSC messages can be mapped to actions in the setup window, similar to MIDI. OSC messages can also be addressed to /cmd.lxconsole/ followed by a command string. This does not require setup and when received the command string is entered on the command line.
The new address form is /key.lxconsole/ followed by a single character or "enter" or "clear". When received, the character is added to the command line. The words "enter" and "clear" are fully spelled out because of the need to represent the enter and esc keys.
Here's an example: "/cmd.lxconsole/1@50" is a message that will set channel 1 to 50%. To do the same thing with the new method requires 4 messages, "/key.lxconsole/1", "/key.lxconsole/@", "/key.lxconsole/5", and "/key.lxconsole/0"
You can find a TouchOSC example of a remote keyboard for LXConsole at:
lx.claudeheintzdesign.com/LXConsoleRemote.touchosc.zip
Posted: Sat Nov 03, 2012 11:57 pm
by Johan Söderberg
Thanks Again and again and again...
The layout at
lx.claudeheintzdesign.com/LXConsoleRemote.touchosc.zip
looks great!
I,ve downloaded:
The latest build of LXConsole (5731)
And I get LXConsole to properly detect the commandlines but theres no action...
What should I write in the column "Action command" for a button like - "/key.lxconsole/9"
Iv tried writing nothing at all , writing the full name again "/key.lxconsole/9"
and Ive written only "9" .
From that Ive learned some about what doesn't work. But I still wonder what might do
Also I got a bit confused with the versions out there.
In my folder called LXseries Pro I have a version of LXConsole called: Version 2.5.07 (5701)
I also have a folder called LXseries where I keep the latest build for testing and that version is called: Version 2.4.10 (5731)
Which is the newest?
Posted: Sun Nov 04, 2012 3:02 am
by admin
OSC messages starting with /key.lxconsole/ and /cmd.lxconsole/ will never be able to be mapped to actions in the setup window. That is because they do specific things to the command line without mapping.
The /key.lxconsole/ form causes a key press to be added to the current command line. /key.lxconsole/9 for instance has the same effect as typing 9 into the command line. This is added to the command line and the command is only executed if it reaches its natural conclusion or if an enter is sent or pressed. (To send an enter with OSC use /key.lxconsole/enter) This form expects only a single character to follow the second slash with the exception of "enter" and "clear".
The /cmd.lxconsole/ form should be followed by a completely formed command. This command is executed as soon as it is received--just as if it had been typed into the command line and enter had been pressed.
The actual latest build of LXConsole is now 5801. This is an update because /key.lxconsole/ messages were not honoring the MIDI/OSC command line actions always use live mode preference.
The 2.4.n and 2.5.n version numbers are almost identical. The difference is that 2.4.n versions are built on Snow Leopard and the previous version of Xcode. 2.5.n versions are built on the latest Xcode and are code signed for Mountain Lion. The functions of the versions are essentially identical except that with the 2.4.n version on Mountain Lion, you may need to disable GateKeeper to run it because it is not signed. And, the 2.5.n version will only work on 64bit Intel systems while there is a 2.4.n version that will still run on PPC with OSX 10.5.
The build numbers are in sync between 2.4.n and 2.5.n versions. So, 2.4.10 (5731) is actually newer than 2.5.07 (5701) because the build number 5731 is higher than 5701. 2.5.07 (5701) will not respond to /key.lxconsole/ messages because that was not added until 5731.
Posted: Tue Nov 06, 2012 11:32 am
by AlrIk
The layout at
lx.claudeheintzdesign.com/LXConsoleRemote.touchosc.zip
looks great!
A new remote, nice! I work only with touch OSC with Qlab, Live Ableton and Lx console, and it works perfectly. Thanks for the update, OSC controle is very efficient!
See you
Hmm...
Posted: Tue Nov 06, 2012 11:15 pm
by Johan Söderberg
OSC messages starting with /key.lxconsole/ and /cmd.lxconsole/ will never be able to be mapped to actions in the setup window. That is because they do specific things to the command line without mapping.
Then I wonder why nothing happens in the command line and LXConsole doesn't change to livemode even though i´ve chosen that option.
But I can see in the setup that LXConsole detects the messages properly.
They just dont lead to anything.
Posted: Wed Nov 07, 2012 7:44 am
by AlrIk
hi Johan,
Download the lastest version, the beta one (2.5.09(5801)), and it works. I tried 3 versions before find this.
Posted: Wed Nov 07, 2012 8:36 am
by Johan Söderberg
Yes! this Version: 2.5.09 (5801) works!
So now its here at last. The day when I can throw away all my old midilayouts and start redesigning all over again. Guess thats a good thing.
Posted: Thu Nov 08, 2012 1:09 am
by admin
I'm glad this works for you. I know the version numbers may be a bit confusing. If it were not for keeping support for old PPC machines running Leopard there would only be one version and it would be a lot easier. But Apple is always driving hardware and software upgrades by not allowing compiling for older OS versions on newer systems. So, it is complicated to keep everything straight and up to date. The Mountain Lion versions of all LXSeries software are no longer considered "beta" and should now be viewed as the primary version. If things are not kept up, it will be with the older OS version which will eventually be discontinued. For a while until that happens, LXSeries software will have two sets of version numbers, one for the legacy version and one for the latest OS.
Posted: Thu Feb 14, 2013 3:54 pm
by AlrIk
Hi Claude,
I try to make connection between Max MSP and Lx console unsing OSC protocol. I download the latest version of LX(Version 2.5.17 (6110)), and i have some probleme to make it works. When i'm using the lxconsolremote you made in touch OSC, I can detect the OSC message in the detect line in the setup window, but nothing happen. I remember i used it in an previous version and it works well. Is that version ok to do that? Do i need the old one? How can i download it?
Thanks
Posted: Thu Feb 14, 2013 5:17 pm
by AlrIk
I try to make connection between Max/MSP to osculator, and Lxconsolremote to osculator, and it works perfectly, and i try to make the same with Lxconsole, nothing happen. With Max, i try with messages as "/GO"," /7@0.5", "/key.lxconsole/...", but no reaction from Lx main window neither the dectec line in the setup window. And i try to use the remote, and this time lx is very capricious, i can see in the dectect line each OSC message, but no reaction from the main windows, except sometime.
Do you know this problem? Do you have it? Is something wrong in my configuration?
Posted: Thu Feb 14, 2013 5:53 pm
by admin
The most likely problem is in the connection settings and the network port being used. TouchOSC and LXBeams use Bonjour to find and connect to LXConsole. I don't know how the connection is established with Max/MSP. If the OSC messages do not show up in the setup window, then there is no network connection to LXConsole.
You may need to go into LXConsole's preferences and specify which network connection to use for OSC. This would be especially true if you have both an ethernet connection and a wireless connection open on the Mac. Also, you need to be sure the port numbers match. This is handled by Bonjour when you connect with either LXBeams or Touch OSC. But if, for example, the LX_OSC connection does not show up in TouchOSC's "Found Hosts", then you may still need to set the proper IP address for the OSC connection in LXConsole's preferences.
With TouchOSC I have noticed a problem establishing a connection on a computer to computer network since iOS 6 was released. I almost always takes me several trips to the setup, tap the OSC connection, look and see the LX_OSC connection, tap that, tap TouchOSC to return to connections, tap Done and test to see if the connection is established. This may take a couple of tries through the sequence. Once a connection is established, it remains unless the phone goes to sleep (Stay Connected is on in the options). This appears to something to do with TouchOSC or iOS 6 or both. A connection between LXBeams running on a laptop works right away. This might explain the "capricious" connection between TouchOSC and LXConsole. The thing is that the "Found Hosts" always shows the LX_OSC connection right away, it is just that TouchOSC does not seem to be actually sending messages until you've done the setup thing a couple of times.
Posted: Fri Feb 15, 2013 12:29 am
by admin
There are a couple of other things to note when using LXConsole over a wireless connection. It is possible that a wireless network has a firewall that blocks the ports/protocol used by OSC. To fix that, you'd need to ask the network administrator nicely to open UDP on port 8000 (or whatever port you want to use for OSC).
Of course, you need to set the Mac running LXConsole's firewall to allow network connections to LXConsole as well.
You can use "Create Network" to setup a connection using the Mac's AirPort. Under iOS 6, I have had trouble when the password protection for this network was enabled. I don't know if this is fixed in 6.1 or not. Also, each time you start the Mac and create a network, it defaults to assigning an IP address. This address then needs to be matched in LXConsole's preferences in the OSC tab in order for the connection to work. LXConsole remembers this address. But that does no good if it is assigned every time the network is created. So, I discovered that using the Network Preferences, I could assign a static IP address to the connection. This static address remains the same every time you restart the computer and re-create the network.
I've used this now almost daily with TouchOSC on my iPhone. Other than the process to get TouchOSC to connect described in the last post, it works every time. (Create the network before launching LXConsole -OR- turn OSC off and back on after the network has been created)
By the way, LXBeams running on my iPad connects instantly with LXConsole using Bonjour. So, I'm convinced that the connection difficulty with TouchOSC is probably in TouchOSC.