Page 1 of 2

I need help // generic color mixer preset manager

PostPosted: Thu Jan 31, 2019 10:08 pm
by guyman
Hello all.

I've been working on this for days but I can't seem to workout how to rig a preset manager to this generic color mixer.

http://flowstone.guru/downloads/generic-color-mixer/


i THINK the best way is to have the rgb class values on the last module before output rigged to a float array preset, but i've tried several ways and don't think I understand how it all works properly.

I would like ideally to have preset params for all the editable values (rgb,hsv,pallet,hex, or maybe just the GUI xy and slider) but i think that can also be accomplished using just the RGB (all possible combinations being edited there, I dunno).... it's important to get that color module output at the end to change on time with the presets, so maybe it has to go before that ruby module....

If any greater mind could assist, I would be indebted.

Good day !!!

Re: I need help // generic color mixer preset manager

PostPosted: Fri Feb 01, 2019 9:29 am
by tulamide
I've added 2 methods to my color mixer, you don't need to learn them. Instead, you now have access to two new string input/output on the second layer, called "To Preset" and "From Preset". The string provided is just a csv of RGBA and the mixer expects such a string from the preset as well. Auto-conversion is applied to the methods, so the mixer will update all of its content, when a "From Preset" string arrives.

I hope this simplifies your task. If you have a satisfying solution, please share it in this thread! I'd be interested, as I'm not that good at preset handling (it's green, not Ruby, that holds me back :lol: )

Re: I need help // generic color mixer preset manager

PostPosted: Fri Feb 01, 2019 4:15 pm
by Spogg
I love this colour mixer tulamide.

I can see how useful it might be to be able to change the colour with preset changes (if you know what you're doing with the design aspect :lol: )

I've added preset management in this demo. It seems fine to me so I do hope it's useful.

Cheers

Spogg

Re: I need help // generic color mixer preset manager

PostPosted: Fri Feb 01, 2019 7:52 pm
by Phil Thalasso
Thank you both Tulamide and Spogg for this wonderful tool!

Regards
Phil

Re: I need help // generic color mixer preset manager

PostPosted: Sat Feb 02, 2019 12:40 am
by guyman
You all are melting my top secret keeping - technologically stingy - heart. I hope to contribute back to this think tank, as much as you all have helped me so far. I don't get this sort of quick response from any of my other peer groups !


Hail The Flowstoners !



~ That Guy

Re: I need help // generic color mixer preset manager

PostPosted: Sat Feb 02, 2019 12:43 am
by guyman
also.... if i could request one more thing... Can anyone flip the rainbow spectrum upside down? Not the saturation/brightness square, but the strip on the left.....


Thank you Spogg and tulamide and all further contributors !!

Re: I need help // generic color mixer preset manager

PostPosted: Sat Feb 02, 2019 1:15 am
by guyman
In case anyone gets to using this thing as much as I am, I just realized you can clear the color palette by SHIFT+RClicking the loaded color in that slot, to clear that slot. Right click a checkered slot to load a color to palette.

little tip.

I added a Right click function to control that rainbow Hue strip on the left, so if you are changing the value & saturation in the box with LClick, just RClick and drag to a new hue. Small touch, but continuous fun for you.

Now if only the pallet was managed by presets....

Generic-Color-Mixer r4-1 (Preset + RClick).fsm
(14.21 KiB) Downloaded 804 times




~

Re: I need help // generic color mixer preset manager

PostPosted: Sat Feb 02, 2019 3:39 am
by tulamide
guyman wrote:In case anyone gets to using this thing as much as I am, I just realized you can clear the color palette by SHIFT+RClicking the loaded color in that slot, to clear that slot. Right click a checkered slot to load a color to palette.
To be fair, all of this, and a bit more, is explained in the description on the GURU page ;)

guyman wrote:I added a Right click function to control that rainbow Hue strip on the left, so if you are changing the value & saturation in the box with LClick, just RClick and drag to a new hue. Small touch, but continuous fun for you.
Interesting! I'm not sure, I could use it that way, but others might enjoy this feature!

guyman wrote:Now if only the pallet was managed by presets....

Ok, here I have to explain something. The color mixer always was designed as an editing tool. It was never meant to be used in a plugin. That's why it had no preset support and that's also why the palette is saved with the schematic.

That doesn't mean it can't be done. The preset string is allowed to have a total length of 255 bytes. Flowstone 3.x uses simple ASCII encoding (not sure about Flowstone 4), which is 1 byte per character. The maximum value of RGB is 255, which is 3 chars. Every entry but the last one also needs a comma, so lets count 4 bytes per value. Every color consists of 4 channels (RGBA) that's 4 * 4 = 16 bytes per color. 255 / 16 = 15 colors, but since the last one only needs 12 bytes we can push it by one to a total of 16 colors in one string.
The palette offers 5 colors, plus the one we already send to the preset. More than enough space in the string to fit them all. There will be issues with the schematic saved colors, but that can be managed.

However, it is time consuming and I am not willing to do that. Of course, if anybody wants to do it, go for it, as long as you post your changes here on the forums!

----------------------------------------------------------------
Thank you Spogg, for the preset handling! As soon as I saw the red lines, indicating an infinite loop, I stopped my efforts of introducing preset management :lol:

I have fixed the bug with new presets, but it's is a quick hack: The string is converted to an array like before, but this time it is tested for a length of 4 entries (interpreted as RGBA). The string sent to the color mixer from the preset manager on new presets seems to be either empty or only consisting of one entry.
There might still be a way to break it, but at least only, if not using the preset manager.

I also cleaned up the mess, that the comment modules left behind on the property panel of the mixer. You can now use it to define a preset name for the mixer (as prepared by Spogg).

Finally added a tooltip help, to blatantly show my and Spogg's name each time you hover over the module :mrgreen:

Enjoy!

Re: I need help // generic color mixer preset manager

PostPosted: Sat Feb 02, 2019 8:54 am
by Spogg
This is a really nice tool now tulamide.

Of course, before I could even consider putting it into my toolbox, I had to change the spelling of “colour” to the proper one ;) :lol:

