Go Back   Cockos Incorporated Forums > REAPER Forums > JSFX and ReaScript Discussion

Reply
 
Thread Tools Display Modes
Old 03-18-2017, 04:08 PM   #1
amagalma
Human being with feelings
 
Join Date: Apr 2011
Posts: 723
Default ReaNoir: Utility to color tracks/items/takes (REAchelangelo MOD)

Hello!

This script is a modification of the excellent script by Spacemen Tree.

As requested by Spacemen Tree, I copy paste this from his original thread:

Quote:
Originally Posted by Spacemen Tree

-------------------------

It was almost 6 months since I put up my first scripts here.
My Bday is coming up so I thought I'd make my scripts freeware.

Nevertheless, donations made to the non-profit shelters listed below will be greatly appreciated.

I do appreciate those that sent me donations directly via my email but grateful as I am (and I am) I would prefer if you'd donate directly to the shelters.

Thank you for your generosity and all the best.

---------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------


União Zoófila
-------------
http://www.uniaozoofila.org/

Associação CãoViver
-------------------
http://www.associacaocaoviver.org/

Associação Gato de Rua
----------------------
http://gato-de-rua.blogspot.pt/

Associação Guadi
----------------
http://www.associacaoguadi.blogspot.pt/

PRAVI
-----
http://veracupido.wix.com/pravi-org

Missão Patas Felizes
--------------------
http://patasfelizes.blogs.sapo.pt/

Refúgio dos Burros
------------------
http://www.refugiodosburros.org/

NAAAS
-----
http://www.naaas.pt/

ABRA
----
http://www.abra.org.pt/a-abra/donativos.html


These animal shelters are always in need of donations for buying food and taking care of vet bills, among other things.
The stray animals situation in Portugal is bad to worst and since these shelters only manage to run on volunteer work, they can only do so much...

So, give a little. You can make a difference, small as your donation may be!

