Old 03-11-2015, 05:06 PM   #1
Argitoth
Human being with feelings
 
Argitoth's Avatar
 
Join Date: Feb 2008
Location: Mesa, AZ
Posts: 2,057
Default my take on a color (colour?) swatch



too many inclusions being used so I'll have to reserve code for when it's more closer to being finished. (yes im prototyping in jsfx!)

basically I wanted something to replace my color toolbar. the other color swatches Airon and spk77 seemed to be creating were not doing it for me. I like to use a select set of colors and never change them, so I need per-swatch editability. Also, coding this was a good lesson in creating objects and controls.

WIP.

I want:
-import/export settings
-"apply random color to item" button
-more easily adjust swatch color settings

-edit mode on/off
-copy/paste buttons in edit mode
-reset colors button in edit mode
-randomize colors button in edit mode
__________________
Soundemote - Home of the chaosfly and pretty oscilloscope.
MyReaperPlugin - Easy-to-use cross-platform C++ REAPER extension template

Last edited by Argitoth; 03-11-2015 at 05:52 PM.
Argitoth is offline   Reply With Quote
Old 03-11-2015, 06:15 PM   #2
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,902
Default

OMG. So much options haha Impressive !
X-Raym is offline   Reply With Quote
Old 03-11-2015, 11:46 PM   #3
airon
Human being with feelings
 
airon's Avatar
 
Join Date: Aug 2006
Location: Berlin
Posts: 11,818
Default

Haha! This is great!

Keep going man. I'll do the generated colour stuff , though you've got a great take on it I have to say.
__________________
Using Latch Preview (Video) - Faderport 16 setup for CSI 1.1 , CSI 3.10
Website
"My ego comes pre-shrunk" - Randy Thom
airon is offline   Reply With Quote
Old 03-12-2015, 05:21 PM   #4
Argitoth
Human being with feelings
 
Argitoth's Avatar
 
Join Date: Feb 2008
Location: Mesa, AZ
Posts: 2,057
Default



progress.

anything that doesn't look right? potential problems? suggestions? let me know.

still to do:
-button for randomize color or selected swatch
-apply random color button
-show/hide random color button
-option to wrap based on window bounds OR wrap based on user-defined bounds.
__________________
Soundemote - Home of the chaosfly and pretty oscilloscope.
MyReaperPlugin - Easy-to-use cross-platform C++ REAPER extension template

Last edited by Argitoth; 03-12-2015 at 05:58 PM.
Argitoth is offline   Reply With Quote
Old 03-12-2015, 05:42 PM   #5
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,902
Default

You thought about so much thing already!
How many lines of codes is this baby ? ^^
X-Raym is offline   Reply With Quote
Old 03-12-2015, 08:10 PM   #6
Argitoth
Human being with feelings
 
Argitoth's Avatar
 
Join Date: Feb 2008
Location: Mesa, AZ
Posts: 2,057
Default

not counting inclusions, 261 lines. I'm using Ixix mouse stuff, my own slider function library, and another include for misc stuff.
__________________
Soundemote - Home of the chaosfly and pretty oscilloscope.
MyReaperPlugin - Easy-to-use cross-platform C++ REAPER extension template
Argitoth is offline   Reply With Quote
Old 03-13-2015, 05:06 PM   #7
Shan
Human being with feelings
 
Shan's Avatar
 
Join Date: Mar 2007
Location: Vancouver
Posts: 2,279
Default

This is pretty badass.

Shane
__________________
"Music should be performed by the musician not by the engineer."

Michael Wagener 25th July 2005, 02:59 PM

Last edited by Shan; 03-13-2015 at 10:24 PM.
Shan is offline   Reply With Quote
Old 03-14-2015, 05:09 AM   #8
Seventh
Human being with feelings
 
Seventh's Avatar
 
Join Date: Sep 2010
Location: Finland
Posts: 776
Default

Nice work!

