Old 05-23-2015, 02:37 AM   #41
xpander
Human being with feelings
 
xpander's Avatar
 
Join Date: Jun 2007
Location: Terra incognita
Posts: 5,336
Default

I bet Airon has been busy since it's been quiet on this front for a while. Getting the presets working would be nice, here's just couple of ideas to bump this in the meanwhile.

I wondered how to get some quick tips working but couldn't get tooltips. So I ended up using menus to show them. The menu is still offset, have to figure that one out. I also wanted to get my old color toolbar actions to work from this new color swatch tool, so added the actions to the top panel. Few still missing but here are some examples:




And examples from the the script:
Code:
--snip--

-- BGCOL = 0x000000

text_trackindicator = "TRACK"
text_itemindicator  = "ITEM"
text_ui             = " Help " 
text_defaultcolor   = "Default"
text_folder         = "Folder"
text_custom      =  "Custom"
text_gradient     = "Grad"
text_separation     = 8 -- pixels

--calculate text positioning and click zones
indicator_tx       = text_separation + 0
indicator_ty       = 0
indicator_ix       = text_separation + indicator_tx + gfx.measurestr 
(text_trackindicator)
indicator_iy       = 0 
ui_helpx           = text_separation*2 + indicator_ix + gfx.measurestr 
(text_itemindicator)
ui_helpy           = 0
ui_helpw,ui_helph  = gfx.measurestr (text_ui)
ui_defaultcolorx   = text_separation + ui_helpx  + gfx.measurestr (text_ui)
ui_defaultcolory   = 0
ui_folderx         = text_separation + ui_helpx  + gfx.measurestr text_ui) + gfx.measurestr (text_defaultcolor)
ui_foldery         = 0
ui_customx      = text_separation + ui_helpx  + gfx.measurestr (text_ui) + gfx.measurestr (text_defaultcolor) + gfx.measurestr (text_folder)
ui_customy      = 0
ui_gradientx      = text_separation + ui_helpx  + gfx.measurestr (text_ui) + gfx.measurestr (text_defaultcolor) + gfx.measurestr (text_folder) + gfx.measurestr (text_custom)
ui_gradienty      = 0

--snip--


function OnMouseDown()
  mouse.down=true
  mouse.ox,mouse.oy=gfx.mouse_x,gfx.mouse_y

  -- check boundaries
  if     ( mouse.ox >= zone_control[1] and mouse.oy >= zone_control[2]
       and mouse.ox <= zone_control[3] and mouse.oy <= zone_control[4] ) then
    dbug ("") -- clear console
    dbug ("Control zone selected\n")
     --do stuff about the area above the swatches
  elseif ( mouse.ox >= zone_swatch[1]  and mouse.oy >= zone_swatch[2]
       and mouse.ox <= zone_swatch[3]  and mouse.oy <= zone_swatch[4]  ) then
    dbug ("") -- clear console
    dbug ("Swatch zone selected\n")
    -- do the swatch stuff
    zone.ox = mouse.ox-sw_origin_x  -- grab the mouse position for swatch zone 

calc
    zone.oy = mouse.oy-sw_origin_y
    get_colour_swatch()         -- get the four values
    set_track_colour()          -- use the values to colour the tracks or 

items... check which one

  else -- no zone, no action but a dbug report
  dbug ("Clicked outside any usable zone\n")
  end
  
  
  --left click "Help" shows a menu with tips
 
   if   (gfx.mouse_x >=121 and gfx.mouse_y >= 0
      and gfx.mouse_x <=143 and gfx.mouse_y <=9) then
      --gfx.showmenu("#SHIFT+right drag = Luminance max.  CTRL+right drag = Luminance min.|#Right drag = Saturation max.  ALT+right drag = Saturation min.")
      gfx.showmenu(">Luminance settings|#SHIFT+right drag = max luminance|<#CTRL+right drag = min luminance|>Saturation settings|#Right drag = max saturation|<#ALT+right drag = min saturation")       
    end
  
  
  
  --left click "Default" sets selected to default color
 
   if   (gfx.mouse_x >=169 and gfx.mouse_y >= 0
      and gfx.mouse_x <=204 and gfx.mouse_y <=9) then
      cmd = reaper.NamedCommandLookup("_c72e00910bd69d4a8c4063d86f780acc");
      reaper.Main_OnCommand(cmd, 0);
          
    end
    
  
  --left click "Folder" sets children to folder color
  
  if   (gfx.mouse_x >= 221 and gfx.mouse_y >= 0
      and gfx.mouse_x <= 251 and gfx.mouse_y <=9) then
      cmd = reaper.NamedCommandLookup("_358dfc3e5c40264cbb3f1647918da77c");
      reaper.Main_OnCommand(cmd, 0);
        
    end
  
  
   --left click "Custom" opens the custom color set
  
  if   (gfx.mouse_x >= 268 and gfx.mouse_y >= 0
      and gfx.mouse_x <= 305 and gfx.mouse_y <=9) then
      cmd = reaper.NamedCommandLookup("_SWS_CUSTOMCOLALL");
      reaper.Main_OnCommand(cmd, 0);
        
    end
  
  
  --left click "Grad" sets selected to gradient colors
  
  if   (gfx.mouse_x >= 327 and gfx.mouse_y >= 0
      and gfx.mouse_x <= 349 and gfx.mouse_y <=9) then
      cmd = reaper.NamedCommandLookup("_a6c0fb7fe914544982ae7f1a2d0b83a1");
      reaper.Main_OnCommand(cmd, 0);
        
    end 
    

--snip--
xpander is online now   Reply With Quote
Old 06-12-2015, 04:42 PM   #42
Shootkin
Human being with feelings
 
Join Date: Oct 2013
Location: Russia
Posts: 251
Default sadly abandoned

Thank you airon for the excellent tool. Personally, I'm not too concerned about the presence (or absence) of presets, readouts and so on but I certainly would like to color my takes the same way as items and tracks. Is it possible to modify the script somehow? Help, please
__________________
Primal Wheel
Shootkin is online now   Reply With Quote
Old 06-15-2015, 09:19 PM   #43
airon
Human being with feelings
 
airon's Avatar
 
Join Date: Aug 2006
Location: Berlin
Posts: 10,602
Default

Certainly.

Any text editor will do.

My dev version has more stuff in it. I'll review and post a working version as quickly as I can. At the very least I wanted to have the window pop up the way the user left it the last time.

Storing a config as a Lua script proved to be hard for me. Must try harder.
__________________
Dialogue/FX Editor & Re-Recording Mixer
(Video)Using Latch Preview - Faderport16 CSI
"My ego comes pre-shrunk" - Randy Thom
airon is offline   Reply With Quote
Old 06-16-2015, 01:25 AM   #44
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 5,737
Default

remembering window position:
the only way of doing that for now it is docking the window in a docker, and floating that docker. Then you can do it to remember the docker, and the docker remembers its position and it is saved in screensets. I can help you with that part of the code if you want.
heda is offline   Reply With Quote
Old 06-16-2015, 01:37 AM   #45
Breeder
Human being with feelings
 
Breeder's Avatar
 
Join Date: Nov 2010
Location: Croatia
Posts: 2,288
Default

Quote:
Originally Posted by heda View Post
remembering window position:
the only way of doing that for now it is docking the window in a docker, and floating that docker. Then you can do it to remember the docker, and the docker remembers its position and it is saved in screensets. I can help you with that part of the code if you want.
I exported a few of win32 APIs for next SWS pre...I used it for different things, but with it you should be able to move windows around
Breeder is offline   Reply With Quote
Old 06-16-2015, 07:18 AM   #46
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 5,737
Default

Quote:
Originally Posted by Breeder View Post
I exported a few of win32 APIs for next SWS pre...I used it for different things, but with it you should be able to move windows around
great news
looking forward to it
heda is offline   Reply With Quote
Old 06-18-2015, 10:04 AM   #47
airon
Human being with feelings
 
airon's Avatar
 
Join Date: Aug 2006
Location: Berlin
Posts: 10,602
Default

