Return values from the server of MouseX MouseY?


Seemingly simple problem, but I am struggling to find a way . I want to return the values of MouseX and MouseY from the server, but without using “.poll”. The being I want the readout to be a bit slower so I can do some calculations.

I found this ‘solution’ but it doesn’t return anything:

{, 0,}.play;

Many thanks for any help.

Did you check the SendTrig helpfile ? You need to catch the OSC messages with OSCFunc or OSCdef.

{, 0, }.play;

o = OSCFunc({ arg msg, time;
},'/tr', s.addr);
1 Like

If all you want is slower polling, the first argument to .poll() is a frequency. You’d write for once per second.

1 Like

Thanks dkmayer,

For some reason I had the impression the first part of the code was freestanding. I did see the additional code, but I thought there was a more concise way to achieve it without that. My mistake - thank you for your reply though.

Hi Virtualdog,

Ah this is helpful, I was not aware of that. Much appreciated!