I think it would be useful if you could enter HSL values in the standard 0-255 scale, with numeric input by keyboard. Then I could go steal palettes from other DAWs with screenshot+color picker.
__________________
Grey, flat and minimal theme for Reaper: Symbiosis
Seventh is offline   Reply With Quote
Old 03-14-2015, 08:56 AM   #9
Argitoth
Human being with feelings
 
Argitoth's Avatar
 
Join Date: Feb 2008
Location: Mesa, AZ
Posts: 2,057
Default

you'll be able to do that easily with import/export of text files.


edit: just noticed a bug in the gif, the power mode does not reflect global saturation/luminance until after mouse is let go, FIXED.

multiple swatch types:
-normal
-random "rnd" = random color from a defined gradient of hues
-power "pow" = you can select a hue within the gradient by hand
-select "sel" = selects a random normal swatch.
-remove "rem" = will remove color from selected item

you can turn on/off swatches to create groups

edit: maybe we need a hotkey for selecting items in a project that has the selected color.
Edit: also we need some controls based on number of items, such as doing a gradient when you have multiple items or tracks selected.
__________________
Soundemote - Home of the chaosfly and pretty oscilloscope.
MyReaperPlugin - Easy-to-use cross-platform C++ REAPER extension template

Last edited by Argitoth; 03-14-2015 at 03:18 PM.
Argitoth is offline   Reply With Quote
Old 03-14-2015, 10:27 PM   #10
Argitoth
Human being with feelings
 
Argitoth's Avatar
 
Join Date: Feb 2008
Location: Mesa, AZ
Posts: 2,057
Default

i think i should change "sel" to "alt" and then maybe some parameters like "alternate from swatches a to b" also "rlt" for random alt

also i think we need individual x y values for all swatches so when you import a text file with a list of colors, you can position them where you want...? but then how would wrapping work? it would be better just to have multiple palletes with individual controls.
__________________
Soundemote - Home of the chaosfly and pretty oscilloscope.
MyReaperPlugin - Easy-to-use cross-platform C++ REAPER extension template

Last edited by Argitoth; 03-14-2015 at 10:42 PM.
Argitoth is offline   Reply With Quote
Old 03-15-2015, 08:37 PM   #11
Argitoth
Human being with feelings
 
Argitoth's Avatar
 
Join Date: Feb 2008
Location: Mesa, AZ
Posts: 2,057
Default

preparing my code for multi-palette support:


can't stop adding features

I'd like to add some palette generating controls as well, maybe a new edit page where you see one palette at a time and you have various controls for that stuff.
__________________
Soundemote - Home of the chaosfly and pretty oscilloscope.
MyReaperPlugin - Easy-to-use cross-platform C++ REAPER extension template
Argitoth is offline   Reply With Quote
Old 03-16-2015, 09:06 AM   #12
Argitoth
Human being with feelings
 
Argitoth's Avatar
 
Join Date: Feb 2008
Location: Mesa, AZ
Posts: 2,057
Default

a good friend of mine just gave me an idea, no only have hotkeys to "select media items of selected color" but "select range of color of media items" for example you could color things in different shades of blue, and then have the ability to select all items of all shades of blue or all items of a single shade of blue.
__________________
Soundemote - Home of the chaosfly and pretty oscilloscope.
MyReaperPlugin - Easy-to-use cross-platform C++ REAPER extension template
Argitoth is offline   Reply With Quote
Old 03-16-2015, 09:56 AM   #13
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,902
Default

You color will be even more flexible than the Photoshop one!
X-Raym is offline   Reply With Quote
Old 03-16-2015, 10:38 AM   #14
Argitoth
Human being with feelings
 
Argitoth's Avatar
 
Join Date: Feb 2008
Location: Mesa, AZ
Posts: 2,057
Default

HMM... just got another idea. I could have the reascript version automatically update an ExtState and then I can provide actions based on that so you can have hotkeys to do stuff like "apply random color from palette X" or "select all items who have color of palette X"