I'm posting my current version of the Colour Swatch window Lua script now. It now remembers the setting you left it at when you closed the window. You can also reset the display to the default settings by clicking on the "Reset to default" text.

I decided to scratch presets until I can figure out how to store them. Not sure I want to store it all in the Reaper.ini. Writing to files is icky right now, especially since the working directory never seems to be where you start the script.

Bug fixed! thanks to Spk77
The swatches are now drawing. The Stash file has been replaced with the working version.



https://stash.reaper.fm/v/24320/Colou...atch%20dev.lua
Attached Images
File Type: png colour_swatch_window_150618.png (6.3 KB, 1101 views)
__________________
Dialogue/FX Editor & Re-Recording Mixer
(Video)Using Latch Preview - Faderport16 CSI
"My ego comes pre-shrunk" - Randy Thom

Last edited by airon; 06-18-2015 at 10:50 AM.
airon is offline   Reply With Quote
Old 06-18-2015, 10:29 AM   #48
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Quote:
Originally Posted by airon View Post
I'm posting my current version of the Colour Swatch window Lua script now. It now remembers the setting you left it at when you closed the window. You can also reset the display to the default settings by clicking on the "Reset to default" text.

I decided to scratch presets until I can figure out how to store them. Not sure I want to store it all in the Reaper.ini. Writing to files is icky right now, especially since the working directory never seems to be where you start the script.

Bug!
For some reason, the swatches are not drawing though everything else works great. I need help here. Maybe someone can spot the bug I can't seem to find ?

https://stash.reaper.fm/v/24320/Colou...atch%20dev.lua

"sw_a" is nil for some reason. That's why they don't show up:
Code:
function draw_swatches()
    local k,i = 1,1
    local j = sw_max_x*sw_max_y
    sw_count_x , sw_count_y = 0,0
    for k=1, j, 1 do -- name+ 3*colour numbers per swatch
      i= 1 + (k-1)*4 -- sw_table index to access the data
    --while sw_table[i] do -- this would draw all swatches, even off screen
      -- grab the data from the table
    
      sw_name,sw_r,sw_g,sw_b = sw_table[i], sw_table[i+1], sw_table[i+2], sw_table[i+3]
  
      sw_x = sw_origin_x + sw_count_x * (sw_w + sw_border) -- calculate drawing
      sw_y = sw_origin_y + sw_count_y * (sw_h + sw_border) -- coordinates
      gfx.set  (sw_r, sw_g, sw_b, sw_a)                      -- set colour from data
.
.
.
Quote:
Originally Posted by airon View Post
Not sure I want to store it all in the Reaper.ini.
Yes, that would be very difficult if there are "tables in tables". I don't know how they should be stored in an ini file.

Last edited by spk77; 06-18-2015 at 10:37 AM.
spk77 is offline   Reply With Quote
Old 06-18-2015, 10:47 AM   #49
airon
Human being with feelings
 
airon's Avatar
 
Join Date: Aug 2006
Location: Berlin
Posts: 10,602
Default

Thanks. I've updated the Stash upload with a fixed version. Fixed a few little things concerning updates of the window when you click on the reset text.

Re-enabled default swatch colour variable assignments, which includes the alpha. Debug messages are off too.
__________________
Dialogue/FX Editor & Re-Recording Mixer
(Video)Using Latch Preview - Faderport16 CSI
"My ego comes pre-shrunk" - Randy Thom

Last edited by airon; 06-18-2015 at 11:04 AM.
airon is offline   Reply With Quote
Old 06-18-2015, 01:46 PM   #50
sambosun
Human being with feelings
 
Join Date: Aug 2011
Posts: 170
Default

Sorry for that dump question but is that script OS independent? Will it work on Mac OS?
sambosun is offline   Reply With Quote
Old 06-18-2015, 03:22 PM   #51
airon
Human being with feelings
 
airon's Avatar
 
Join Date: Aug 2006
Location: Berlin
Posts: 10,602
Default

Yes, the script will work on OSX and Windows, and possibly even Linux.

Since it is a Lua script, it does require Reaper v5 or up. That's the only requirement. Lua is built in to Reaper 5.

