Welcome to %s forums

BrainModular Users Forum

Login Register

change background color

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

Unread post by woodslanding » 24 Oct 2010, 07:24

It would be nice to be able to programmatically change the background color of a patch...... or to change the bitmap

Right now, it seems like the container object doesn't actuallyhave anything to do with the background object--but it seems like maybe you could put controls for the background into the container object???

Of course there may be a reason not to, which I don't understand.....

thanks,
-eric
Custom Ryzen 5900x MATX build, Win10, Fireface UFX, touchscreen
Custom 2 manual midi keyboard
Usine, Kontakt, Reaktor, Synthmaster, Byome, Arturia, Soundtoys, Unify

23fx23
Member
Posts: 2545
Contact:

Unread post by 23fx23 » 24 Oct 2010, 08:04

what do you call a backround object?

if you speak of container or any usine interface item that have a backround color option avaible in edit layout,
then now it's accessible since a few versions via iml and the SET_LAYOUT procedure.
so if you place your items in a container, you can dynamically change the bacground, border or whatever avaible
layout option via iml, that can be trig via sendusine message module or inside a script.
if you speak of backrounf of patch i don't think it's possible, but just add a contenair will do the job.
here an exemple with script:
SendInternalMsg ('SET_TARGET_PATCH','SENDER_PATCH')
SendInternalMsg ('SET_LAYOUT','ThecontenairName','background color', FloatToStr(getValue(color_in)))
note that if you make inputs that will trig differents colors codes, you have to disable their fastCallback in init procedure using
SetFastCallback(input, FALSE);

SET_LAYOUT is awesome for that, i use it a lot, but do not abuse as it 's cpu hungry.

woodslanding
Member
Posts: 1327
Contact:

Unread post by woodslanding » 07 Nov 2010, 05:37

ahhh, cool.

It is still a bit awkward to use IML, but it does work.

Also I am trying not to use IML, as my cpu is right at the edge!
Custom Ryzen 5900x MATX build, Win10, Fireface UFX, touchscreen
Custom 2 manual midi keyboard
Usine, Kontakt, Reaktor, Synthmaster, Byome, Arturia, Soundtoys, Unify

woodslanding
Member
Posts: 1327
Contact:

Unread post by woodslanding » 10 Nov 2010, 08:53

can this be used also to change the background bitmap?
Custom Ryzen 5900x MATX build, Win10, Fireface UFX, touchscreen
Custom 2 manual midi keyboard
Usine, Kontakt, Reaktor, Synthmaster, Byome, Arturia, Soundtoys, Unify

23fx23
Member
Posts: 2545
Contact:

Unread post by 23fx23 » 10 Nov 2010, 22:33

sorry I don't know,
im pretty sure it work for every other layout options,
but i don't think it would work for bmp , as need to deal with files path.
tried with a jpg on c: but the var was not found, when trying via send message in console we can see:
"Bit map affectation is not allowed : BACK BITMAP" so i suppose it's a protection.

can use fader with frames as a workaround? (but will not work as Bg).
also i found a trick if really need BG, is to set visible items in a certain order via iml, from behind to upper so the fader is always behind the other items, then can increment the fader to change the BG image of the sequence. ..but i reckon it's tricky, especially if lot of items to re-set on top, ...still a possible workaround..)
i did a test and that worked, named all items exept the farder from 0 to n in order to make it easier then with the script iml
set them all invisible, then back visible, so above the fader. a cool option to solve this pb would be a "force item to be under",
or dynamically change all the layout preset.
but maybe i did wrong and it's already possible. i guess only senso can answer that..

woodslanding
Member
Posts: 1327
Contact:

Unread post by woodslanding » 10 Nov 2010, 23:00

Okay.... I'm thinking of a different way to do this anyway.... I think I will indicate active with a switch, even though it is actually a button. Then I can use the mouse down feature to do the button work. So no need for bkg switching.

With setting visible items order: Is there a way to get the slider thumb to appear on top of the title for a fader??

Obviously it looks all wrong for the title to show over the thumb!
Custom Ryzen 5900x MATX build, Win10, Fireface UFX, touchscreen
Custom 2 manual midi keyboard
Usine, Kontakt, Reaktor, Synthmaster, Byome, Arturia, Soundtoys, Unify

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

Unread post by senso » 11 Nov 2010, 10:55

Yes it's a protection.
I'm not sure I can disable it.

woodslanding
Member
Posts: 1327
Contact:

Unread post by woodslanding » 13 Nov 2010, 19:29

it's fine, no worries.
Custom Ryzen 5900x MATX build, Win10, Fireface UFX, touchscreen
Custom 2 manual midi keyboard
Usine, Kontakt, Reaktor, Synthmaster, Byome, Arturia, Soundtoys, Unify

Post Reply

Who is online

Users browsing this forum: No registered users and 27 guests