OMG!!!!!!!!!!!!!!! SO MUCH POTENTIAL!!!
__________________
Soundemote - Home of the chaosfly and pretty oscilloscope.
MyReaperPlugin - Easy-to-use cross-platform C++ REAPER extension template
Argitoth is offline   Reply With Quote
Old 03-16-2015, 12:12 PM   #15
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,902
Default

ExtState!! This is definitely under-used for the moment!
Bring it to life!
X-Raym is offline   Reply With Quote
Old 03-18-2015, 05:22 AM   #16
Argitoth
Human being with feelings
 
Argitoth's Avatar
 
Join Date: Feb 2008
Location: Mesa, AZ
Posts: 2,057
Default

need to remember some ideas:

Code:
-within a palette you have swatches
-within a swatch you have gradients or solid colors


WHEN 0 ITEM SELECTED
-Click            = Select items of selected color or gradient
-Shift+Click      = Like click except get color from gradient at mouse position

WHEN 1 ITEM SELECTED:
-Click                = Set item to selected color or color of gradient a mouse position.
-Shift+Click          = Like click except get color from gradient at mouse position
-Ctrl+Alt+Shift+Click = Apply random color of gradient.

WHEN >1 ITEM SELECTED:
-Click            = Set items to selected color or gradient.
-Shift+Click      = Like click except get color from gradient at mouse position
-Ctrl+Click       = Add items of selected color or gradient to selection
-Shift+Ctrl+Click = Like ctrl+click except get color from gradient at mouse position
-Alt+Click        = Remove items of selected color or gradient from selection
-Shift+Alt+Click  = Like alt+click except get color from gradient at mouse position

DONE VIA ADDITIONAL SCRIPTS OR ACTIONS:
-Select items of color of selected item
-Remove color of selected items
-Apply random color of palette x to items/takes/tracks (multiple scripts)
-Apply random color of selected palette to items/takes/tracks (multiple scripts)
-Apply color x of palette x to items/takes/tracks (multiple scripts)
-All of the above mouse modifiers turned into hotkeys (multiple scripts)

POSSIBLE FUNCTION BUTTONS:
-Change selected color to random swatch and apply color based on above mouse modifiers "sel"
-Remove color of selected items "rem"
-Based on above mouse modifiers, select a random color of gradient "rnd"
-Import/Export settings
__________________
Soundemote - Home of the chaosfly and pretty oscilloscope.
MyReaperPlugin - Easy-to-use cross-platform C++ REAPER extension template
Argitoth is offline   Reply With Quote
Old 03-23-2015, 03:41 PM   #17
Argitoth
Human being with feelings
 
Argitoth's Avatar
 
Join Date: Feb 2008
Location: Mesa, AZ
Posts: 2,057
Default

mostly been working on improving my slider class and the user controls. I need to improve on the "power" swatch so you can do things like set a swatch to be a gradient of one color but with multiple saturations or luminances, smooth gradient or quantized gradient so you get a select few variations of one color on a single swatch. The coding of this interface using my slider class is somewhat similar to coding a Kontakt interface, except it's easier to do complex interactions of GUI elements.




Next is to turn the palette into an object. You will be able to add up to 10 or however many palettes and easily edit them to create any organization of colors.
__________________
Soundemote - Home of the chaosfly and pretty oscilloscope.
MyReaperPlugin - Easy-to-use cross-platform C++ REAPER extension template
Argitoth is offline   Reply With Quote
Old 03-23-2015, 09:11 PM   #18
Claudiohbsantos
Human being with feelings
 
Join Date: Aug 2014
Location: New York
Posts: 135
Default

I can't really comment helpfully on anything since most of whats going on is going way over my head, but this seems like an awesome tool! Curious to see how it turns out
__________________
My Reapack Repo - Reapack Extension
Claudiohbsantos is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 01:32 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.