Rereading, I think maybe you just want the normal at method. Arrays have no concept of âscrolling throughâ hence nothing special to do with the array for that. You can get an index number from the mouse and ~envelopes[index].
If youâre accessing array items within the server, then youâd use Select or SelectX.
If youâre accessing them within the client, then youâd use at or similar.
The code examples retrieve the mouse values into the client â the OSC responder is client side, not running in the server â so SelectX wouldnât have been appropriate.
Also the array contains strings, which the server doesnât understand. So it pretty much has to be the client.
Client-vs-server is a sticking point for a lot of users, because itâs not immediately clear where the boundaries are. It takes some time to learn.
i tried to proliferate this a bit to no prevail a few different ways and either get âputâ errors or âbasic atâ integer errors
this was my latest iteration using selection
What information do you have? Here the answer is an array (OSC message) consisting of ['/ctrl', a node ID, a message ID, a mouse value] and only the last is relevant. Also you have an array of envelope strings.
What information do you need? Presumably this is just the envelope string in the array at the index.
What operations will get from 1 to 2? I think here it may be as simple as ~envelopes[msg[3]].
First line means ~mouse.put(selection, ~envelopes) â a/ put is meaningful for arrays but ~mouse starts off as a number so thatâs not going to get very far; b/ selection is nil and you canât put into an array at an index of nil; c/ even supposing you address those, Iâve no idea how it helps you get from 1 to 2 above by saving a reference to your complete array into another array.
Second line erases the first result and replaces it with [index] + ["1", "2"] ⌠again, Iâm not sure of the relevance of this operation.
Does the following get you closer to where you want to go?