|
|
|
06-14-2016, 09:42 AM
|
#281
|
Human being with feelings
Join Date: Jul 2013
Location: Hamilton, Ontario, Canada
Posts: 7
|
I'm having the same problem as bigjoe. When I try to run the script I get this message:
...\Scripts\ReaTeam Scripts\Various\Airon_Colour Swatch.lua:839: attempt to perform arithmetic on a nil value (global 'sw_border')
FYI - I'm using REAPER v5.201, Windows 10 on an Intel i7 chip.
|
|
|
06-14-2016, 10:24 AM
|
#282
|
Human being with feelings
Join Date: Aug 2012
Location: Finland
Posts: 2,668
|
@moonand6 and bigjoe,
It seem to happen when the script is run for the first time.
Here's a (quick) fix: - open the script in text editor -> go to line 782
- add the blue text (see the code below)
Code:
-- Start fresh
function colour_swatch_init()
--dbug ("") -- clear console
gfx.clear = -1
gfx.dest = -1 -- set default if not yet done
-- this version has this set to 0
-- Do we retrieve settings from the saved external state
-- or from the default preset
if use_default == 1 then
settings_from_preset(preset_default)
save_current_settings() -- and save them
elseif save_settings_on_exit == 1 then
if reaper.HasExtState(r_ini_strsection,"generate_colour") then
generate_colour = tonumber(reaper.GetExtState(r_ini_strsection, "generate_colour"))
else
settings_from_preset(preset_default)
end
if generate_colour == 1 then
--dbug ("Saved state exists\n")
retrieve_and_set_last_used_setting()
-- should the generate_colour be set differently in the default preset
-- use the default preset instead of the saved values.
-- this is done so we can test scripts with different presets using
-- the same Reaper external state saves.
if generate_colour ~= preset_default.generate_colour then
settings_from_preset(preset_default)
end
end
end
|
|
|
06-14-2016, 10:43 AM
|
#283
|
Human being with feelings
Join Date: Aug 2012
Location: Finland
Posts: 2,668
|
Quote:
Originally Posted by airon
Thank you. How does one commit a new version ? Do I need to apply with the repository owner ?
|
Do you have a github account? Maybe you should join the ReaTeam
X-Raym, mpl, cfillion and juliansader etc. probably know more about the github. (I haven't used it much yet.)
|
|
|
06-14-2016, 10:51 AM
|
#284
|
Human being with feelings
Join Date: May 2010
Location: Norway
Posts: 7,318
|
Thanks for considering ReaTeam Airon.
It's such a brilliant thing
__________________
Reaper x64, win 11
Composer, text-writer, producer
Bandcamp
|
|
|
06-14-2016, 11:26 AM
|
#285
|
Human being with feelings
Join Date: Jul 2013
Location: Hamilton, Ontario, Canada
Posts: 7
|
@spk77 Thank you! It works perfectly now. Cheers!
Quote:
Originally Posted by spk77
@moonand6 and bigjoe,
It seem to happen when the script is run for the first time.
Here's a (quick) fix: - open the script in text editor -> go to line 782
- add the blue text (see the code below)
Code:
-- Start fresh
function colour_swatch_init()
--dbug ("") -- clear console
gfx.clear = -1
gfx.dest = -1 -- set default if not yet done
-- this version has this set to 0
-- Do we retrieve settings from the saved external state
-- or from the default preset
if use_default == 1 then
settings_from_preset(preset_default)
save_current_settings() -- and save them
elseif save_settings_on_exit == 1 then
if reaper.HasExtState(r_ini_strsection,"generate_colour") then
generate_colour = tonumber(reaper.GetExtState(r_ini_strsection, "generate_colour"))
else
settings_from_preset(preset_default)
end
if generate_colour == 1 then
--dbug ("Saved state exists\n")
retrieve_and_set_last_used_setting()
-- should the generate_colour be set differently in the default preset
-- use the default preset instead of the saved values.
-- this is done so we can test scripts with different presets using
-- the same Reaper external state saves.
if generate_colour ~= preset_default.generate_colour then
settings_from_preset(preset_default)
end
end
end
|
Last edited by moonand6; 06-14-2016 at 11:27 AM.
Reason: typo
|
|
|
06-16-2016, 02:31 AM
|
#286
|
Human being with feelings
Join Date: Jun 2015
Posts: 323
|
works like a charm!!! Thank you guys!! you're great!
|
|
|
09-06-2016, 02:21 PM
|
#287
|
Human being with feelings
Join Date: Nov 2008
Location: London, UK
Posts: 2,583
|
Hey Airon,
Would you be able to add 'copy colour' and 'paste colour' buttons to these scripts, please? (P.S. I use the list version)
Thanks for listening!
Dax.
This is currently how I copy/paste colours from track to track:
Code:
# Track color: Copy color of first selected track (save to file in temp directory)
# Copies color of the first selected track to a file in temp file directory (so it can be pasted to other tracks with "Track color clipboard paste.py)
# by gofer
import tempfile
trackColor = RPR_GetTrackColor( RPR_GetSelectedTrack(0, 0) )
outFile = open( tempfile.gettempdir() + "/ReaScript_customcolor.txt", 'w' )
outFile.write( str(trackColor) )
outFile.close()
Code:
# Track color: Paste copied track color to all selected tracks
# sets all selected tracks to the color saved with "Track color copy.py "
# by gofer
import tempfile
try:
color = int( open( tempfile.gettempdir() + "/ReaScript_customcolor.txt" ).readline() )
for i in range( RPR_CountSelectedTracks(0) ):
RPR_SetTrackColor(RPR_GetSelectedTrack(0, i), color | 16777216)
except:
pass
|
|
|
09-07-2016, 02:31 AM
|
#288
|
Human being with feelings
Join Date: Aug 2006
Location: Berlin
Posts: 11,818
|
Until I get to this, anyone is free to create their own versions and share them with anyone.
So if anyone wants to give this a try, feel free to do so. Have the code checked over by the others here and I will have absolutely no problem with replacing the version in the repository, so ReaPack users can auto-update the script.
I'll be too busy with mixing and research to give this a go for the next two weeks at least. Many others here are way better than me at implementing buttons anyway.
|
|
|
09-07-2016, 03:11 AM
|
#289
|
Human being with feelings
Join Date: Nov 2008
Location: London, UK
Posts: 2,583
|
Hey Airon,
No worries, or course. BTW, I was thinking it could just be text at the top of the window to the right of the track and item indicators (with a healthy space between).
|
|
|
11-15-2016, 09:34 AM
|
#290
|
Human being with feelings
Join Date: Dec 2010
Posts: 3,826
|
This doesn't work, done the update to the script as suggested by spk77
It loads now, but does absolutely nothing at all (OSX)
The only thing that happens is if you press reset it moves the ui hahaha
Is this just another case of Reaper is crap on OSX (There are lots of them)
Edit*
Nevermind, it works after reloading windows, i cant use it for what i need.
__________________
Stop posting huge images, smaller images or thumbnail, it's not rocket science!
Last edited by Win Conway; 11-15-2016 at 09:56 AM.
|
|
|
02-22-2017, 10:44 AM
|
#291
|
Human being with feelings
Join Date: Aug 2011
Location: Southeast Michigan
Posts: 260
|
Please forgive my ignorance, but, does this script allow me to select a color from a box instead of on the swatch - for ease of repeatability?
__________________
Reaper 6.13/64 - Audient iD14 Interface-Mac Mini 2.3Ghz i7, 16GB RAM 256GB SSD (OS,apps) & 1TB HDD (data), OS X 10.14.6 - Macbook Pro 2.2Ghz i7, 4 GB RAM, 256GB SSD (OS,apps) OS X 10.13.6 - Presonus Faderport
|
|
|
02-22-2017, 08:35 PM
|
#292
|
Human being with feelings
Join Date: Nov 2008
Location: London, UK
Posts: 2,583
|
Quote:
Originally Posted by Warrior
Please forgive my ignorance, but, does this script allow me to select a color from a box instead of on the swatch - for ease of repeatability?
|
Yep, that's the version I use. There's more set up required as you have to pick your own colors (and name them), but only once.
|
|
|
02-23-2017, 01:49 AM
|
#293
|
Human being with feelings
Join Date: Sep 2009
Posts: 863
|
Quote:
Originally Posted by Warrior
Please forgive my ignorance, but, does this script allow me to select a color from a box instead of on the swatch - for ease of repeatability?
|
Open the script in a text editor (preferable one that has Lua highlighting syntax, like Notepad++ or similar).
Scroll down to line 99, from here to line 114 you can set the default appearance.
These settings will create 4 rows of 16 colours
Code:
preset_default = { generate_colour = 1 , -- 1-> generated colours, 0->colour list included in preset
saturation_max = 1.0 ,
saturation_min = 0.75 ,
luminance_max = 0.75 ,
luminance_min = 0.25 ,
sw_max_x = 16 , -- # of swatches horizontally
sw_max_y = 4 , -- # of swatches vertically
sw_w = 24 , -- swatch width
sw_h = 24 , -- swatch height
sw_border = 2, -- area around the swatches in pixels
bg_r=0.1 , -- background behind the swatches
bg_g=0.1 ,
bg_b=0.1,
csv_colour_list = 0 -- no colour list here
}
Save and reload in Reaper.
Rob
|
|
|
02-23-2017, 04:28 AM
|
#294
|
Human being with feelings
Join Date: Nov 2015
Location: Germany
Posts: 1,016
|
You can do that inside of REAPER, if you mark the script in the actionlist and choose "edit". In the script the lines right above your Quote^^^ explain how. Copied from script:
Code:
-- ### IF YOU CHANGE THIS, to see your changes ###
-- ### close the script window, ###
-- ### relaunch the script and hit Reset ###
-- ###############################################
preset_default = { generate_colour = 1 , -- 1-> generated colours, 0->colour list included in preset
Just to tell...
|
|
|
02-23-2017, 06:31 AM
|
#295
|
Human being with feelings
Join Date: Sep 2009
Posts: 863
|
Quote:
Originally Posted by Pet
You can do that inside of REAPER, if you mark the script in the actionlist and choose "edit". In the script the lines right above your Quote^^^ explain how. Copied from script:
Just to tell...
|
Ha, good catch, Pet.
I recommended using an external editor because as far as I know, the internal editor doesn't support line numbers and I gave a line number reference for the edits.
If it does support them, I'd be interested to know how to display them
Cheers
Rob
|
|
|
05-28-2017, 03:19 AM
|
#296
|
Human being with feelings
Join Date: Dec 2013
Posts: 134
|
I can't get this to run either :-(
The error im getting is:-
Colour Swatch.lua:835: attempt to perform arithmetic on a nil value (global 'sw_border')
Which i searched for on every page in this topic with no luck, I tried the below but got a new error:-
Colour Swatch.lua:1040: 'end' expected (to close 'if' at line 59) near <eof>
Any help would be greatly appreciated :-)
Quote:
Originally Posted by spk77
@moonand6 and bigjoe,
It seem to happen when the script is run for the first time.
Here's a (quick) fix: - open the script in text editor -> go to line 782
- add the blue text (see the code below)
Code:
-- Start fresh
function colour_swatch_init()
--dbug ("") -- clear console
gfx.clear = -1
gfx.dest = -1 -- set default if not yet done
-- this version has this set to 0
-- Do we retrieve settings from the saved external state
-- or from the default preset
if use_default == 1 then
settings_from_preset(preset_default)
save_current_settings() -- and save them
elseif save_settings_on_exit == 1 then
if reaper.HasExtState(r_ini_strsection,"generate_colour") then
generate_colour = tonumber(reaper.GetExtState(r_ini_strsection, "generate_colour"))
else
settings_from_preset(preset_default)
end
if generate_colour == 1 then
--dbug ("Saved state exists\n")
retrieve_and_set_last_used_setting()
-- should the generate_colour be set differently in the default preset
-- use the default preset instead of the saved values.
-- this is done so we can test scripts with different presets using
-- the same Reaper external state saves.
if generate_colour ~= preset_default.generate_colour then
settings_from_preset(preset_default)
end
end
end
|
__________________
REAPER 5.961/64 - Komplete Audio 6/Internal Sound
iMac == OSX El Captain 10.11.6 - 3.4 GHz Intel Core i7 - 20gb 1600 MHz DDR3
MacBook Pro = OSX Sierra 10.12.6 - 2.3 GHz Intel Core i7 - 16gb 1600 MHz DDR3
|
|
|
05-29-2017, 10:56 PM
|
#297
|
Human being with feelings
Join Date: Apr 2017
Posts: 11
|
Can anybody make FL 12 Studio Color Switch Map?
or where I can read about making color switcher
Thanks!!
|
|
|
05-31-2017, 12:12 PM
|
#298
|
Human being with feelings
Join Date: Aug 2006
Location: Berlin
Posts: 11,818
|
Did you guys get the Colour Swatch script here or via the Reapack extension. That one is very stable as far as I can tell.
But please, if the version from the Reapack repositories is faulty, I want to know, as I'm sure do others here who contributed and/or use the script.
|
|
|
05-31-2017, 12:14 PM
|
#299
|
Human being with feelings
Join Date: Aug 2006
Location: Berlin
Posts: 11,818
|
Quote:
Originally Posted by Bar Kimura
Can anybody make FL 12 Studio Color Switch Map?
or where I can read about making color switcher
|
You can create your own palette with the other big colour picker script.
Search for ReaNoir . That's a great tool. YOu can save and load palettes for that. Very flexible too.
|
|
|
05-31-2017, 02:16 PM
|
#300
|
Human being with feelings
Join Date: Dec 2013
Posts: 134
|
Quote:
Originally Posted by airon
Did you guys get the Colour Swatch script here or via the Reapack extension. That one is very stable as far as I can tell.
But please, if the version from the Reapack repositories is faulty, I want to know, as I'm sure do others here who contributed and/or use the script.
|
I downloaded it via this page yes, just done it via Reapack Extension and its working great!
Thx for the heads up and thx for the script man!
Cheers! :-D
__________________
REAPER 5.961/64 - Komplete Audio 6/Internal Sound
iMac == OSX El Captain 10.11.6 - 3.4 GHz Intel Core i7 - 20gb 1600 MHz DDR3
MacBook Pro = OSX Sierra 10.12.6 - 2.3 GHz Intel Core i7 - 16gb 1600 MHz DDR3
|
|
|
06-02-2017, 12:21 PM
|
#301
|
Human being with feelings
Join Date: Aug 2006
Location: Berlin
Posts: 11,818
|
I updated the first post to include both a link to Reapack as well as an updated version of the script on the stash.
|
|
|
06-02-2017, 12:51 PM
|
#302
|
Human being with feelings
Join Date: Nov 2015
Location: Germany
Posts: 1,016
|
Thanks for the update and for the script itself!
This is my must-have-I-use-it-daily script!
|
|
|
07-10-2017, 09:25 AM
|
#303
|
Human being with feelings
Join Date: Aug 2006
Location: Berlin
Posts: 11,818
|
One user wants to recreate the colour picker of FL Studio 12.
What does that look like ?
|
|
|
08-17-2017, 12:59 PM
|
#304
|
Human being with feelings
Join Date: Jun 2009
Location: Croatia
Posts: 24,793
|
|
|
|
09-22-2017, 07:51 PM
|
#305
|
Human being with feelings
Join Date: Jun 2009
Posts: 277
|
I'm checking this out now, how do I configure the picker to display a discrete colour palette? Thanks
BTW that FL Studio colour picker, I can't fathom why anyone would want that, the colour selection is quite unpopular even among FL Studio users themselves...
|
|
|
09-23-2017, 01:48 AM
|
#306
|
Human being with feelings
Join Date: Jul 2009
Posts: 3,714
|
Quote:
Originally Posted by Scoox
I'm checking this out now, how do I configure the picker to display a discrete colour palette? Thanks.
|
Some instructions are given in post 293 above.
|
|
|
09-23-2017, 06:19 AM
|
#307
|
Human being with feelings
Join Date: Jul 2009
Posts: 3,714
|
There appears to be two small bugs in v1.61 of Airon_Colour Swatch.lua in ReaPack, which prevent the mouse from accessing the GUI's menu bar:
* Line 626 uses "generate_color" instead of "generate_colour"
* The "end" in line 604 should move to line 631
|
|
|
09-23-2017, 08:09 AM
|
#308
|
Human being with feelings
Join Date: Jun 2009
Posts: 277
|
Quote:
Originally Posted by juliansader
Some instructions are given in post 293 above.
|
That worked, thank you. There seems to be a bug because the "Lum" and "Sat" info in the top-right corner of the GUI is static and when I resize the window it goes away and doesn't show up again until I click Reset. I've hacked the code to not display any info.
I've tried to get the picker to look similar to Cubase's colour picker (a one-dimensional picker with a small selection of very distinct colours), but using the automatically generated colours I couldn't fathom the combination of values that would give me the desired result, so I've given up and just used the code suggested above. I read the words "colour presets" somewhere, that might do the trick.
Is there any way to get the picker to pop-up when I left-click a track number (but not when I click other areas of a track header)? That would be the icing on the cake.
|
|
|
09-23-2017, 08:36 AM
|
#309
|
Human being with feelings
Join Date: Jul 2009
Posts: 3,714
|
Quote:
Originally Posted by Scoox
Is there any way to get the picker to pop-up when I left-click a track number (but not when I click other areas of a track header)? That would be the icing on the cake.
|
Not AFAIK. But you can link the script to a mouse modifier + double-click on the track control panel.
|
|
|
09-23-2017, 08:56 AM
|
#310
|
Human being with feelings
Join Date: Jun 2009
Posts: 277
|
Quote:
Originally Posted by juliansader
Not AFAIK. But you can link the script to a mouse modifier + double-click on the track control panel.
|
Hmmm that's already assigned to selecting all items on the track. Maybe with a modifier combination. Oh well, one day.
|
|
|
09-23-2017, 08:44 PM
|
#311
|
Human being with feelings
Join Date: Feb 2017
Posts: 305
|
Thank you alot Airon for your tool!
Do you think about to do stretchable window for that?
|
|
|
10-02-2017, 04:51 PM
|
#312
|
Human being with feelings
Join Date: Aug 2006
Location: Berlin
Posts: 11,818
|
It's probably fairly easy to add stretching windows. I just do not know how yet.
Does anyone know a script that does this, that I can check out ?
|
|
|
10-02-2017, 05:14 PM
|
#313
|
Human being with feelings
Join Date: May 2015
Location: Québec, Canada
Posts: 4,955
|
You can use gfx.w and gfx.h to get the current size of the window and draw accordingly to fill the entire space.
|
|
|
10-31-2017, 04:31 PM
|
#314
|
Human being with feelings
Join Date: Oct 2017
Location: Black Forest
Posts: 5,061
|
Is there a way to remember the position of the colour swatch window?
|
|
|
11-30-2017, 04:38 AM
|
#315
|
Human being with feelings
Join Date: Jul 2014
Posts: 634
|
Hi ¡¡¡
Is there a way to go back to the old palete ?¿?
at least for me is very hard pick more that once the same colour .
Thanks ¡¡
|
|
|
11-30-2017, 05:43 AM
|
#316
|
Human being with feelings
Join Date: Sep 2009
Posts: 863
|
Quote:
Originally Posted by airon
It's probably fairly easy to add stretching windows. I just do not know how yet.
Does anyone know a script that does this, that I can check out ?
|
Eugen created a GUI template that implements proper drag-to-resize. I butchered it for my randomiser script and removed the stretching and replaced it with fixed step scaling because it's difficult to make fonts resize and look nice when the gui is stretched arbitrarily on x and y axis.
Anyway, Eugen's template is here : https://github.com/EUGEN27771/ReaScr...%20scripts.lua and is relatively easy to parse.
For a fixed step approach, use a scale multiplier (0.8, 0.9, 1.0, 1.5, etc...) instead of using all intermediate values; Store the original drawing coordinates at 100% so that they can be referenced when the scale changes. Midi Ex Machina.lua does this, although the code is hard to pick thru... if you want the gist of it, I can dig it out, just let me know.
|
|
|
12-04-2017, 11:27 AM
|
#317
|
Human being with feelings
Join Date: Nov 2015
Location: Germany
Posts: 1,016
|
Quote:
Originally Posted by ecl
Is there a way to go back to the old palete ?¿
|
Hi ecl,
modify the script with e.g NP++ starting at "preset_default = { generate_colour = 1 , -- 1-> generated colours, 0->colour list included in preset"
I modified the code from Color Swatch.lua v001.50-2016.03.06 and saved the script as "Color Swatch Box.lua".
It looks like this to get boxes/grid back:
Code:
preset_default = { generate_colour = 1 , -- 1-> generated colours, 0->colour list included in preset
saturation_max = 1.000 ,
saturation_min = 0.500 ,
luminance_max = 0.78 ,
luminance_min = 0.2 ,
sw_max_x = 22 , -- how many swatches horizontally
sw_max_y = 4 , -- how many swatches vertically
sw_w = 26 , -- swatch width
sw_h = 20 , -- swatch height
sw_border = 3, -- empty around the swatches
bg_r=0.1 , -- background behind the swatches
bg_g=0.1 ,
bg_b=0.1 }
HTH,
Peter
Edit: Oops, Robu mentioned that already in post 293
Last edited by Pet; 12-06-2017 at 04:14 PM.
|
|
|
12-06-2017, 02:14 AM
|
#318
|
Human being with feelings
Join Date: Jul 2014
Posts: 634
|
Quote:
Originally Posted by Pet
Hi ecl,
modify the script with e.g NP++ starting at "preset_default = { generate_colour = 1 , -- 1-> generated colours, 0->colour list included in preset"
I modified the code from Color Swatch.lua v001.50-2016.03.06 and saved the script as "Color Swatch Box.lua".
It looks like this to get boxes/grid back:
Code:
preset_default = { generate_colour = 1 , -- 1-> generated colours, 0->colour list included in preset
saturation_max = 1.000 ,
saturation_min = 0.500 ,
luminance_max = 0.78 ,
luminance_min = 0.2 ,
sw_max_x = 22 , -- how many swatches horizontally
sw_max_y = 4 , -- how many swatches vertically
sw_w = 26 , -- swatch width
sw_h = 20 , -- swatch height
sw_border = 3, -- empty around the swatches
bg_r=0.1 , -- background behind the swatches
bg_g=0.1 ,
bg_b=0.1 }
HTH,
Peter
|
Thanks a lot ¡¡¡
I'll Try and let you Know ¡¡
|
|
|
02-20-2018, 01:15 PM
|
#319
|
Human being with feelings
Join Date: Jul 2010
Location: Slovakia
Posts: 2,588
|
Hi, I'm getting this with the latest 1.61 version via reapack.
Airon_Colour Swatch.lua:298: bad argument #1 to 'gmatch' (string expected, got nil)
|
|
|
02-25-2018, 01:58 PM
|
#320
|
Human being with feelings
Join Date: Jul 2014
Posts: 634
|
Quote:
Originally Posted by Pet
Hi ecl,
modify the script with e.g NP++ starting at "preset_default = { generate_colour = 1 , -- 1-> generated colours, 0->colour list included in preset"
I modified the code from Color Swatch.lua v001.50-2016.03.06 and saved the script as "Color Swatch Box.lua".
It looks like this to get boxes/grid back:
Code:
preset_default = { generate_colour = 1 , -- 1-> generated colours, 0->colour list included in preset
saturation_max = 1.000 ,
saturation_min = 0.500 ,
luminance_max = 0.78 ,
luminance_min = 0.2 ,
sw_max_x = 22 , -- how many swatches horizontally
sw_max_y = 4 , -- how many swatches vertically
sw_w = 26 , -- swatch width
sw_h = 20 , -- swatch height
sw_border = 3, -- empty around the swatches
bg_r=0.1 , -- background behind the swatches
bg_g=0.1 ,
bg_b=0.1 }
HTH,
Peter
Edit: Oops, Robu mentioned that already in post 293
|
Hi Peter ¡¡¡
I have my own color toolbar and forgot to check this ¡¡
I just do it and Everything All Right ¡¡¡
Thanks a lot ¡¡
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 11:26 PM.
|