Click on one or more of the links above and find your preferred method for giving. Most sites I linked have Paypal, IBAN, etc. Just look for it.
Also, all of the shelters I linked are on Facebook, if you'd like to drop them a line.
-------------------------------------------------------------
Kind of a manual / Overview:
-- - Palette of 24 colors (Color Boxes) + 1 temporary (Temporary - the big color box on top)
-- - Left-click a Color Box to Color Tracks, Items or Takes and set it as Temporary
-- - Tracks/Items are recognized automatically according to what was lastly clicked while the Takes mode is set manually by the user
-- - Right-click a Color Box to save the Temporary color into that box
-- - Load/save different user palettes (.txt files)
-- - Left-click Save button to Save current palette or Right-Click to Save As
-- - Left-click Load button to load a new palette or Right-Click to load the default palette
-- - Set the Temporary color to the color of a track/item/take according to what was lastly clicked (Get Color button)
-- - Show Hex name of Temporary color
-- - Left-click Hex name to enter a Hex color code manually (formats: 123456, #123456, # 123456 & 0x123456)
-- - Right-click Hex name to paste it to the clipboard for use with SWS Auto Color/Icons
-- - Palette is automatically saved to last_palette_on_exit.txt as a backup. If you try to load last_palette_on_exit, then you are prompted to save it with a new name.
-- - Left-click Darker/Brighter buttons to make Temporary Color brighter or darker. Right-click them to make it black/white
-- - Script saves user palettes in a directory called ReaNoir in the same path as the script. Preferences are saved to ExtState
-- - Click Load SWS button to load SWSColor files
-- - Click SWS Colors button to open the SWS Color Management tool
-- - Ability to dock the script to the left or to the right
-- - Right-click sliders' area to toggle between RGB and HSL mode
-- - Information displayed on top of ReaNoir when hovering mouse over buttons/sliders
-------------------------------------------------------------
UPDATE:
* v1.66 (2017-03-29)
+ Fixed bug when Getting Color in HSL mode
* v1.65 (2017-03-29)
+ Takes mode button is now green to contrast the manual mode with Tracks/Items mode (red) which is automatic
+ Information displayed on top of ReaNoir when hovering mouse over buttons/sliders
* v1.63 (2017-03-27)
+ No more annoying pop-up when changing mode between RGB<->HSL
* v1.62 (2017-03-27)
+ Reanoir opens in the correct folders when loading SWSColors or user palettes (thanks Lokasenna! )
* v1.61 (2017-03-26)
+ fixed bug when trying to save a palette loaded from an SWSColor file
* v1.60 (2017-03-26)
+ added HSL sliders - right click sliders' area to toggle
* v1.50 (2017-03-25)
+ preliminary work for HSL mode for sliders (coming in next version)
+ fixed bug when entering hex numbers
* v1.45 (2017-03-25)
+ when script opens, if the previous loaded file was SWSColor, it gets loaded as an "unsaved palette"
+ corrected gradient creation for SWSColor files
* v1.42 (2017-03-24)
+ ReaNoir does not steal focus when firstly launched
* v1.41 (2017-03-24)
+ improved docking
* v1.40 (2017-03-24)
+ improvement for ReaNoir not stealing focus
+ ReaNoir remembers last window position
+ fixed some bugs
* v1.35 (2017-03-23)
+ various optimizations in the code
+ swapped order of LoadSWS and SWS Colors so that LoadSWS is on the left side like the Load button
+ better error handling
+ ReaNoir does not steal focus from Reaper
* v1.30 (2017-03-22)
+ Added button to open SWS Color Management
+ Added ability and button to import SWSColor files (16 colors & 8 gradient colors)
* v1.20 (2017-03-22)
+ Added buttons to make temporary color brighter or darker (HSL luminance +- 3.3%)
* v1.15 (2017-03-21)
+ Right-click Temporary Color (big color box) to reset color to default
* v1.1 (2017-03-21)
+ fixed crash if not placed in same folder with original script
+ moved Preferences to ExtState
+ various bug fixes
+ changed name to ReaNoir
-------------------------------------------------------------
Download latest version here: http://stash.reaper.fm/30262/ReaNoir.lua
OR Get it via ReaPack! (recommended!!!)



I hope you like it!

Last edited by amagalma; Today at 12:55 PM.
amagalma is offline   Reply With Quote
Old 03-18-2017, 05:09 PM   #2
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 3,909
Default

Nice updates for a beautiful scripts -P thanks yiu and spaceman tree for that !
X-Raym is offline   Reply With Quote
Old 03-20-2017, 03:51 PM   #3
amagalma
Human being with feelings
 
Join Date: Apr 2011
Posts: 723
Default

Thank you X-Raym..

There are still a couple of things I want to add... When I find the time
amagalma is offline   Reply With Quote
Old 03-20-2017, 04:34 PM   #4
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Posts: 41
Default

Looks cool!

FYI, tested on clean portable install and got error,
lua:981: bad argument #1 to 'open' (string expected, got nil)

Maybe you can add error trap if Preferences.txt and/or other file(s) are missing on first use?
Edgemeal is offline   Reply With Quote
Old 03-20-2017, 05:49 PM   #5
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 3,909
Default

Quote:
FYI, tested on clean portable install and got error,
lua:981: bad argument #1 to 'open' (string expected, got nil)

Maybe you can add error trap if Preferences.txt and/or other file(s) are missing on first use?
Confirmed, I had to put it in the same folder than the original script folder.
X-Raym is offline   Reply With Quote
Old 03-21-2017, 05:04 AM   #6
Gianfini
Human being with feelings
 
Join Date: Jan 2015
Posts: 301
Default

Nice. As next step I would suggest error management and better palette management with a sort of palette history

EDIT: Could you implement importing .SWSColor files? (they only have 16 colors so they would fill in the first 16, but numbers are in decimal notation not hex)

thanks
g

Last edited by Gianfini; 03-21-2017 at 05:14 AM.
Gianfini is offline   Reply With Quote
Old 03-21-2017, 06:18 AM   #7
Gianfini
Human being with feelings
 
Join Date: Jan 2015
Posts: 301
Default

Additional requests
- could you make it possible to reset the color for take/items (e.g. by right click on the big color box)?
- could you make it possible to openthe standard Windows color management tool to set a color (e.g. by double clicking or Ctrl-click any color box)?

thanks
great job so far
g
Gianfini is offline   Reply With Quote
Old 03-21-2017, 10:06 AM   #8
amagalma
Human being with feelings
 
Join Date: Apr 2011
Posts: 723
Default

Thank you guys for trying it!

I have uploaded the new version. Check the first post in the thread. It should give you no more errors. All preferences are stored and recalled to/from the ExtState.

@Gianfini: I will make a "reset to default color" function (done!). I will look if I can import .SWSColor files too. (done!) Palette history.. I don't think I need it..So, no plans for this.. Open the standard Windows color management tool.. If I implement opening of .SWSColor files, then this is not needed as well. Plus, I am afraid that it is too difficult to implement for my knowledge

Last edited by amagalma; 03-21-2017 at 08:33 PM.
amagalma is offline   Reply With Quote
Old 03-21-2017, 11:03 AM   #9
amagalma
Human being with feelings
 
Join Date: Apr 2011
Posts: 723
Default

21/3/2017: + Right-click Temporary Color (big color box) to reset color to default
amagalma is offline   Reply With Quote
Old 03-21-2017, 12:05 PM   #10
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 3,909
Default

@amalgama
Next big thing is Reapack friendly version :P
X-Raym is offline   Reply With Quote
Old 03-21-2017, 12:30 PM   #11
amagalma
Human being with feelings
 
Join Date: Apr 2011
Posts: 723
Default

I have added the required header, I think.. Have a look and tell me if it is ok.

On another note, does anyone have any Lua functions for RGBtoHSL and HSLtoRGB?
amagalma is offline   Reply With Quote
Old 03-21-2017, 12:47 PM   #12
Vincent Sermonne
Human being with feelings
 
Vincent Sermonne's Avatar
 
Join Date: Feb 2009
Location: Marseille France
Posts: 4,775
Default

Thank you ! It is in place now in my Reaper, the best one for the colors choice, it is very useful tool.
__________________
Vincent
http://www.tchackpoum.fr
Vincent Sermonne is online now   Reply With Quote
Old 03-21-2017, 01:10 PM   #13
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 3,909
Default

@amalgama
I put them on the original Reachelangelo thread. :P
X-Raym is offline   Reply With Quote
Old 03-21-2017, 02:04 PM   #14
amagalma
Human being with feelings
 
Join Date: Apr 2011
Posts: 723
Default

@ Vincent Sermonne: Thank you!

@X-Raym: I have found them but they seem not to work.. rgbToHsl() seems to return nil for saturation..

Any ideas?
amagalma is offline   Reply With Quote
Old 03-21-2017, 02:10 PM   #15
amagalma
Human being with feelings
 
Join Date: Apr 2011
Posts: 723
Default

Code:
-- https://github.com/EmmanuelOga/columns/blob/master/utils/color.lua

--[[
 * Converts an RGB color value to HSL. Conversion formula
 * adapted from http://en.wikipedia.org/wiki/HSL_color_space.
 * Assumes r, g, and b are contained in the set [0, 255] and
 * returns h, s, and l in the set [0, 1].
 *
 * @param   Number  r       The red color value
 * @param   Number  g       The green color value
 * @param   Number  b       The blue color value
 * @return  Array           The HSL representation
]]
function rgbToHsl(r, g, b, a)
  r, g, b = r / 255, g / 255, b / 255

  local max, min = math.max(r, g, b), math.min(r, g, b)
  local h, s, l

  l = (max + min) / 2

  if max == min then
    h, s = 0, 0 -- achromatic
  else
    local d = max - min
    local s
    if l > 0.5 then s = d / (2 - max - min) else s = d / (max + min) end
    if max == r then
      h = (g - b) / d
      if g < b then h = h + 6 end
    elseif max == g then h = (b - r) / d + 2
    elseif max == b then h = (r - g) / d + 4
    end
    h = h / 6
  end

  return h, s, l, a or 255
end

--[[
 * Converts an HSL color value to RGB. Conversion formula
 * adapted from http://en.wikipedia.org/wiki/HSL_color_space.
 * Assumes h, s, and l are contained in the set [0, 1] and
 * returns r, g, and b in the set [0, 255].
 *
 * @param   Number  h       The hue
 * @param   Number  s       The saturation
 * @param   Number  l       The lightness
 * @return  Array           The RGB representation
]]
function hslToRgb(h, s, l, a)
  local r, g, b

  if s == 0 then
    r, g, b = l, l, l -- achromatic
  else
    function hue2rgb(p, q, t)
      if t < 0   then t = t + 1 end
      if t > 1   then t = t - 1 end
      if t < 1/6 then return p + (q - p) * 6 * t end
      if t < 1/2 then return q end
      if t < 2/3 then return p + (q - p) * (2/3 - t) * 6 end
      return p
    end

    local q
    if l < 0.5 then q = l * (1 + s) else q = l + s - l * s end
    local p = 2 * l - q

    r = hue2rgb(p, q, h + 1/3)
    g = hue2rgb(p, q, h)
    b = hue2rgb(p, q, h - 1/3)
  end

  return r * 255, g * 255, b * 255, a * 255
end
--------------------------------------------------------------------------------
function Msg(name)
-- usage: Msg('') // put inside the '' what you want to get
  local value = _G[name]
  for i=1,math.huge do
    local localname, localvalue = debug.getlocal(2,i,1)
    if not localname then
      break -- no more locals to check
    elseif localname == name then
      value = localvalue
    end
  end
  if value then
    reaper.ShowConsoleMsg(string.format("%s = %s", name, tostring(value)).."\n")
  else
    reaper.ShowConsoleMsg(string.format("No variable named '%s' found.", name).."\n")
  end
end


----------------------------------------- TEST ---------------------------------
red = 120
green = 200
blue = 40

hue, sat, lum = rgbToHsl(red, green, blue)
Msg('hue')
Msg('sat')
Msg('lum')
Try this code to see

Edit: Found the mistake in his code: there is a "local s" that should not exist

Last edited by amagalma; 03-21-2017 at 02:34 PM.
amagalma is offline   Reply With Quote
Old 03-21-2017, 02:37 PM   #16
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 3,909
Default

@amalgama
I use ths functions in a script but I modified them, indeed,

Here what was my reaper-friendly code snippet

ReaScripts-Templates/X-Raym_Colors RGB and HSL.lua at master · ReaTeam/ReaScripts-Templates
X-Raym is offline   Reply With Quote
Old 03-21-2017, 03:24 PM   #17
amagalma
Human being with feelings
 
Join Date: Apr 2011
Posts: 723
Default

UPDATE:
22/3/2017: v1.20
+ added buttons to make temporary color darker or brighter (or black/white)

- Left-click Darker/Brighter buttons to make Temporary Color brighter or darker. Right-click them to make them black/white
amagalma is offline   Reply With Quote
Old 03-21-2017, 07:18 PM   #18
amagalma
Human being with feelings
 
Join Date: Apr 2011
Posts: 723
Default

UPDATE:
22/3/2017: v1.30
+ Added button to open SWS Color Management
+ Added ability and button to import SWSColor files (16 colors & 8 gradient colors)

The 16 SWS Colors get loaded to the 16 first colorboxes while the rest 8 colorboxes get loaded with the gradient colors specified in the SWSColor file.

Could someone knowledgeable have a look at the code and improve the gradient mechanism? Thanks!
amagalma is offline   Reply With Quote
Old 03-22-2017, 01:46 AM   #19
Gianfini
Human being with feelings
 
Join Date: Jan 2015
Posts: 301
Default

Really great job!!!!!!!

Latest request, then this will definitely substitute color management in Reaper
- Saved palettes should be retrieved not only via LOAD and browsing folders, but they should be available in a drop-down list for quick and easy retrieval (e.g. like plugin presets). So if I save 10 palettes and want to retrieve one, instead of hitting load and browsing folders I'd rather choose it from a list
- (second priority only if not difficult) ability to recall the "old" color management (see pics below) when ctrl-click on single color square, to tweak it. This would give access to HSL, basic color set, and the current loaded custom colors (to pick from in case one want to swap position of colors)



EDIT: on topic 1 above, another easier way is to make LOAD button always open in the right folder (Script/ReaNoir). Now it opens in the last open folder, so the SWS folder if I loaded an SWS theme


thanks

Last edited by Gianfini; 03-22-2017 at 05:28 AM.
Gianfini is offline   Reply With Quote
Old 03-22-2017, 02:00 AM   #20
Gianfini
Human being with feelings
 
Join Date: Jan 2015
Posts: 301
Default Focus...

Another request: after opening the script and after each click on it, it should give back focus to Reaper not keep it.

In fact now if I choose a color, I cannot hit space to start play, because I have to select REaper window first to give it the focus...

Again this would improve this behavior: I assigned key stroke 'C' to the script. I hit once and it opens. I set it up to close the terminate the script when launching it again (instead of creating another instance) because I wanted to hit 'C' again and close it.

Unfortunately the focus is on the ReaNoir windows so if I hit C nothing happens, I have to click on Reaper main windows first.

Could you make something about it?

g
Gianfini is offline   Reply With Quote
Old 03-22-2017, 02:02 AM   #21
Gianfini
Human being with feelings
 
Join Date: Jan 2015
Posts: 301
Default ...and position

and very last for today

- could you make ReaNoir remember the last position and open in that position instead than top - left as it does now? That would be killer!

Sorry for bothering you, hope I'm helping to get the very best color management tool for Reaper that should definitely enter each one toolbar!

g
Gianfini is offline   Reply With Quote
Old 03-22-2017, 03:59 AM   #22
Distressor
Human being with feelings
 
Join Date: Mar 2017
Posts: 26
Default

It would also be cool to have a reset switch to reset to the default color.

Awesome tool btw!
Distressor is offline   Reply With Quote
Old 03-22-2017, 05:24 AM   #23
Gianfini
Human being with feelings
 
Join Date: Jan 2015
Posts: 301
Default

Quote:
Originally Posted by Distressor View Post
It would also be cool to have a reset switch to reset to the default color.

Awesome tool btw!
You have it: just right click the LOAD button

g
Gianfini is offline   Reply With Quote
Old 03-22-2017, 05:30 AM   #24
Gianfini
Human being with feelings
 
Join Date: Jan 2015
Posts: 301
Default small bugs

ERROR1
If you try to open a "wrong" file with LOAD this errors comes up

...\AppData\Roaming\REAPER\Scripts\ReaNoir.lua:115 7: attempt to perform arithmetic on a nil value (global 'hex2rgbR')

ERROR2
If you SAVE a new color set (right click on save) and after putting a new name you hit ENTER instead of clicking OK with the mouse, another SAVE AS window pops up

g
Gianfini is offline   Reply With Quote
Old 03-22-2017, 10:51 AM   #25
Distressor
Human being with feelings
 
Join Date: Mar 2017
Posts: 26
Default

Quote:
Originally Posted by Gianfini View Post
You have it: just right click the LOAD button
i meant a reset for the default item/take/track color.

Say you colorised a bunch of items and later decide to get rid of the color coding.
There's the "set item to default color" action but it would be great to do all coloring from the same menu.
Distressor is offline   Reply With Quote
Old 03-22-2017, 10:51 AM   #26
hopi
Human being with feelings
 
hopi's Avatar
 
Join Date: Oct 2008
Location: Right Hear
Posts: 11,588
Default

I like this lua a lot... one problem is I cannot seem to get to actually go into a dock...

I do try that in the lua's options but nothing seems to happen
__________________
You don't have to agree with me, but it will go a lot easier on you if you do http://tinyurl.com/cr7o7yl
hopi is offline   Reply With Quote
Old 03-22-2017, 01:27 PM   #27
Fabian
Human being with feelings
 
Fabian's Avatar
 
Join Date: Sep 2008
Location: Sweden
Posts: 5,011
Default

Nice thing! Thanks.
Could we have it remembering its last coordinates? Here it always opens in the upper left corner on the wrong screen.
__________________
// MVHMF
Vote for the Starter Marker FR here http://forum.cockos.com/project.php?issueid=4371
Let's finally get rid of those ugly odd time measures.
Fabian is offline   Reply With Quote
Old 03-23-2017, 04:09 AM   #28
Gianfini
Human being with feelings
 
Join Date: Jan 2015
Posts: 301
Default

Quote:
Originally Posted by Distressor View Post
i meant a reset for the default item/take/track color.

Say you colorised a bunch of items and later decide to get rid of the color coding.
There's the "set item to default color" action but it would be great to do all coloring from the same menu.
Select the items and right click on the big square on top of Reanoir. Right click eliminates color selection for items / track

G
Gianfini is offline   Reply With Quote
Old 03-23-2017, 02:17 PM   #29
amagalma
Human being with feelings
 
Join Date: Apr 2011
Posts: 723
Default

UPDATE:

v1.35 (2017-03-23)

+ various optimizations in the code
+ swapped order of LoadSWS and SWS Colors so that LoadSWS is on the left side like the Load button
+ better error handling
+ ReaNoir does not steal focus from Reaper
amagalma is offline   Reply With Quote
Old 03-23-2017, 02:21 PM   #30
Vincent Sermonne
Human being with feelings
 
Vincent Sermonne's Avatar
 
Join Date: Feb 2009
Location: Marseille France
Posts: 4,775
Default

Quote:
Originally Posted by amagalma View Post
UPDATE:

v1.35 (2017-03-23)

+ various optimizations in the code
+ swapped order of LoadSWS and SWS Colors so that LoadSWS is on the left side like the Load button
+ better error handling
+ ReaNoir does not steal focus from Reaper
for do the update, it is do with the reapack synchro ?
__________________
Vincent
http://www.tchackpoum.fr
Vincent Sermonne is online now   Reply With Quote
Old 03-23-2017, 02:23 PM   #31
amagalma
Human being with feelings
 
Join Date: Apr 2011
Posts: 723
Default

No, it is not yet in ReaPack. Just click the link in the first post
amagalma is offline   Reply With Quote
Old 03-23-2017, 02:27 PM   #32
hopi
Human being with feelings
 
hopi's Avatar
 
Join Date: Oct 2008
Location: Right Hear
Posts: 11,588
Default

thanks but still have a couple issues:

1- I cannot get it to go into a Dock, even though it says it will...

2- when closing it and calling it open again, it always shows up at the top left of the screen...

IMO it would be better if, at least, it would re-open where it was when last closed...

and again... actually being able to have it live in a dock would be very helpful

I do thank you for this lua ...it is nice to use
__________________
You don't have to agree with me, but it will go a lot easier on you if you do http://tinyurl.com/cr7o7yl
hopi is offline   Reply With Quote
Old 03-23-2017, 02:30 PM   #33
amagalma
Human being with feelings
 
Join Date: Apr 2011
Posts: 723
Default

Quote:
Originally Posted by Gianfini View Post
Really great job!!!!!!!

- Saved palettes should be retrieved not only via LOAD and browsing folders, but they should be available in a drop-down list for quick and easy retrieval (e.g. like plugin presets). So if I save 10 palettes and want to retrieve one, instead of hitting load and browsing folders I'd rather choose it from a list
I am sorry, but I do not have the knowledge to do this, nor the time to investigate how it could be done. If anyone is willing to hack the code and implement it, then be my guest!

Quote:
- (second priority only if not difficult) ability to recall the "old" color management (see pics below) when ctrl-click on single color square, to tweak it. This would give access to HSL, basic color set, and the current loaded custom colors (to pick from in case one want to swap position of colors)
- Again, I do not know how could this be done, nor I have the time for investigation .. However, you have the two SWS buttons on top. You can simply open the SWS Color Management, make your palette with the Windows-provided tool, save it as SWSColor file and then import it and save it in ReaNoir!

Quote:
EDIT: on topic 1 above, another easier way is to make LOAD button always open in the right folder (Script/ReaNoir). Now it opens in the last open folder, so the SWS folder if I loaded an SWS theme
- This is a better solution, which I am going to investigate and hopefully implement

Quote:
- could you make ReaNoir remember the last position and open in that position instead than top - left as it does now? That would be killer!
- It is one of my intentions. Will do it as soon as I learn how it can be done! :P
amagalma is offline   Reply With Quote
Old 03-23-2017, 02:32 PM   #34
amagalma
Human being with feelings
 
Join Date: Apr 2011
Posts: 723
Default

Quote:
Originally Posted by Fabian View Post
Nice thing! Thanks.
Could we have it remembering its last coordinates? Here it always opens in the upper left corner on the wrong screen.

Quote:
Originally Posted by hopi View Post
thanks but still have a couple issues:

1- I cannot get it to go into a Dock, even though it says it will...

2- when closing it and calling it open again, it always shows up at the top left of the screen...

IMO it would be better if, at least, it would re-open where it was when last closed...

and again... actually being able to have it live in a dock would be very helpful

I do thank you for this lua ...it is nice to use
These issues, for the time, are beyond my capabilities but I 'll try to solve them!
amagalma is offline   Reply With Quote
Old 03-23-2017, 05:04 PM   #35
amagalma
Human being with feelings
 
Join Date: Apr 2011
Posts: 723
Default

UPDATE

* v1.40 (2017-03-24)
+ improvement for ReaNoir not stealing focus
+ ReaNoir remembers last window position
+ fixed some bugs
amagalma is offline   Reply With Quote
Old 03-23-2017, 05:11 PM   #36
amagalma
Human being with feelings
 
Join Date: Apr 2011
Posts: 723
Default

Quote:
Originally Posted by JamesPeters View Post
Thank you very much for making this script! I love how it "remembers" the original color and can be restored with right-clicking the large color square. It allows you to quickly try various colors and compare (and then restore the original after all that if you want).

I just realized it has (probably) a bug or two:

1) When only the track is selected but no items or take is selected (only the TCP area) when running the script, choosing "get color" gives this error message:

