Getting and Setting Kontrolleur Values in a Patch

Hey catweasel,

i got arround that by tagging my pins. and save the preset values together with the tags. i combine tags and Pin names, to get unique combinations its sth like this in the end: mixer-left-8, mixer-left-9
When starting the patch i simply send all pin adresses with corresponding tag combinations. sort the tag combinations alphabeticly apply that order to the pin adresses.
THen i take my preset sort the saved tags apply that sort to the values. send the values with their corresponding adress. BOOM

That works only if your preset always contains all values and the ammount of values and their names never change,
right now im working on only selecting end sending changed values.

Ok, thats a work around I guess, but my presets don’t contain all values, and I’ve got the fun of inserting them to deal with too, resampling all the pins and sifting them takes too much cpu for my liking…
Hmm, I’ll continue headscratching for the afternoon!

cat i am not quite sure i understand…
when i place a patch in the root it will get e.g ID 74. i save the root, close, reopen. the patch still has that same ID. even when i ctrl+R reload the patch its ID in the root is still 74. what exactly are you doing?

also you could try with wildcards, see:
and scroll down to: OSC-Message-Dispatching-and-Pattern-Matching

ah or even see:
girlpower\IO\Networking\2_Advanced (OSC)\02_OSC_Patternmatching.v4p

Thats interesting :)

So I came to notice this because I’ve been patching and must have had a patch open then opened my gui, saved some presets, they contain the ID of the patch as it is at the time.
Next time I open the patch by double clicking to open v4, my patch now has a different ID.
I realisd I can check to see if the root ID is correct, and then substitute the ID, but then realised that substitutes all instances of that number

From the attached patch…
How can I get the first (or any of these numbers) and replace them so I can change the root ID for example
/73/268/53/Y Input Value
/80/268/53/Y Input Value
And obviously do it for the whole spread, but only changing that number so if it was
/73/268/73/Y Input Value
it would become
/80/268/73/Y Input Value
/80/268/80/Y Input Value

Being able to substitute at any point in the path would be good too, so change the 268 for example.
The other option I suppose is to remove the root from the saved file and add it dynamically, but I’d like another solution so that for example, I could copy presets from 1 patch to an identical one with a different ID.

I feel like it should be easy, but can’t think how to do it!

JugglingOSCaddresses (3.6 kB)

before i try to undertand what you’re up to…did you check the patternmatching i mentioned?

cat, what happened to you? not in good patching shape?

NumberJuggle.v4p (18.0 kB)

Thanks Woei!
Nicely done :)
Told you it should be easy… hehe

@Joreg, does indeed help, but I also need to be able to fix presets if they’re pointing to the wrong ID (patch not the root ID), and possibly copy them from 1 patch ID to another for example, the OSC is kind of incidental, based on the exposed pins defining my addresses. I have to pattern match to insert them into my spread that contains all values too, maybe thats the next thing I’ll try and rework, although not sure how!

So, followup question, I’d like to be able to write to pins directly so I can do fades locally rather than sending the values of osc, ie I can send a fade time and the values separately and the local patch can calulate the fades and update the pins. I need to do this to stop stuttering.
I’ve read through the server code, but I can’t make out where the plugin is writing to the pins, any clues (@joreg I’m guessing!)