And you're free to modify it as well. Go nuts . Lots of folks already have.
__________________
Dialogue/FX Editor & Re-Recording Mixer
(Video)Using Latch Preview - Faderport16 CSI
"My ego comes pre-shrunk" - Randy Thom
airon is offline   Reply With Quote
Old 06-18-2015, 03:25 PM   #52
airon
Human being with feelings
 
airon's Avatar
 
Join Date: Aug 2006
Location: Berlin
Posts: 10,602
Default

Quote:
Originally Posted by spk77 View Post
Yes, that would be very difficult if there are "tables in tables". I don't know how they should be stored in an ini file.
I tried to use the approach of saving the data as a Lua script, i.e. using the serializing examples from the Programming Lua book in the Data Structure section.

The problem is I can't create a new file. Something is either not right, or I'm not doing it correctly. I constantly get errors about the file not being writable.

With a mechanism like that, it would be easy to save presets. Now the script will at least remember the last setting, and nobody has to start from scratch every time they call it up.
__________________
Dialogue/FX Editor & Re-Recording Mixer
(Video)Using Latch Preview - Faderport16 CSI
"My ego comes pre-shrunk" - Randy Thom
airon is offline   Reply With Quote
Old 06-18-2015, 03:37 PM   #53
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 5,737
Default

I think it would be easier to use SetExtState functions to write to the ini file.

reaper.SetExtState(string section, string key, string value, boolean persist)

with persist parameter as true, it will be saved in reaper-extstate.ini
heda is offline   Reply With Quote
Old 06-19-2015, 03:02 AM   #54
Sumalc
Human being with feelings
 
Join Date: Oct 2009
Location: France
Posts: 580
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
Same here OS 10.6 frustrating ;-)
Sumalc is offline   Reply With Quote
Old 06-19-2015, 11:22 AM   #55
airon
Human being with feelings
 
airon's Avatar
 
Join Date: Aug 2006
Location: Berlin
Posts: 10,602
Default

Have you tried the newest version ?

Perhaps I need to check for the operating system and set the font accordingly as well.
__________________
Dialogue/FX Editor & Re-Recording Mixer
(Video)Using Latch Preview - Faderport16 CSI
"My ego comes pre-shrunk" - Randy Thom
airon is offline   Reply With Quote
Old 06-19-2015, 11:23 AM   #56
airon
Human being with feelings
 
airon's Avatar
 
Join Date: Aug 2006
Location: Berlin
Posts: 10,602
Default

Quote:
Originally Posted by heda View Post
I think it would be easier to use SetExtState functions to write to the ini file.

reaper.SetExtState(string section, string key, string value, boolean persist)

with persist parameter as true, it will be saved in reaper-extstate.ini
Might do that for presets. I'm currently storing the last used configuration that way when the user closes the window(or Reaper).
__________________
Dialogue/FX Editor & Re-Recording Mixer
(Video)Using Latch Preview - Faderport16 CSI
"My ego comes pre-shrunk" - Randy Thom
airon is offline   Reply With Quote
Old 06-19-2015, 11:46 AM   #57
Sumalc
Human being with feelings
 
Join Date: Oct 2009
Location: France
Posts: 580
Default

Quote:
Originally Posted by airon View Post
Have you tried the newest version ?

Perhaps I need to check for the operating system and set the font accordingly as well.
Yes ( v001.3 - 2015.06.18_1)
Sumalc is offline   Reply With Quote
Old 06-19-2015, 01:47 PM   #58
airon
Human being with feelings
 
airon's Avatar
 
Join Date: Aug 2006
Location: Berlin
Posts: 10,602
Default

I've uploaded the last version I edited this morning. It may be that you got a version that sat between the first upload and the last replacement.

The first post in this thread has been updated as well.

https://stash.reaper.fm/v/24328/Colour%20Swatch.lua

If this works the same way for you, we should report this as a possible bug in the OSX version of Reapers Lua, and post that report in the pre-release forum for Reaper 5.0rc1. That is the version I tested it on, Win7 Pro, Reaper x64.
__________________
Dialogue/FX Editor & Re-Recording Mixer
(Video)Using Latch Preview - Faderport16 CSI
"My ego comes pre-shrunk" - Randy Thom