"(path to script)/ReaNoir.lua:859: attempt to perform arithmetic on a nil value (global 'R')"

2) As above, when only the track is selected but no items or take is selected (only the TCP area), if you change TCP color you can't make it "remember" the original TCP color (it mistakenly "remembers" the original color in the ReaNoir large square, which is 636363). So it isn't automatically "getting" the TCP color so it can "remember" it later.
Thank you!

1) Should be fixed in version 1.40
2) I am afraid I cannot understand.. Right-clicking the Temporary Color Box does not remember any previous color but simply loads the default color depending on what is selected
amagalma is offline   Reply With Quote
Old 03-23-2017, 06:31 PM   #37
amagalma
Human being with feelings
 
Join Date: Apr 2011
Posts: 723
Default

UPDATE
24/3/2017: v1.41
+ improved docking
amagalma is offline   Reply With Quote
Old 03-23-2017, 07:21 PM   #38
hopi
Human being with feelings
 
hopi's Avatar
 
Join Date: Oct 2008
Location: Right Hear
Posts: 11,588
Default

Thank you very much for making the improvements!

EDIT: progress it does remember it's own window position now...

but it still does not go into the dock or docker

also... I think there is some confusion [maybe mine?] about what is an Item and what is a Take
If I have a single MIDI item on a track.. that to me is an Item ...not a take
If I have multiple 'takes' of MIDI ...all done in the same time space of that MIDI Item... then those are
'takes' ...at least that is my understanding...

So this lua currently does not seem to follow that logic as I would expect... Perhaps I am seeing it wrong???
__________________
You don't have to agree with me, but it will go a lot easier on you if you do http://tinyurl.com/cr7o7yl

Last edited by hopi; 03-23-2017 at 07:29 PM.
hopi is offline   Reply With Quote
Old 03-23-2017, 07:45 PM   #39
amagalma
Human being with feelings
 
Join Date: Apr 2011
Posts: 723
Default

Quote:
Originally Posted by JamesPeters View Post
Error message is gone, thanks!



-TCP is colored purple to start.
-ReaNoir is started (it has color 636363 in the top square by default), "get color" from TCP works (it captures the purple 8000FF color).
-Use ReaNoir to color TCP green 63A363 (it works).
-Right-click in top square to "remember" original purple color of TCP changes TCP to the color that ReaNoir starts with in that square (636363).

For items, this behavior is different. I don't even need to "get (current) color" of item/take for ReaNoir to remember it. If I change color of item/take with ReaNoir, then right-click in the top square, it "remembers" what the item was before I used ReaNoir. This doesn't work for TCP.
Right click big color box is NOT for remembering previous color. It is to set color to default ( no custom color). Get Color button is useful in following scenario: let's say a friend gives you a reaper file and he has applied a color to a track that you like. You press Get Color and this color is set to the big color box. If you left click big color box, other tracks, items get this color. If you want to keep it, then right click one of the 24 boxes and it will be saved there
amagalma is offline   Reply With Quote
Old 03-23-2017, 07:49 PM   #40
amagalma
Human being with feelings
 
Join Date: Apr 2011
Posts: 723
Default

Quote:
Originally Posted by hopi View Post
Thank you very much for making the improvements!

EDIT: progress it does remember it's own window position now...

but it still does not go into the dock or docker

also... I think there is some confusion [maybe mine?] about what is an Item and what is a Take
If I have a single MIDI item on a track.. that to me is an Item ...not a take
If I have multiple 'takes' of MIDI ...all done in the same time space of that MIDI Item... then those are
'takes' ...at least that is my understanding...

So this lua currently does not seem to follow that logic as I would expect... Perhaps I am seeing it wrong???
Try to place it once yourself to the place you want it. Does it then dock correctly?

Regarding takes:... An empty item has no takes.. Other items (audio or midi) have one or more takes
amagalma 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:53 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.