RGBAW color macros - possible?
RGBAW color macros - possible?
Hi, I'm newly registered here. I've been able to save my own RBG macros by editing existing scripts, but am wondering if I could set up macros for my RGBAW lights.
I'm not a python master, but have slung some code from time to time.
I'm not a python master, but have slung some code from time to time.
-
- Posts: 2131
- Joined: Sat Sep 15, 2012 4:53 pm
- Has thanked: 6 times
- Been thanked: 18 times
Re: RGBAW color macros - possible?
Sure you can. The existing colour macros don't do anything complex - they just look for the colour channels based on name (e.g. "R" or "Red") and then perform some simple math on those channels. The same approach could just as easily process Amber/White channels. Take a look at the macros under the "Adjust Colour" folder...
Dave Brown - db audioware
Author of Show Buddy Setlist | Show Buddy Active | ArtNetMon
Author of Show Buddy Setlist | Show Buddy Active | ArtNetMon
Re: RGBAW color macros - possible?
OK, I ended up extending RGB.py with a new function, RgbawColour(r,g,b,a,w). Works a treat - now I can define my macros like normal.
-
- Posts: 1
- Joined: Sun Oct 27, 2013 7:45 pm
Re: RGBAW color macros - possible?
hey matestubb, can you explain how you did this? i have an 8 channel RGBA led that I'm trying to add macro settings to.
Re: RGBAW color macros - possible?
Well I posted my code, but the forum eats all the spaces, and python doesn't like you to monkey with its spaces. I had to remove the post.
Sheesh!
Sheesh!
-
- Posts: 2131
- Joined: Sat Sep 15, 2012 4:53 pm
- Has thanked: 6 times
- Been thanked: 18 times
Re: RGBAW color macros - possible?
Use the 'code' button (at the top of the editor) to post code, spaces and all.matestubb wrote:...but the forum eats all the spaces, and python doesn't like you to monkey with its spaces. I had to remove the post....
Dave Brown - db audioware
Author of Show Buddy Setlist | Show Buddy Active | ArtNetMon
Author of Show Buddy Setlist | Show Buddy Active | ArtNetMon
Re: RGBAW color macros - possible?
Cool! Well, in that case - I added the following code at the bottom of macros/system/RGB.py:
Since you want RGBA instead of RGBAW, you could paste this instead:
Or you could paste both, doesn't matter. Now copy a color macro file in the macros/colours/ subdirectories and rename it for your custom color. Then edit the contents of that file so that it looks like this:
replacing these r,g,b,a numbers with your own. Then save and restart DMXIS, and you should be able to see your new color. Make a new file for each custom color you want to add and edit as before.
Here's the caveat:
rgb.py is a system file, and when you upgrade to a new DMXIS version, your mods will be overwritten. It's also possible that the contents of that file will change with various updates - this python script may not work forever. You should back up your RGB.py file before modifying it so that you can replace it if things go wrong.
I've defined 20 or 30 of my custom colors using these macros and it works great.
Code: Select all
def RgbawColour(r,g,b,a,w):
sel = GetAllSelCh(False)
if len(sel)==0:
Message("Select some RGBAW channels first!")
for ch in sel:
nm = GetChName(ch).lower()
if nm=="r" or nm=="red":
SetChVal(ch, r)
elif nm=="g" or nm=="green":
SetChVal(ch, g)
elif nm=="b" or nm=="blue":
SetChVal(ch, b)
elif nm=="a" or nm=="amber":
SetChVal(ch, a)
elif nm=="w" or nm=="white":
SetChVal(ch, w)
Code: Select all
def RgbaColour(r,g,b,a):
sel = GetAllSelCh(False)
if len(sel)==0:
Message("Select some RGBA channels first!")
for ch in sel:
nm = GetChName(ch).lower()
if nm=="r" or nm=="red":
SetChVal(ch, r)
elif nm=="g" or nm=="green":
SetChVal(ch, g)
elif nm=="b" or nm=="blue":
SetChVal(ch, b)
elif nm=="a" or nm=="amber":
SetChVal(ch, a)
Code: Select all
#===============================================================
# DMXIS Macro (c) 2010 db audioware limited
#===============================================================
RgbaColour(223,32,0,100)
Here's the caveat:
rgb.py is a system file, and when you upgrade to a new DMXIS version, your mods will be overwritten. It's also possible that the contents of that file will change with various updates - this python script may not work forever. You should back up your RGB.py file before modifying it so that you can replace it if things go wrong.
I've defined 20 or 30 of my custom colors using these macros and it works great.
-
- Posts: 36
- Joined: Sat May 30, 2020 2:40 am
- Has thanked: 3 times
Re: RGBAW color macros - possible?
Just a heads up - when creating the code for selecting the RGBAW fixtures, it will also select the RGB fixtures and presumably any RGBA fixtures.
-
- Posts: 36
- Joined: Sat May 30, 2020 2:40 am
- Has thanked: 3 times
Re: RGBAW color macros - possible?
I went and programmed all the RGBAW colours from Ben Stowe's RGBAW Mixing Chart:
https://www.nlfxpro.com/ben-stowes-rgba ... ing-chart/
You'll need to edit the RGB.py macro so the RGBAW colours are defined, as shown in earlier parts of the thread.
Note: When "Select All RGBAW Channels" is clicked, DMXIS selects RGB(and presumably RGBA) channels as well as the RGBAW channels. Picking these colour macros will affect these channels as well. Not sure what the fix is for this, but I still think it is worthwhile having the RGBAW colours in your macro list.
https://www.nlfxpro.com/ben-stowes-rgba ... ing-chart/
You'll need to edit the RGB.py macro so the RGBAW colours are defined, as shown in earlier parts of the thread.
Note: When "Select All RGBAW Channels" is clicked, DMXIS selects RGB(and presumably RGBA) channels as well as the RGBAW channels. Picking these colour macros will affect these channels as well. Not sure what the fix is for this, but I still think it is worthwhile having the RGBAW colours in your macro list.
- Attachments
-
- RGBAW Colours.zip
- (10.08 KiB) Downloaded 347 times