Last edited by airon; 06-19-2015 at 01:54 PM.
airon is offline   Reply With Quote
Old 06-19-2015, 02:39 PM   #59
Sumalc
Human being with feelings
 
Join Date: Oct 2009
Location: France
Posts: 580
Default

i have download the last script : https://stash.reaper.fm/v/24328/Colour%20Swatch.lua
sorry but no change, color for track/item is not the same as it is selected in the color swatch.
Sumalc is offline   Reply With Quote
Old 06-19-2015, 03:55 PM   #60
bluzkat
Human being with feelings
 
bluzkat's Avatar
 
Join Date: Jun 2007
Posts: 6,919
Default

A little late to the party!

Thanks for the script, Airon. My first, and a definite keeper.


__________________
Peace...
bluzkat
bluzkat is offline   Reply With Quote
Old 06-20-2015, 01:15 AM   #61
airon
Human being with feelings
 
airon's Avatar
 
Join Date: Aug 2006
Location: Berlin
Posts: 10,602
Default

Quote:
Originally Posted by Sumalc View Post
i have download the last script : https://stash.reaper.fm/v/24328/Colour%20Swatch.lua
sorry but no change, color for track/item is not the same as it is selected in the color swatch.
Thanks for testing. That is OSX 10.6 on your end. Which version of Reaper ? i386 or x64 ?

Could we get more reports from OSX users ? That would help bringing it up as a possible bug. I'll dig out my old Mbp and test as well.
__________________
Dialogue/FX Editor & Re-Recording Mixer
(Video)Using Latch Preview - Faderport16 CSI
"My ego comes pre-shrunk" - Randy Thom
airon is offline   Reply With Quote
Old 06-20-2015, 01:39 AM   #62
Slick
Human being with feelings
 
Join Date: Jun 2013
Location: Russia
Posts: 24
Default

Quote:
Originally Posted by airon View Post
Thanks for testing. That is OSX 10.6 on your end. Which version of Reaper ? i386 or x64 ?

Could we get more reports from OSX users ? That would help bringing it up as a possible bug. I'll dig out my old Mbp and test as well.
mac os 10.10.3, Reaper RC2, same
http://www.imageup.ru/img257/2158351/11.gif.html
Slick is offline   Reply With Quote
Old 06-20-2015, 02:06 AM   #63
airon
Human being with feelings
 
airon's Avatar
 
Join Date: Aug 2006
Location: Berlin
Posts: 10,602
Default

So either the colour is not being applied properly by Reaper , or the script has to use a slightly different colour format.

The colour format , the order in which red, green, blue and alpha are passed to Reaper, was a problem before. There is a variable that controls the format of the colour almost at the top of the script.

Could someone try changing that and report the results ? I will try that myself once I get home today.
__________________
Dialogue/FX Editor & Re-Recording Mixer
(Video)Using Latch Preview - Faderport16 CSI
"My ego comes pre-shrunk" - Randy Thom
airon is offline   Reply With Quote
Old 06-20-2015, 04:54 AM   #64
Sumalc
Human being with feelings
 
Join Date: Oct 2009
Location: France
Posts: 580
Default

Quote:
Originally Posted by airon View Post
Thanks for testing. That is OSX 10.6 on your end. Which version of Reaper ? i386 or x64 ?

Could we get more reports from OSX users ? That would help bringing it up as a possible bug. I'll dig out my old Mbp and test as well.
You are welcome (last V5 RC2 and yes OSX 10.6 x64)
Sumalc is offline   Reply With Quote
Old 06-20-2015, 06:48 AM   #65
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Here's a simple test script (for OSX users) to see if the color order for "SetColor" -functions is RGB:
Code:
r=255
g=0
b=0

color = r + g*256 + b*65536
reaper.SetTrackColor(reaper.GetTrack(0,0), color)
reaper.SetMediaItemInfo_Value(reaper.GetMediaItem(0,0), "I_CUSTOMCOLOR", color|16777216)
First track/item should be colored red after running this script (works on Win 8.1 -> order=RGB):
spk77 is offline   Reply With Quote
Old 06-20-2015, 06:52 AM   #66
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 5,737
Default

