Sign in to follow this  
Followers 0
Jfish

Use your iTouch/iPhone with AutoIt via OSC

6 posts in this topic

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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
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


Active: IRC UDF, WindowEx UDF
Discontinued: GithubBubbleSort UDF

Share this post


Link to post
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
Sign in to follow this  
Followers 0