Welcome to %s forums

BrainModular Users Forum

Login Register

select between two colors for a button

I need help on a Patch
Post Reply
User avatar
parityflux
Member
Posts: 83
Location: Tucson, AZ USA
Contact:

Unread post by parityflux » 19 Oct 2016, 00:58

Last night, I was trying to select between the outputs of two RGBA modules (constants) in order to change the background color of a button and I was unable to successfully do it. I guess the flux wires were incompatible. I was using two PassFlow modules to control the flow and I confirmed that the flow was working (I could see floating point differences on the PassFlow outputs), but the button wasn't accepting the input (it was expecting RGBA). Does anyone have any thoughts on this. I ended up using LEDS with the colors preset, since I couldn't get the PassFlow to pass this sort of data.

Tangentially, I have come across this before where some modules will pass data nicely despite the differences in flux wire, and others will not. I wish the out type was selectable in certain modules. Not only so one could ensure the data was comaptible, but also for debugging/tracing.

-John

23fx23
Member
Posts: 2545
Contact:

Unread post by 23fx23 » 19 Oct 2016, 01:05

mm normally that works, i tried here and that worked, ( on HH, what usine version are you on?

User avatar
parityflux
Member
Posts: 83
Location: Tucson, AZ USA
Contact:

Unread post by parityflux » 19 Oct 2016, 01:19

Thanks for the reply 23fx23,

Usine HH, one of the latest 2-3 vers. I'll look again at the module layout this evening. Once I got the LEDs working, I abandoned the backcolor changes, but the latter would be nice to get to work (space saving as I may use tri-color or quad-color switching to show different modes).

23fx23
Member
Posts: 2545
Contact:

Unread post by 23fx23 » 19 Oct 2016, 01:19

edit mm nope sorry indeed that depend on HSLA setting,with some settings colors can become NAN numbers above float ranges usine can handle with classical math/flow ect modules .

Use the Selector color in color, here you can tab between two or more colors safely

User avatar
parityflux
Member
Posts: 83
Location: Tucson, AZ USA
Contact:

Unread post by parityflux » 19 Oct 2016, 01:30

I attempted the color selector with two colors, but then the input requires 1..2 (or 1..3, 1..4) and does fading from one color to the next above 1 or something like that, which is entirely cool, but more difficult for me as I am using bit logic to determine state. Specifically I need to trigger color selection based on single MIDI messages (Chan1, CC 24, value x), value 9 is one state/color and value 1 is another (there are others that I want to include as well). I get the state fine with MIDI filters and 'x=' modules but I don't know how to translate these separate bits to a rounded floating point that would distinctly show the selected color (1,2,3, etc) as input to the Selector Color module.

23fx23
Member
Posts: 2545
Contact:

Unread post by 23fx23 » 19 Oct 2016, 02:05

what i would do is use the mapper value then (/data), it let you map incoming numbers to out numbers easily

ie you say when incoming is code9, it outputs 3, to select third color
when input code is 1, ouputs 7 to select 7th color or whatever ect

23fx23
Member
Posts: 2545
Contact:

Unread post by 23fx23 » 19 Oct 2016, 02:17

or if you need to filter differents message types, you can keep your logical state checkings, but then add a multiply out of each logical module with the nb of color wanted, then all this outputs goes to selector in.

that way lets say your CC9 is incoming, the =9 locical outputs 1, multiplied by color wanted ie 3 it will output 3, otherwise 0
so each of them summed will output 0 or assigned nb when received

User avatar
parityflux
Member
Posts: 83
Location: Tucson, AZ USA
Contact:

Unread post by parityflux » 19 Oct 2016, 02:20

23fx23 wrote:or if you need to filter differents message types, you can keep your logical state checkings, but then add a multiply out of each logical module with the nb of color wanted, then all this outputs goes to selector in.
Smartypants. Both solutions sound great. I can't wait to try it out this evening.

Thank you!!!!
-j

User avatar
parityflux
Member
Posts: 83
Location: Tucson, AZ USA
Contact:

Unread post by parityflux » 19 Oct 2016, 05:34

Image

It works great. Thank you so much.

23fx23
Member
Posts: 2545
Contact:

Unread post by 23fx23 » 19 Oct 2016, 23:48

cool :) welcome'

Post Reply

Who is online

Users browsing this forum: No registered users and 130 guests