Welcome to %s forums

BrainModular Users Forum

Login Register

SDK access to named global parameters

Tell us what you'd like Usine to do
Post Reply
sm_jamieson
Member
Posts: 551
Contact:

SDK access to named global parameters

Unread post by sm_jamieson » 15 Jan 2022, 19:45

In Usine there are various named parameters or data flows, e.g. binds, data buses, clusters and global arrays. Can we have some sdk functions to get and set these ?

The user module would register to get callbacks using the data name and provide a callback function. The callback function would provide the parameter number, parameter name, event type and event data. The user module could then interpret the event however it likes.

This would allow a user module to directly set and get values without wires which would be amazing.

Simon.

User avatar
senso
Site Admin
Posts: 4424
Location: France
Contact:

Unread post by senso » 17 Jan 2022, 10:21

it's a good suggestion but obviously an hard job. I'm more thinking about an implementation of "Usine-Objects" like in scripts:
https://www.brainmodular.com/manuals/hh ... ne-objects

sm_jamieson
Member
Posts: 551
Contact:

Unread post by sm_jamieson » 17 Jan 2022, 22:55

How did I not know about Usine Objects ?
I know you mentioned something like that was coming a while ago but I had missed that.
I can certainly use a script to do a lot of those things, and the same thing in the SDK would be excellent.

I think it is really the same thing as my suggestion.
I have not looked at the Usine Objects in much detail, but it seems the only thing missing from my suggestion
is the callbacks. Perhaps that could be added later.
Thanks for all your hard work.

Simon.

User avatar
oli_lab
Member
Posts: 1261
Location: Brittany, France
Contact:

Unread post by oli_lab » 20 Jan 2022, 16:00

very interesting indeed !
What I am obsessed with is maintenance of the patches !
wires are cool because you can read a patch and comprehend how it's done or what's wrong,
with no wires, (i.e. usine objects) it's harder to decypher a patch, let alone a whole workspace, unless we can have a table of all the usine objects with sender and receiver end in the inspector

cheers

Olivar
http://oli-lab.org

Win11 Ryzen9/32GB RAM - RME MADIFACE - SSL alpha link 4-16 - OSC capable interfaces

follow OLI_LAB adventures on Mastodon
@olivar_premier@mastodon.social

sm_jamieson
Member
Posts: 551
Contact:

Unread post by sm_jamieson » 21 Jan 2022, 14:57

oli_lab wrote:
20 Jan 2022, 16:00
very interesting indeed !
What I am obsessed with is maintenance of the patches !
wires are cool because you can read a patch and comprehend how it's done or what's wrong,
with no wires, (i.e. usine objects) it's harder to decypher a patch, let alone a whole workspace, unless we can have a table of all the usine objects with sender and receiver end in the inspector

cheers

Olivar
I guess its up to the user how they use this type of thing - enough rope to hang yourself etc.!
I'm unlikely to use workspace wide Usine objects much, which as you say could end up in a mess.
I do hope the inspector will be able to find these to manage them.

Personally, this is one thing I have been waiting for in Usine, for years !
What for ?
Its to control the GUI side of things in detail. If you want to be able to control many aspects of a single knob for example,
all the colors, captions, etc,. this takes an awful lot of wiring. Imagine 100 knobs - its a nightmare. You might want
to only change the color once every few days, but all needed a wire !
Now you can manage the visual of a patch as if it had 1000 wires to all the pins of many modules.

I expect to mainly use it inside a single patch, and if you do this the object reference "patch.object.pin" etc. is relative to the
patch, so such a patch does not break if you export it, load it somewhere else, etc. Excellent !
I can imagine sending the object name and value to the patch from somewhere else, then the local script in the patch using
this information to set the values.

Also, we asked before about Usine having signals which are constant (unless use has-changed etc.), and "messages" which are
sent and change a parameter and that's it. Well the Usine Object setting values are like messages really.
There was the option of using IML, but that was so horrible I never even tried it.

I don't expect Usine objects to be suitable for real signal flows, audio, video, etc. But for GUI control, great.

It's funny how several times I have asked for something - and Senso (and other developers) come up with
a better way of doing it !!

Simon.

Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests