Old 02-27-2015, 07:44 AM   #1
airon
Human being with feelings
 
airon's Avatar
 
Join Date: Aug 2006
Location: Berlin
Posts: 11,817
Default Lua: Colour Swatch tool

Colour Swatch window
for context sensitive colouring of tracks or items
I recommend getting this script with the ReaPack extension. That version is stable, and will update automatically when you sync, should anyone update it.


You can also download the script here: https://stash.reaper.fm/v/24328/Colour%20Swatch.lua
But you need to install that by hand.
Requires Reaper 5.0 or higher.


Current version:
v1.61 (2016-06-15)
+ spk77: fixed colour swatch reset

1.60 (2016.06.11)
- fixed Reset function
- larger window with more colour choices, hopefully covering most needs
Don't forget you can change the default preset to suit your needs. There is some help text included.

Written by Airon, SPK77, Heda, Evil Dragon and all the folks who contributed ideas, criticism and bug reports.

  • Will remember the state it was left in the next time the window is opened again.
  • Can be reset to defaults by clicking on the text in the upper middle "Reset"
  • Detects the selection focus and indicates this in the top row with a TRACK or ITEM text highlighted in red
  • CONFIG options(edit script to change these):
    one_off_colour_change - if set to true, will close the colour swatch window after the first colour change
    move_window_to_mouse - if set to true, will reposition the window where the mouse is after opening the window and RESET
  • SHIFT + Right-Click + drag = Upper Saturation
  • CTRL + Right-Click + drag = Lower Saturation
  • ALT + Right-Click + drag = Upper Luminosity
  • Right-Click + drag = Lower Luminosity
  • Colour Gradient for selected tracks or items
    CLICK on first colour, then CTRL(Cmd on OSX)+CLICK on second colour



Great toolbar icon by Hopi:
To install, copy it in to your data/toolbar_icons directory in the Reaper resource directory. Click on Options/Show Reaper resource path... to get to that.


How to install
Place in script directory.
First time users need to locate this via Options / Show Reaper resource path in Explorer/ Finder.

Then open the Action List window (Actions / Show Action list...) and hit the Load button next to Reascript:, and select the script file. Then you can activate it either from the action list window with the Run button, or bind it to any key, toolbar button, midi note or midi message.
__________________
Using Latch Preview (Video) - Faderport 16 setup for CSI 1.1 , CSI 3.10
Website
"My ego comes pre-shrunk" - Randy Thom

Last edited by airon; 06-02-2017 at 12:20 PM.
airon is offline   Reply With Quote
Old 02-27-2015, 08:56 AM   #2
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,874
Default

You bring so many colors in REAPER! HAHA that's powerful.
Bravo :P
X-Raym is offline   Reply With Quote
Old 02-27-2015, 09:20 AM   #3
Nixon
Human being with feelings
 
Nixon's Avatar
 
Join Date: Dec 2011
Posts: 406
Default

This is really pretty. I'm getting different colors (than presented) though
Might have to do with OSX or an option? SWS Auto-color shouldn't influence it right now.
Nixon is offline   Reply With Quote
Old 02-27-2015, 09:24 AM   #4
planetnine
Human being with feelings
 
planetnine's Avatar
 
Join Date: Oct 2007
Location: Lincoln, UK
Posts: 7,924
Default

Nice one Airon -this will be very useful for setting up/managing projects prior to a mix, or even organising as you go -another step closer to a clunk-free workflow -I like!



>
__________________
Nathan, Lincoln, UK. | Item Marker Tool. (happily retired) | Source Time Position Tool. | CD Track Marker Tool. | Timer Recording Tool. | dB marks on MCP faders FR.
planetnine is offline   Reply With Quote
Old 02-27-2015, 09:56 AM   #5
DarkStar
Human being with feelings
 
DarkStar's Avatar
 
Join Date: May 2006
Location: Surrey, UK
Posts: 19,677
Default

Quote:
Originally Posted by Nixon View Post
This is really pretty. I'm getting different colors (than presented) though
Might have to do with OSX or an option? SWS Auto-color shouldn't influence it right now.
... screenshot?
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
DarkStar is offline   Reply With Quote
Old 02-27-2015, 10:20 AM   #6
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 4,585
Default

there is no resizing stretching yet?
Sexan is offline   Reply With Quote
Old 02-27-2015, 11:09 AM   #7
Seventh
Human being with feelings
 
Seventh's Avatar
 
Join Date: Sep 2010
Location: Finland
Posts: 776
Default

Thanks, this is really nice!

One request though: when running the script, is it possible to check if the window is already open, and if so, then close it.

This way you could toggle it on and off using a hotkey.

It would also need to pass keystrokes to the main window of course. (Is this even possible?)
__________________
Grey, flat and minimal theme for Reaper: Symbiosis

Last edited by Seventh; 02-27-2015 at 11:48 AM.
Seventh is offline   Reply With Quote
Old 02-27-2015, 11:14 AM   #8
Jae.Thomas
Human being with feelings
 
Join Date: Jun 2006
Posts: 22,567
Default

I like this, thank you.
Jae.Thomas is offline   Reply With Quote
Old 02-27-2015, 11:19 AM   #9
airon
Human being with feelings
 
airon's Avatar
 
Join Date: Aug 2006
Location: Berlin
Posts: 11,817
Default

Seventh, that's a good idea. I'll ask around to see how that can be done.

Right now I'm working on a simple preset system, so your favorite swatches can be saved. Not sure how extensive that system can be though. I'll resort to loading presets only for starters, and then tackle saving data to an external file or the RPP.

Since people want to name things, that should be interesting to do as well with some kind of text box.

Note:
You can configure how many swatches vertically and horizontally you want, as well as the starter values for the generated colours.

For example, this gives you a bit of a Protools-like colour picker, at least in size :
Code:
saturation = 0.7 ; luminance_max = 0.85; luminance_min = 0.58
sw_max_x = 23    -- how many swatches horizontally
sw_max_y = 3     -- how many swatches vertically
sw_w = 16        -- swatch width
sw_h = 12        -- swatch height
sw_border = 2    -- empty around the swatches
Change those variables at the start of the script and rerun it. Presto.



Btw, this is running a different font, and a background colour I just implemented. Will update it whole thing later today.
Code:
font_main = "Verdana"
font_main_h = 19
font_helptext_h = 12
Attached Images
File Type: png Colour_Swatch_v001_20150226_2_pt-like-size.png (5.1 KB, 10595 views)
__________________
Using Latch Preview (Video) - Faderport 16 setup for CSI 1.1 , CSI 3.10
Website
"My ego comes pre-shrunk" - Randy Thom

Last edited by airon; 02-27-2015 at 11:26 AM.
airon is offline   Reply With Quote
Old 02-27-2015, 11:54 AM   #10
Seventh
Human being with feelings
 
Seventh's Avatar
 
Join Date: Sep 2010
Location: Finland
Posts: 776
Default

It's still coloring the track, if I first click on an item and then run the script. Could it figure out what I've selected last and use that as the target?

Quote:
Originally Posted by airon View Post
Since people want to name things, that should be interesting to do as well with some kind of text box.
Maybe the box can always display the name of the target track/item, which you can then double-click to rename.

Maybe this script will evolve into a comprehensive track/item appearance customization tookit. ^_^
__________________
Grey, flat and minimal theme for Reaper: Symbiosis
Seventh is offline   Reply With Quote
Old 02-27-2015, 02:07 PM   #11
J Reverb
Human being with feelings
 
Join Date: Jul 2009
Posts: 1,071
Default

Nice !
J Reverb is offline   Reply With Quote
Old 02-27-2015, 02:25 PM   #12
airon
Human being with feelings
 
airon's Avatar
 
Join Date: Aug 2006
Location: Berlin
Posts: 11,817
Default

Quote:
Originally Posted by Seventh View Post
It's still coloring the track, if I first click on an item and then run the script. Could it figure out what I've selected last and use that as the target?
Start the script first. On my end it doesn't colour anything if you start the script after selecting anything.

I'll take a look at this.

Meanwhile, I'm working on a value readout and preset system. The readout is done and I've placed the first visual hooks for the actual help pop up and preset system that'll eventually follow, but only the readout has functionality.

Oh yeah, I've added saturation boundaries too.
Code:
       R-drag for saturation upper boundary
   ALT+R-drag for saturation lower boundary
 SHIFT+R-drag for luminosity upper boundary
  CTRL+R-drag for luminosity lower boundary
Script is in the attachments.

Attached Images
File Type: png Colour_Swatch_v001_20150227_2_dev.png (6.0 KB, 10432 views)
Attached Files
File Type: lua Colour Swatch dev_150217_2 readouts.lua (20.6 KB, 937 views)
__________________
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 02-27-2015, 02:28 PM   #13
sinkmusic
Human being with feelings
 
sinkmusic's Avatar
 
Join Date: Feb 2006
Location: decepticon mothership in a hidden place inside a mountain
Posts: 3,754
Default

Nice !
Thank you
sinkmusic is offline   Reply With Quote
Old 02-27-2015, 03:12 PM   #14
Shan
Human being with feelings
 
Shan's Avatar
 
Join Date: Mar 2007
Location: Vancouver
Posts: 2,279
Default

I just wrapped up the PT color set and look. The color set is matched 1:1.



Shane
Attached Images
File Type: png PTCS.png (4.4 KB, 11119 views)
__________________
"Music should be performed by the musician not by the engineer."

Michael Wagener 25th July 2005, 02:59 PM
Shan is offline   Reply With Quote
Old 02-27-2015, 04:54 PM   #15
whiteaxxxe
Banned
 
Join Date: Jul 2014
Location: United States of Europe, Germany, Mönchengladbach
Posts: 2,047
Default

Avid will sue you for infringing copyrights.

thats all very, very nice, but where do I put the lua-script??
whiteaxxxe is offline   Reply With Quote
Old 02-27-2015, 05:17 PM   #16
Shan
Human being with feelings
 
Shan's Avatar
 
Join Date: Mar 2007
Location: Vancouver
Posts: 2,279
Default

Quote:
Originally Posted by whiteaxxxe View Post
thats all very, very nice, but where do I put the lua-script??
Put in in the Scripts folder:



Then load it in your Actions Window:



Create a Scripts folder if you don't have one. It gets created automatically when you create a new ReaScript. Version 5 only for Lua ReaScripts.

Shane
Attached Images
File Type: png sf.png (4.9 KB, 10316 views)
File Type: png load.png (8.8 KB, 10124 views)
__________________
"Music should be performed by the musician not by the engineer."

Michael Wagener 25th July 2005, 02:59 PM
Shan is offline   Reply With Quote
Old 02-28-2015, 02:00 AM   #17
gofer
-blänk-
 
gofer's Avatar
 
Join Date: Jun 2008
Posts: 11,359
Default

I am still having this issue:
Quote:
Originally Posted by gofer View Post
...parts of Reaper's UI not updating to the new color until I manually force a redraw. That's for the track manager swatches as well as the swatches in the MIDI editor's track list and the MIDI Piano Roll (if it is set to track color mode, obviously). I tried adding UpdateTimeline and Update Arrange to no success. Is this a LUA issue we should report?
In my own Python and EEL color scripts I don't do anything special to force an UI update, just the SetTrackColor function, basically like you do in this one.
(slightly edited for clearness)


Please try:
- Open Reaper's track manager view
- Select a track and use the colour swatch script to change a track's color

=> does the color swatch in track manager update for you? Mine doesn't, until I force a redraw (eg by selecting another track).

Similarly, the MIDI editor's track list doesn't update here, as well as event color in Piano roll view.

I don't have this issue using my EEL and Python scripts which essentially use the same function to change the track color, so this might be a LUA issue - if it is, it should be reported in the pre-release bug report thread (preferably by someone who actually does LUA, so not me).





Minor inconvenience encountered while looking at this:
If you clicked an item, so that the script switched to "Item" coloring, clicking on a track in the track manager list doesn't switch the script back to "Track". Selecting tracks via actions doesn't cause the script to switch back to "Track" either. The only way it seems to work is actually clicking on a TCP or MCP. Maybe it would be easier and more save to have a set of buttons on the script's GUI to do the switching.

Last edited by gofer; 02-28-2015 at 02:18 AM.
gofer is offline   Reply With Quote
Old 02-28-2015, 05:50 AM   #18
daxliniere
Human being with feelings
 
daxliniere's Avatar
 
Join Date: Nov 2008
Location: London, UK
Posts: 2,581
Default

Quote:
Originally Posted by airon View Post
Right now I'm working on a simple preset system, so your favorite swatches can be saved.
That would be awesome.

Quote:
Originally Posted by airon View Post
Since people want to name things, that should be interesting to do as well with some kind of text box.
Yes, I would name my colours according to what they represent. (drums, bass, clean GTR, distorted GTRs, FX)
This would help my assistants when they're setting up projects for me to mix.


Thanks again, can't wait to get onto the R5 boat.
__________________
Puzzle Factory Sound Studios, London [Website] [Instagram]
[AMD 5800X, 32Gb RAM, Win10x64, NVidia GTX1080ti, UAD2-OCTO, FireFaceUCX, REAPER x64]
[Feature request: More details in Undo History]
daxliniere is offline   Reply With Quote
Old 02-28-2015, 06:16 AM   #19
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

@gofer
Confirmed. (haven't tested with EEL or Python)

Very nice Airon!

Here's a little optimization thing:
Code:
function runloop()
  if gfx.mouse_cap&1 == 1 then
    if not mouse.down then
    -- The Reaper action is here
    OnMouseDown()
    end
  elseif mouse.down then 
    OnMouseUp() 
  end
  local c=gfx.getchar()
  
  -- capture mouse x-pos movements
  mouse.moving = mouse.mx ~= gfx.mouse_x -- true, if mouse x position changed
  mouse.mx = gfx.mouse_x

  -- detect selection context
  ---[[ -- which does not work yet
--if reaper.GetCursorContext2() == 0 then
  if reaper.GetCursorContext() == 0 then
    item_apply = 0 ; track_apply = 1
  elseif reaper.GetCursorContext() == 1 then
  item_apply = 1 ; track_apply = 0
--else
--  item_apply = 0 ; track_apply = 1 -- fall back on track colouring.
  end
  selection_context = (-1) * item_apply + track_apply
  if last_selection_context ~= selection_context then
    --something's changed, let's redraw
  draw_indicate_controls()
  end
  last_selection_context = selection_context
 --]]  

  
  -- Mouse + modifiers to change the three parameters
  -- saturnation, maximum luminosity and minimum luminosity
  if (gfx.mouse_cap&2 == 2) and mouse.moving then -- right-mouse button clicked down
.
.
.
spk77 is offline   Reply With Quote
Old 02-28-2015, 02:22 PM   #20
Janne83
Human being with feelings
 
Join Date: May 2010
Location: Earth
Posts: 1,883
Default

This is great. Thanks a lot to all contributors

I have a small suggestion if possible. I would add an option to set track/item back to the default color(a reset to no color), otherwise its perfect and fast to use.

Regards J
__________________
Win11, R 64bit
Janne83 is offline   Reply With Quote
Old 03-01-2015, 05:43 AM   #21
airon
Human being with feelings
 
airon's Avatar
 
Join Date: Aug 2006
Location: Berlin
Posts: 11,817
Default

Could you explain how ths line works ?

Code:
mouse.moving = mouse.mx ~= gfx.mouse_x -- true, if mouse x position changed
I'm not at my studio atm, and will continue the script development on monday.


Quote:
Originally Posted by spk77 View Post
@gofer
Confirmed. (haven't tested with EEL or Python)

Very nice Airon!

Here's a little optimization thing:
Code:
function runloop()
  if gfx.mouse_cap&1 == 1 then
    if not mouse.down then
    -- The Reaper action is here
    OnMouseDown()
    end
  elseif mouse.down then 
    OnMouseUp() 
  end
  local c=gfx.getchar()
  
  -- capture mouse x-pos movements
  mouse.moving = mouse.mx ~= gfx.mouse_x -- true, if mouse x position changed
  mouse.mx = gfx.mouse_x

  -- detect selection context
  ---[[ -- which does not work yet
--if reaper.GetCursorContext2() == 0 then
  if reaper.GetCursorContext() == 0 then
    item_apply = 0 ; track_apply = 1
  elseif reaper.GetCursorContext() == 1 then
  item_apply = 1 ; track_apply = 0
--else
--  item_apply = 0 ; track_apply = 1 -- fall back on track colouring.
  end
  selection_context = (-1) * item_apply + track_apply
  if last_selection_context ~= selection_context then
    --something's changed, let's redraw
  draw_indicate_controls()
  end
  last_selection_context = selection_context
 --]]  

  
  -- Mouse + modifiers to change the three parameters
  -- saturnation, maximum luminosity and minimum luminosity
  if (gfx.mouse_cap&2 == 2) and mouse.moving then -- right-mouse button clicked down
.
.
.
__________________
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-01-2015, 06:15 AM   #22
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Quote:
Originally Posted by airon View Post
Could you explain how ths line works ?

Code:
mouse.moving = mouse.mx ~= gfx.mouse_x -- true, if mouse x position changed
I'm not at my studio atm, and will continue the script development on monday.

This part is "true" if mouse moves horizontally:
mouse.mx ~= gfx.mouse_x

So, "mouse.moving" is true, if "mouse.mx ~= gfx.mouse_x" is true
Code:
mouse.moving = mouse.mx ~= gfx.mouse_x

Code:
mouse.moving = mouse.mx ~= gfx.mouse_x -- true, if mouse x position changed
mouse.mx = gfx.mouse_x                 -- setup variable for next pass
spk77 is offline   Reply With Quote
Old 03-01-2015, 10:43 AM   #23
djjedidiah
Human being with feelings
 
Join Date: Nov 2011
Location: Denver, CO, USA
Posts: 447
Default

Quote:
Originally Posted by Shan View Post
I just wrapped up the PT color set and look. The color set is matched 1:1.



Shane
How do I make this? I want it so bad!
djjedidiah is offline   Reply With Quote
Old 03-01-2015, 12:08 PM   #24
Shan
Human being with feelings
 
Shan's Avatar
 
Join Date: Mar 2007
Location: Vancouver
Posts: 2,279
Default

Quote:
Originally Posted by djjedidiah View Post
How do I make this? I want it so bad!
Made a few new changes today.



I sent the PT color set to airon, so he can add it to his presets of his advanced Color Swatch tool. I'll get together with him when he gets back to wrap up this simple version before releasing it.

Shane
Attached Images
File Type: png ptcp2.png (4.9 KB, 10885 views)
__________________
"Music should be performed by the musician not by the engineer."

Michael Wagener 25th July 2005, 02:59 PM
Shan is offline   Reply With Quote
Old 03-04-2015, 09:56 AM   #25
Breeder
Human being with feelings
 
Breeder's Avatar
 
Join Date: Nov 2010
Posts: 2,436
Default

It would be nice to have an option to color both selected track and item instead of using focus as a reference
Breeder is offline   Reply With Quote
Old 03-04-2015, 11:27 AM   #26
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 7,238
Default

Quote:
Originally Posted by Breeder View Post
It would be nice to have an option to color both selected track and item instead of using focus as a reference
yes. I agree.
- Both track + items selected: color track + items
- Only track selected: color track
- Only items selected: color item
- Only items selected + key combination (CTRL for example) color takes.

I think REAPER by default selects the track when you select an item. That makes it difficult to separate the track selection / item selection if you don't change the setting.
heda is offline   Reply With Quote
Old 03-05-2015, 06:30 AM   #27
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

EDIT:
Sorry I posted my gifs in the wrong thread...
(I thought I was in "some JS / EEL color stuff" -thread http://forum.cockos.com/showpost.php...6&postcount=88 - I moved the gifs there.

Finally bought a new computer (moved 499 eel files from my old computer to the new one ).

Last edited by spk77; 03-06-2015 at 04:52 AM.
spk77 is offline   Reply With Quote
Old 03-05-2015, 07:32 AM   #28
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 7,238
Default

OMG.. spk77 with a new faster computer... It is going to be a storm of new amazing scripts...
heda is offline   Reply With Quote
Old 03-05-2015, 07:57 AM   #29
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Quote:
Originally Posted by heda View Post
OMG.. spk77 with a new faster computer... It is going to be a storm of new amazing scripts...
I hope so - first I have to learn how to use Win8.1

Last edited by spk77; 03-06-2015 at 04:25 AM.
spk77 is offline   Reply With Quote
Old 03-05-2015, 08:07 AM   #30
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 7,238
Default

Quote:
Originally Posted by spk77 View Post
I hope so - first I have to learn how to use Win8.1
If you create a streaming twitch account, as mentioned in this topic http://forum.cockos.com/showthread.php?t=156200 I would be watching you coding all day

That searching tool, it would be more interesting to me if it was open source. Meanwhile, the windows search box is good enough.

now.. to not be completely off topic... Adding those sliders to the colour watch tool, is a good idea. More intuitive than using the mouse. Although using the mouse is cool. But with sliders we could set precise amounts of saturation etc.
heda is offline   Reply With Quote
Old 03-06-2015, 04:54 AM   #31
airon
Human being with feelings
 
airon's Avatar
 
Join Date: Aug 2006
Location: Berlin
Posts: 11,817
Default


Got time to tinker today, and am trying to write the preset system.

Currently I'm looking at preparing presets this way:
Code:
preset = {

  Default = { 
    colour_choice = 0      , -- 0-> generated colours, 1-colour list included in preset
    saturation_max = 0.472 ,
    saturation_min = 0.593 ,
    luminance_max = 0.95 ,
    luminance_min = 0.73 ,
    sw_max_x = 16 ,   -- how many swatches horizontally
    sw_max_y = 8  ,   -- how many swatches vertically
    sw_w = 22     ,   -- swatch width
    sw_h = 14     ,   -- swatch height
    sw_border = 1 ,   -- empty around the swatches
    bg = { r=0 , g=0 , b=0 }
    }
  Pastel = {
    colour_choice = 0    ,
    saturation_max = 0.3 ,
    saturation_min = 1.0 ,
    luminance_max = 0.95 ,
    luminance_min = 0.50 ,
    sw_max_x = 16 ,  -- how many swatches horizontally
    sw_max_y = 8  ,  -- how many swatches vertically
    sw_w = 22     ,  -- swatch width
    sw_h = 14     ,  -- swatch height
    sw_border = 1 ,  -- empty around the swatches
    bg = { r=0 , g=0 , b=0 }
    }
}
__________________
Using Latch Preview (Video) - Faderport 16 setup for CSI 1.1 , CSI 3.10
Website
"My ego comes pre-shrunk" - Randy Thom

Last edited by airon; 03-06-2015 at 05:22 AM.
airon is offline   Reply With Quote
Old 03-07-2015, 11:51 AM   #32
rluka
Human being with feelings
 
rluka's Avatar
 
Join Date: Jul 2013
Location: Edmonton, Alberta, Canada
Posts: 258
Default

Cool..cant wait to try it out

Ron L
rluka is offline   Reply With Quote
Old 03-17-2015, 07:42 AM   #33
timothys_monster
Human being with feelings
 
timothys_monster's Avatar
 
Join Date: Jan 2012
Location: Germany
Posts: 1,130
Default

Hey airon,

how far have you come with the preset system? I'm eager to try that one
timothys_monster is offline   Reply With Quote
Old 03-17-2015, 07:52 AM   #34
airon
Human being with feelings
 
airon's Avatar
 
Join Date: Aug 2006
Location: Berlin
Posts: 11,817
Default

I'm trying to use a system that parses the data as a Lua program, as detailed in the Programming For Lua book. So you're storing presets exactly like they're kept in the script, plus they're human readable and editable.

I'm getting the pieces together one scrap at a time, at least in the last week or two, so it has been slow.

I hope to keep a preset file that contains the user presets and the last used settings. If it works great, I figure it'll be usable for everyones scripts.

After that, I want to put in sliders :P. Others have done that neat stuff, so I'll copy that from there.
__________________
Using Latch Preview (Video) - Faderport 16 setup for CSI 1.1 , CSI 3.10
Website
"My ego comes pre-shrunk" - Randy Thom

Last edited by airon; 03-17-2015 at 08:14 AM.
airon is offline   Reply With Quote
Old 03-17-2015, 10:43 AM   #35
timothys_monster
Human being with feelings
 
timothys_monster's Avatar
 
Join Date: Jan 2012
Location: Germany
Posts: 1,130
Default

Sounds great! Thanks for letting us know your progress.

By the way, while working on that beauty, do you plan on integrating the docking status to be remembered?

Check heda's Notes Reader. He's done it there and it would be very helpful for the Colour Swatch as well

http://forum.cockos.com/showthread.php?t=155928
timothys_monster is offline   Reply With Quote
Old 03-20-2015, 10:20 PM   #36
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

Great script! Well done!

I don't know if this is a lot to ask, but anyway.. I would love to see two more things:
- Take colouring in addition to Track and Item
- the HEX number of a chosen colour so that we could easily use it in SWS auto colour/icon

P.S. And as if this was not already enough :P... it would be nice to have the ability to "pick" a colour of an existing item/track and be able to apply it to another track/item.
amagalma is offline   Reply With Quote
Old 03-21-2015, 05:09 AM   #37
gofer
-blänk-
 
gofer's Avatar
 
Join Date: Jun 2008
Posts: 11,359
Default

Quote:
Originally Posted by gofer View Post


Please try:
- Open Reaper's track manager view
- Select a track and use the colour swatch script to change a track's color

=> does the color swatch in track manager update for you? Mine doesn't, until I force a redraw (eg by selecting another track).

Similarly, the MIDI editor's track list doesn't update here, as well as event color in Piano roll view.

I don't have this issue using my EEL and Python scripts which essentially use the same function to change the track color, so this might be a LUA issue - if it is, it should be reported in the pre-release bug report thread (preferably by someone who actually does LUA, so not me).
Still (not) happening in pre19b/x64, but here's some additional info:

The culprit seems to be that it's a deferred script. This little test LUA script:
Code:
tr = reaper.GetSelectedTrack(0, 0)
color = 18894459
reaper.SetTrackColor (tr, color)
does update correctly everywhere, but not if run from the IDE edit window.

I wrote the same thing in py and eel as well, with the same result. No update from the IDE, but correct when run from the action window/shortcut/toolbar button. My existing python/eel color scripts behave the same. So it doesn't seem to be LUA-related at all.


Would be nice if somebody took the effort to verify whether it's indeed a defer issue and report this properly in the pre release forum.

Last edited by gofer; 03-21-2015 at 05:19 AM.
gofer is offline   Reply With Quote
Old 04-16-2015, 11:46 AM   #38
timothys_monster
Human being with feelings
 
timothys_monster's Avatar
 
Join Date: Jan 2012
Location: Germany
Posts: 1,130
Default

Just a little bump and asking how far you've come until now
timothys_monster is offline   Reply With Quote
Old 04-18-2015, 04:01 AM   #39
Slick
Human being with feelings
 
Join Date: Jun 2013
Location: Russia
Posts: 24
Default

Strange situation. other colors are selected

http://i062.radikal.ru/1504/fd/0162722571a2.gif

Mac Os 10.10, Reaper 5 pre20/64
Slick is offline   Reply With Quote
Old 04-23-2015, 02:33 AM   #40
Reno.thestraws
Human being with feelings
 
Reno.thestraws's Avatar
 
Join Date: Nov 2009
Location: Belgium
Posts: 10,474
Default

Quote:
Originally Posted by Slick View Post
Strange situation. other colors are selected

http://i062.radikal.ru/1504/fd/0162722571a2.gif

Mac Os 10.10, Reaper 5 pre20/64
any solution?
__________________
http://www.residenceemilia.com
Reno.thestraws 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 03:07 AM.


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