Using a tablet as an input device

edited February 2014 in Android Mode

Hi guys,

I was wondering if it is possible to use an Android device as an input device, but have the code running on a computer? I mean something like a second screen. So you can interact with the sketch through the tablet screen, but the math is done by the computer.

Does anyone have experience with this?

Thanks!

Tagged:

Answers

  • edited February 2014

    I don't know if there is anything better, but the thing that comes to my mind is OSC (Open Sound Control). You can send values, text, booleans, whatever you want (as long as it's not too big) over internet, in a command form with an argument. It is designed to be a replacement for MIDI, as MIDI is getting rather old and there are a lot of limitations.

    For example, you can use a tablet with some sliders, sending OSC commands to the computer. A command could be "Volume1" with the value of the slider, and the computer could interpret this as the volume of the first track of the music program you're running.

    Processing has an OSC library which is easy to use. You need to specify the IP address of the computer and a network port on the tablet, and the listening port on the computer (the same one as on the tablet). Then you can do something with the commands you're receiving.

    OSCP5: http://www.sojamo.de/libraries/oscp5/ http://opensoundcontrol.org/introduction-osc

    You can either try to write an OSC app for your tablet, or use an existing one. I don't have an Android tablet so can't comment which one is best.

  • Thanks for the tip! I guess then I could "synchronise" the app running on the tablet with the app running on the computer. I will give this a try. Eventually there would be a lot of computing (mostly video rendering, but the trick is that the tablet should show the rendered images as well). Therefore I'm afraid that if the same code runs on the tablet as well, it would suffer in terms of performance.

  • edited February 2014

    Hm, I don't think OSC is a good way to send images. I feared that might be what you wanted to do. There are probably ways to hack something together, but the result won't be optimal.

    What kind of application do you want to create?

    Edit: I don't think sending data to the computer and sending images back will be faster than calculating things on the tablet itself. You have to take into account that sending and receiving the data takes a lot of time as well. I don't have enough experience to confirm this, but I think you might get more lag this way than calculating on the tablet itself. It really depends on the application. Maybe you can do heavy calculations on the computer and just send the elementary data back (for instance, you could send the position of a large array of balls to the tablet which takes care of displaying, while the computer does all the heavy calculations involving interactions and such).

Sign In or Register to comment.