TouchOSC XY Object patch

Stephen Good's icon

TouchOSC XY Object Patch.maxpat
Max Patch

Created a patch to unpack and then repack the dual data stream from the XY Object in touch OSC. Hopefully this will be useful.

acmusic's icon

Thanks!

It's reading the values fine except for the Y axis isn't tracking the full range, it is only kicking in at the top part and not sending the signal of the bottom half. Any reason why this is happening?

Source Audio's icon

1- separate input from output

2- check input values

3- monitor output values WITHOUT sending anything out.

CLIP output values to 0. ~ 1.

if all works ok, then connect output

acmusic's icon

Got it.

The next thing I’d like to do is make the xy pad multi-touch enabled. Can you help with that??

acmusic's icon

I've seen recent TouchOSC videos where it seems like it's a possibility. I think you can make a Lua script for it but I have no idea how to write the code.

Source Audio's icon

If touchOSC has object that sends multitouch, then

one can define what it sends, and then use it in max.

read touchOSC docs, no matter if old one or MK2

acmusic's icon

Ok I'll do more investigating and see if I can figure out a solution

Do you know of any ways to program accelerometer controls in TouchOSC? I'm using my iPad and want to change filter parameters by tilting it in different ways.

Source Audio's icon

I only use touchOSC original version.

to use Accelerometer you don't need to programm anything,

only activate sending of Accelerometer in options.

acmusic's icon

I'm using the current version.

How would I patch accelerometer controls in Macx?

Source Audio's icon

look what osc string it sends, then route that.

then unpack 3 values

Stephen Good's icon

Exactly as SOURCE AUDIO mentions. To do so, you can use a print object connected to udprecieve to see what messages TouchOSC is sending in the console, then you can adapt the route object so that it filters the correct messages.

acmusic's icon

So like this:

udprecieve (xxxx) > route accelerometer (or orientation, compass, etc.) > unpack 3 values > desired object

Stephen Good's icon

In theory yes! Let us know how you get on.

acmusic's icon

Tried it but still not working.Sorry for being such a noob...

I'm using my iPad so I'm struggling to figure out how to get the movement data from that into Max

Stephen Good's icon

Can you attach screenshots of the messages you are receiving from TouchOSC when you are moving it. From memory you need to turn that function on. Once it is streaming the data, it should be easy to spot in console if you attach a print object to the udprecieve.

Source Audio's icon

touchOSC shows string that it sends if accel is activated.

in MK1 it is

/accxyz nn nn nn

acmusic's icon

I got it to work! It needed the following script:


Source Audio's icon

when you are at it, I asked someone who uses MK2 about XY pad.

same as MK1 it has Multy-XY pad object.

There is an example in factory layouts.

in MK1 it simply works.

I forgot about it...