Jump to content

Use your iTouch/iPhone with AutoIt via OSC


Jfish
 Share

Recommended Posts

All:

Warning: you will need to invest $4.99 on iTunes to try this if you are interested. I am not associated in any way with the application - I just think it is cool.

I recently got an iTouch (the non-phone version of the iPhone) and I came across an application called touchOSC (http://hexler.net/software/touchosc) that allows you to design your own controls in windows (with an albeit functional but buggy UI) and synch them to the device (you download this directly from their website). The controls are very cool looking, see the website for some examples. All the controls communicate over a wi-fi network using a standard called Open Sound Control (http://opensoundcontrol.org/). These controls all send float values between 0 and 1. The controls are mainly used in MIDI sound applications. If you go to you youtube you can see examples (http://www.youtube.com/results?search_query=touchOSC&search_type=&aq=f). You can also use the UI to send signals to electronic devices (http://www.sparkfun.com/commerce/tutorial_info.php?tutorials_id=152).

This example code is a UDP listener for the iTouch application that will display the names of the controls and the values on the edit screen. Once you capture this information you can create an AutoIt remote control for just about anything: launch applications, turn volume up and down on your computer (I did this), make an iTouch mouse (I did this too). There are many possibilities. Let me know if you try it.

Enjoy.

-JFish

INSTRUCTIONS:

1. Open touchOSC on your iPhone or iTouch. Go to the network settings. Type in the network address of your host computer (running this AutoIt app). Outgoing port should be set to 8000. Incoming port should be sent to 9000.

2. Start the attached AutoIt code.

3. Go to any layout in touchOSC (i.e. the controls) either the ones that came with the device or a layout you made with the editor.

4. Play around with the controls and see the results on the screen.

UDPServer2_w_GUI_Final_withXY.au3

Build your own poker game with AutoIt: pokerlogic.au3 | Learn To Program Using FREE Tools with AutoIt

Link to comment
Share on other sites

Thank you DJKMan. I have not looked into the MIDI controller. But I can offer a general example using the mouse. I modified the same code to move the mouse with an X/Y control (and I added two buttons Left and Right to my layout as well). I have attached the code. It is kind of fun to remote control your mouse. However, I will warn you that because it is UDP there will be heavy latency. That said, if you switch to TCP it should be much faster.

The basic premise of the example can be used for anything. Capture the name of the control and the value and map then to whatever process you want.

UDPServer2_w_GUI_Final_withXY_mouseMove.au3

Build your own poker game with AutoIt: pokerlogic.au3 | Learn To Program Using FREE Tools with AutoIt

Link to comment
Share on other sites

Thank you DJKMan. I have not looked into the MIDI controller. But I can offer a general example using the mouse. I modified the same code to move the mouse with an X/Y control (and I added two buttons Left and Right to my layout as well). I have attached the code. It is kind of fun to remote control your mouse. However, I will warn you that because it is UDP there will be heavy latency. That said, if you switch to TCP it should be much faster.

The basic premise of the example can be used for anything. Capture the name of the control and the value and map then to whatever process you want.

One more thing ... if you are interested in MIDI you may want to look at using touchOSC with PureData (http://puredata.info/). "Pd (aka Pure Data) is a real-time graphical programming environment for audio, video, and graphical processing). I used the Pd tool to see how the touchOSC messages came through and then wrote the sample program for AutoIt. Good luck.

Build your own poker game with AutoIt: pokerlogic.au3 | Learn To Program Using FREE Tools with AutoIt

Link to comment
Share on other sites

  • 2 years later...

This is very cool, thank you for this :oops:. I was just about to trash my old iPod Touch (headphone jack is busted among other things), until I found this. One quick question. Have you been able to successfully send data to TouchOSC? Would it just be a matter of reversing the steps you took to decode the data and sending it through UDP to the iPod/iPhone?

Link to comment
Share on other sites

IhanPrime, please don't go nerco-ing old topics. Anyway, I'm currently developing a program in autoit that will do basically the same thing. With ANY device that can do IM, email, or text.

My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.

My Projects

WhyNotWin11
Cisco FinesseGithubIRC UDFWindowEx UDF

 

Link to comment
Share on other sites

  • 12 years later...

Sorry to undig this old thread,

But recently I've been using TouchOSC with MIDI Mixer to control application volumes on a Tablet, I've managed even to send key strokes over TouchOSC ( with a custom Layout ).

But my wall has been sending back to TouchOSC information. The thing is: I can receive messages from TouchOSC on AutoIT server, but I can't send "status/message" back to TouchOSC, that I think is capable of receive.

 

Does anyone have a sample code to send OSC message to "client"/ IP:port ?  the script provided works well receiving OSC Messages, but can Send any messages ? I have digged some scripts and OSC documentation... but no luck.

Its rather interesting the use of this simple protocol for basic stuff

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...