I imagine there could be a few of these at a high level sending out a few colours via wireless, so you could change the colour scheme easily.

Cheers

Spogg

Re: I need help // generic color mixer preset manager

PostPosted: Sat Feb 02, 2019 10:25 am
by tulamide
Spogg wrote:I imagine there could be a few of these at a high level sending out a few colours via wireless, so you could change the colour scheme easily.

Actually, this is only revision 4 of that tool. Since I uploaded it on GURU, I developed it much further (but without preset support). The latest version uses Ruby trickery to have its own kind of "wireless" connection. The two-component system is now called Advanced Color Management (or Advanced Colour Management for Spogg), short ACM, and is the central management tool for every color of your whole project. Little receiver modules are linked to whatever color input you have, and when creating a plugin, those stay in (they preserve the last color under all circumstances), while the manager is not part of the plugin.

The manager however doesn't have a simple palette anymore. Instead you create "groups". Each group can store as many colors as you like. And you can create as many groups as you like. The groups get a name, too. I even support importing Adobe Photoshop color palettes.

For example you could have a group "Big Knob", which contains all the colors you need for that knob, and a group "left slider", containing all colors for that slider. Then, when using one of the receivers, and that's the clue of the "wireless" connection", you open the porperties panel and from there select one of the named groups and a color from that group!

It's a lot of text, but believe me, it's dead simple to use.

Unfortunately, Flowstone 4 has so many changes (Ruby 2.5 instead of 1.9.3, an overhauled toolbox, etc.), that it broke one or two features. For example, trying to put both elements in the toolbox instantly crashes to desktop. It worked in Flowstone 3.x, though.

Here are some images.

ACM_mixer.png
ACM_mixer.png (21.88 KiB) Viewed 14259 times

ACM_receiver.png
ACM_receiver.png (8 KiB) Viewed 14259 times