I also have an issue getting track colors for my loudness graph script. it seems it is not getting the color correctly in MAC but it is good in Windows PC. I don't understand why.

Code:
RGB = reaper.GetMediaTrackInfo_Value(track, "I_CUSTOMCOLOR")
R = RGB & 255
G = (RGB >> 8) & 255
B = (RGB >> 16) & 255
R = R/255
G = G/255
B = B/255
gfx.set(R,G,B,1,0) -- set color
gfx.rect(0,0,50,50) -- test paint rectangle
heda is offline   Reply With Quote
Old 06-20-2015, 07:41 AM   #67
Sumalc
Human being with feelings
 
Join Date: Oct 2009
Location: France
Posts: 580
Default

Quote:
Originally Posted by spk77 View Post
Here's a simple test script (for OSX users) to see if the color order for "SetColor" -functions is RGB:
Code:
r=255
g=0
b=0

color = r + g*256 + b*65536
reaper.SetTrackColor(reaper.GetTrack(0,0), color)
reaper.SetMediaItemInfo_Value(reaper.GetMediaItem(0,0), "I_CUSTOMCOLOR", color|16777216)
First track/item should be colored red after running this script (works on Win 8.1 -> order=RGB):
i get this error while trying running script :
Error: /Users/r/Library/Application Support/REAPER/Scripts/test couleur.eel:2: syntax error: 'g='
Sumalc is offline   Reply With Quote
Old 06-20-2015, 07:43 AM   #68
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 5,737
Default

Quote:
Originally Posted by Sumalc View Post
i get this error while trying running script :
Error: /Users/r/Library/Application Support/REAPER/Scripts/test couleur.eel:2: syntax error: 'g='
it's not EEL. It's Lua
save it as .lua extension and try again
heda is offline   Reply With Quote
Old 06-20-2015, 07:52 AM   #69
Sumalc
Human being with feelings
 
Join Date: Oct 2009
Location: France
Posts: 580
Default

Thank you Heda.
Done, i get blue color.

Last edited by Sumalc; 10-24-2019 at 10:46 AM.
Sumalc is offline   Reply With Quote
Old 06-20-2015, 07:58 AM   #70
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Quote:
Originally Posted by Sumalc View Post
Thank you Heda.
Done, i get blue color.
Thanks! It seems "SetColor" -functions on OSX expects color value to be "int BGR".
spk77 is offline   Reply With Quote
Old 06-20-2015, 08:01 AM   #71
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

@Sumalc could you try to change

these values (in the test script):
Code:
r=255
g=0
b=0
to this:

Code:
r=0
g=0
b=255

(Now the track/item should be red on OSX, I think)
spk77 is offline   Reply With Quote
Old 06-20-2015, 08:06 AM   #72
Sumalc
Human being with feelings
 
Join Date: Oct 2009
Location: France
Posts: 580
Default

Bravo, yes i get the red color ;-)
Sumalc is offline   Reply With Quote
Old 06-20-2015, 08:12 AM   #73
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

@Sumalc

Ok

Try to change line28 in "Airon's color tool"...

...from
Code:
colour_order_for_reaper = 0
to
Code:
colour_order_for_reaper = 1
...and it should work. (as Airon mentioned in post#63)
spk77 is offline   Reply With Quote
Old 06-20-2015, 08:18 AM   #74
Sumalc
Human being with feelings
 
Join Date: Oct 2009
Location: France
Posts: 580
Default

congratulation ;-) it work for track (but not item for the moment)

Last edited by Sumalc; 06-20-2015 at 08:35 AM.
Sumalc is offline   Reply With Quote
Old 06-20-2015, 08:29 AM   #75
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 5,737
Default

should we fix our scripts for this color thing on Macs then? or wait for a fix from devs?
heda is offline   Reply With Quote
Old 06-20-2015, 09:09 AM   #76
airon
Human being with feelings
 
airon's Avatar
 
