FYI. Here’s the answer I got from Hexler regarding TouchOSC and the use of “index” in OSC messages.
Hexler support Q&A
Question:
I’m trying to make a template for a new VCVRack module: oscelot/docs/Oscelot.md at master · The-Modular-Mind/oscelot · GitHub
It expects the format
Faders
OSC Messages must have an address ending with /fader
It must have two arguments, Id (Integer) and Value(Float between 0-1)
/fader, args: (1, 0.5573)
Encoders
OSC Messages must have an address ending with /encoder
It must have two arguments, Id (Integer) and Delta Value(multiples of -1.0
or +1.0)
Encoders have default sensitivity set to 649
/encoder, args: (1, -1.0)
Buttons
OSC Messages must have an address ending with /button It must have two arguments, Id (Integer) and Value(0.0 or 1.0) /button, args: (1, 1.0)
I find it impossible to see/control the “index” in the editor - used as argument in OSC.
If I make 10 sliders with name “fader” - they will have index 1 to 10 - if I delete 5-10 and make 5 new sliders, they will have index 11-15
I have to be able to set an unique index for each control. Possibly even be able to automatically re-index controls, from top left to bottom right.
Answer from support@hexler.net:
Index uses the objects index number as a value; it sounds like you want to be using Float or Integer depending on the specific message. More information on using different data types for arguments can be found here: Editor · Messages · OSC · TouchOSC | hexler.net
See the attached image for an example based on the Faders section mentioned in your email:
The Address is set to a constant of /fader . The first argument is a Constant set to 1 (assuming the ID of this fader would be 1). The second argument is a value set to x (which uses the fader’s value of x). This is a float scaled from 0-1, so when the fader is moved it will send a decimal value between 0 and 1.
Hopefully this clarifies some information - Index is generally used if you need to say have a slew of faders that just increase by a single CC number (so the first fader uses its index as the CC, which would be 1, the second fader would be 2, etc). When making custom messages you generally want to specifically designate some parameters, as in this case, so just make sure to read that documentation link above on the different data types you can use to assign in messages.
As a reference, the online documentation for TouchOSC can be found here: Introduction · TouchOSC | hexler.net
Hopefully this helps! Please let us know if you have any other questions or need clarification on any of the details mentioned here. We apologize for any inconvenience this has caused you, and thank you for your use and support of TouchOSC!