Actual OSC messages (and "oscHook" android app)

While I've become capable to send osc messages to my windows machine (to trigger different ahk scripts), I can't seem to get my head around this oschook app.

Here's a sample picked from the messages I get in the O-S-C Launcher's console:

(DEBUG, OSC) In:  {
  address: '/oschook',
  args: [
    -0.0948103815317154,
    0.8379706144332886,
    0.4800374507904053,
    Long { low: -20598261, high: 379, unsigned: false }
  ]
} From: 192.168.43.147:34164
Accelerometer settings (app screenshot)

Host IP/port settings (app screenshot)


My question:

What should I do to make use of this osc information? Can I use it to control a fader's value?

Here's what I've tried:

Fader widget → osc property (O-S-C screenshot)

image

I've also tried to replace 7001 with the port shown in the console (42494). Same result, though: fader won't budge.

Input widget (GIF)

input widget


Thank you!

Hi, OSCHOOK seems to be a nice app! so you can use accleration sensors in your handy to control osc faders?

I think your best bet is to ask the developer, also i would try to set "smoothing steps/data and output range" and try to get better values (in a custom module) via round, etc..

as for the addy, i am not sure is it

/oschook[0]
or
/oschook/0

can you read the value with

/accelerometer/x

?

Unfortunately, no.


An OSC message of this form (generated with a command-line tool named DHsendOSC*) will change the input widget value to "2.44":

// (Line copied from the Launcher's console)
(DEBUG, OSC) In:  { address: '/light', args: '2.445' } From: 192.168.43.2:51694
Result (Screenshot)


*Line executed in terminal:

$ DHsendOSC -s 192.168.43.2 -p 7001 /light 2.445

hi

First, you can clearly ignore this answer as i got the same questions as you :slight_smile:

Does this post can help you ? as it's about preargs.

} From: 192.168.43.147:42494
(DEBUG, OSC) In:  {
  address: '/oschook',
  args: [
    0.02059013396501541,
    0.02825157903134823,
    1.0008959770202637,
    Long { low: -54851580, high: 379, unsigned: false }
  ]

but as the latest element of your array is a json object, i think you will need a custom module to format the way you want.

1 Like

You don't need to set the widget's target to 192.168.43.147:7001 to receive the messages from oschook. 42494 is the port used by oschook to send the message, this value is not important (it may even change, as many apps use randomly chosen port for outgoing messages).

The problem is that oschook sends multiple values in one messages while a fader only expects one value. You'll have to split the message from oschook. This could be done using a script widget for example, that would receive the value (with the address property matching whatever oschook uses) and dispatch it:

set('fader_1', value[0]) // first value to fader_1
set('fader_2', value[1]) // second value to fader_2
set('fader_3', value[2]) // third value to fader_3

Or with a custom module : Examples - Open Stage Control

The last argument is special as it represents a number that can't be represented in JSON like other number (it's too big). See json - Datatype long - what does high and low mean? - Stack Overflow. It could well be a timestamp from oschook in which case can probably ignore it.

2 Likes

I'm such a dickhead...
:shushing_face: