netlabtoolkit / ntk

MIT License
19 stars 9 forks source link

OSC enhancements - default messages, multiple ins/outs, fractional ins/outs #93

Open pvanallen opened 8 years ago

pvanallen commented 8 years ago

Phil can do most of this as long as it's possible to access/construct the input/output multiple parameters in the OSC message

Default Message

Since typical OSC messages are in URL path format, e.g. "/1/fader1” (from the TouchOSC app), or "/arduino/analog/0”, I think we should use a similar nomenclature. I’d suggest we use the following as the defaults (and I think stick to all lowercase):

OscIn: /ntk/in/1

OscOut: /ntk/out/1

Multiple parameters

Lastly, it would be really great to be able to send and receive multiple parameters - maybe we add this later, but here’s what I’d like to see:

OscIn: have four widget outputs, corresponding in order to the incoming parameters. So if it received the following:

/ntk/in/1 10 20 30 40

out1 = 10 out2 = 20 out3 = 30 out4 = 40

The other option would be to have an field in the “more” section that sets the parameter position to receive - 0 for the first, 1 for the second, etc.

OscOut: have four widget inputs, corresponding in order to the outgoing parameters. So if the inputs received are the following:

in1 = 10 in2 = 20 in3 = 30 in4 = 40

The message would be: /ntk/out/1 10 20 30 40

Fractional ins/outs

The OSC widgets should be able to handle the commonly used fractional inputs and outputs that range from 0.0-1.0.

OscIn: should have a multiplier to scale the 0.0-1.0 input number up to a 0-1023 range

OscOut: should have a divisor to scale the 0-1023 number down to a 0.0-1.0 range for its output.

scazan commented 8 years ago

Needs to send array of values on a single OSC path