Welcome to %s forums

BrainModular Users Forum

Login Register

arrays of color?

I need help on a Patch
Post Reply
woodslanding
Member
Posts: 1327
Contact:

Unread post by woodslanding » 07 Jan 2017, 17:19

I am putting color values into an array, but it is not working. I get all 0's out..... I seem to remember somewhere that they are not compatible?

What's the proper way to do this?
Custom Ryzen 5900x MATX build, Win10, Fireface UFX, touchscreen
Custom 2 manual midi keyboard
Usine, Kontakt, Reaktor, Synthmaster, Byome, Arturia, Soundtoys, Unify

User avatar
nay-seven
Site Admin
Posts: 5684
Location: rennes France
Contact:

Unread post by nay-seven » 07 Jan 2017, 19:42

You can use the output of an HSLA color to fill your array

23fx23
Member
Posts: 2545
Contact:

Unread post by 23fx23 » 07 Jan 2017, 21:42

Colors are RGBA signed int32 values, not float32 like classical values, so depending on their value they will output a number that is above float32 precision,
and display 'NAN', so it's not safe imo to manipulate with 'classical' float wires like arrays and all.
should use dedicaced color modules like color selector or color dispatcher.

woodslanding
Member
Posts: 1327
Contact:

Unread post by woodslanding » 10 Jan 2017, 21:56

Nay:

so are you saying the color output on the HSLA is a different format than the regular color? Or are you saying to create arrays of H,S,L and A, and reconstruct the color at the other end?

I might try the latter, and see if it works. In my application, using color selectors seams really, really heavy.
Custom Ryzen 5900x MATX build, Win10, Fireface UFX, touchscreen
Custom 2 manual midi keyboard
Usine, Kontakt, Reaktor, Synthmaster, Byome, Arturia, Soundtoys, Unify

User avatar
nay-seven
Site Admin
Posts: 5684
Location: rennes France
Contact:

Unread post by nay-seven » 10 Jan 2017, 22:44

yes, 1

Image

23fx23
Member
Posts: 2545
Contact:

Unread post by 23fx23 » 11 Jan 2017, 01:03

be aware HSLA or RGBA work only for few cases, ie won't work for for exemple HSLA = 0,1,1,1 or with high lum and apha will gets lots of nans. if the hexa result is above float32 precision it still displays Not a Number. so if planing using standards arrays, should check their conversion values first. i think colors array will probably comme with HH3, sdk metion them, by waiting could make a polyphonic patch with ie a simple color fader or colors io to quickly generate a 'color array'

woodslanding
Member
Posts: 1327
Contact:

Unread post by woodslanding » 11 Jan 2017, 05:15

23fx23 wrote:by waiting could make a polyphonic patch with ie a simple color fader or colors io to quickly generate a 'color array'
but how would you send it anywhere?? Can colors even go through busses safely? I thought all values in usine were just 1 item arrays....

Are the individual values for HS and L also not normal usine flows?

What I did was make 2 different arrays, one for HUES and one for SATURATIONS. Then at the recieving end, I feed the appropriate items from each array to an HSL module. saturation and level controls are set at the destination. So far it has worked.....
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 » 11 Jan 2017, 12:14

sorry i retried quickly and saw i made a mistake, they are displayed as nan in array but the values still are passed internally in fact, so yes colors work with busses, and man can collect them to a classical array and send the whole to a bus as well, then demultiplex on the other side. H, S L are floats so it's sure there is no problem if using those arrays. i like to do this way too. the only problems
but so i don't understand, in wich situation did you 'get 0s out' of array?

woodslanding
Member
Posts: 1327
Contact:

Unread post by woodslanding » 12 Jan 2017, 02:50

the 0's seem to be from a bug unrelated to color. I got the 0's with H and S also. Seems to be a poly buss receive problem.

I'm happy just sending H and S tho. It works well, and I can control L globally to have a brightness control for the whole wkp!
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 23 guests