Join Date: Aug 2006
Location: Berlin
Posts: 10,602
Default

The devs have to fix this.

It's a Reaper problem and we shouldn't bloat our programs to accomodate a Reaper bug.
__________________
Dialogue/FX Editor & Re-Recording Mixer
(Video)Using Latch Preview - Faderport16 CSI
"My ego comes pre-shrunk" - Randy Thom
airon is offline   Reply With Quote
Old 06-20-2015, 09:23 AM   #77
Breeder
Human being with feelings
 
Breeder's Avatar
 
Join Date: Nov 2010
Location: Croatia
Posts: 2,288
Default

Quote:
Originally Posted by airon View Post
It's a Reaper problem and we shouldn't bloat our programs to accomodate a Reaper bug.
If you plan on waiting on Cockos to fix this one for you, you might get it tomorrow or you might wait a really long time, no telling really... Since it's already fixable by users I wouldn't get my hopes up...Not to mention that "fixing" these functions could potentially break old code. So if they fix it, they will probably give us different API to deal with it.
Simply ask REAPER if script is running on Win or OSX and act accordingly.
Breeder is offline   Reply With Quote
Old 06-25-2015, 10:35 PM   #78
airon
Human being with feelings
 
airon's Avatar
 
Join Date: Aug 2006
Location: Berlin
Posts: 10,602
Default

Fix by Cockos apparently not necessary.

Passing an integer calculated from normalized r,g,b values as r+g*256+b*65536 does the trick. No hexfuckery necessary.

In fact, it was the API doc that confused everybody, though I still need confirmation from OSX users that this fix works.

The script has been updated and resides in the same location:

v1.42 - 2015.06.26
https://stash.reaper.fm/v/24328/Colour%20Swatch.lua




Fixed: colour now passed as an integer calculated from normalized rgb values (r+g*256+b*65536)
Fixed: clicking the most bottom and right pixels in the lower right corner could produce a script error
Added help text. Click on the Help text on the window to get a little dropdown.

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 to Default"

Detects the selection focus and indicates this in the top row with a TRACK or ITEM text highlighted in red

Control saturation and luminosity boundaries
by Right-Click and Dragging
Upper Saturation SHIFT+rightdrag
Lower Saturation CTRL+rightdrag
Upper Luminosity rightdrag
Lower Luminosity ALT+rightdrag"
__________________
Dialogue/FX Editor & Re-Recording Mixer
(Video)Using Latch Preview - Faderport16 CSI
"My ego comes pre-shrunk" - Randy Thom

Last edited by airon; 06-26-2015 at 12:50 AM.
airon is offline   Reply With Quote
Old 06-26-2015, 01:27 AM   #79
Sumalc
Human being with feelings
 
Join Date: Oct 2009
Location: France
Posts: 580
Default

Hello Airon,
doesn't work here (last V5 RC2 and OSX 10.6 x64)
colors are "reversed" and right click stuff doesn't work too, but it was the case also before.

Edit : I am sorry i have not understood the way using mouse, now it's ok.
but color order problem still there.

Last edited by Sumalc; 06-26-2015 at 01:40 AM.
Sumalc is offline   Reply With Quote
Old 06-26-2015, 02:39 AM   #80
daxliniere
Human being with feelings
 
daxliniere's Avatar
 
Join Date: Nov 2008
Location: London, UK
Posts: 1,966
Default

Hey Airon,
I've just made the switch to R5 now that it's feature frozen.
Thanks so much for this great tool!

I'm looking to replace EvilDragon's colour toolbar, so I would like to use an alternate version of this script which displays only 16-20 pre-determined colours that cannot be changed. What would I need to do to create this?
I'd also like to be able to name those colours (drums, bass, guitars, FX...). I recall you had that functionality in the early version of this script, right?

Also, is there a way to make this script automatically open on startup of REAPER?


Thanks again!
__________________
Dax Liniere
London's newest premium studio complex! (Facebook)
[i7-4790K, 12Gb RAM, Win8.1x64, NVidia GT710, UAD2-OCTO, FireFaceUFX, REAPER x64]
daxliniere 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:16 PM.


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