code help

Discuss Lemur and share techniques.
Post Reply
r00n
Newbie
Posts: 11
Joined: 04 Jan 2015 07:08

code help

Post by r00n »

Could someone please assist?

I got lemur and a small blue box called dmxis to control a light show that uses LED RGB parcans.

what I would like to do is make a color picker in lemur. There is a color picker in the user downloads section I see that it is not for this purpose.

What I am trying to do is using the multiball or similar, create a gradient at the background and output different 3 midi cc's for different ranges of x that correspond to the RGB faders in the light control program.

I consider the solution to this problem is for example when x = 0 the red channel would be full and as x increases, the green channel would open up to make yellow. After this the red midi CC would decline leaving only the green channel open. Cyan, Blue, magenta and back home to red would follow. Obviously my knowledge is limited.



I know my programming/problem solving ability is nowhere near what it needs to be but I just cant stop thinking about this and I need to get it solved.

Would someone please mentor me through this?

Regards
roon.
nick_liine
Liine Staff
Posts: 285
Joined: 01 Oct 2010 11:06

Re: code help

Post by nick_liine »

Hi,

The RGB() function should help you out. See attached JZML for an example.
Attachments
Default_V3_colors.jzml
(109.5 KiB) Downloaded 73 times
Softcore
Regular
Posts: 1613
Joined: 04 Nov 2012 08:34

Re: code help

Post by Softcore »

Hello Roon....Since you plan on using a multiball, isnt using only its x kinda killing the purpose of the multiball?

If x = 0, red =0, you have TWO other parameters to configure (green, blue).....How are you planning to control those two...when x rises, up to which value will green come in, and after which value will blue come in?
And what about the ball's Y parameter? Will it control anything?

If you dont think through these details, we wont be able to help you....

As it stands, IMHO, its better to just use three different faders, one for each color value (red, green, blue) and midi map them to your software....Having a VISUAL representation then, on what these faders create as a color is fairly simple and I can provide an example - BUT if you still want a multiball, I can still create an example if you specify the initial questions I made!

;)
r00n
Newbie
Posts: 11
Joined: 04 Jan 2015 07:08

Re: code help

Post by r00n »

Nick
thanks for that module.
It is complicated and I will take the time to see what it does.

Softcore
Thanks for your reply.
I have three faders controlling RGB in DMX software and they are working as expected. I am now wondering how to draw a graphic that has a rainbow gradient so that I can pick a color on mouse down. Is this going to be too hard for a musician?
r00n
Newbie
Posts: 11
Joined: 04 Jan 2015 07:08

Re: code help

Post by r00n »

Ok so i consider there are 6 main colors:
red yellow green cyan blue magenta red
I presume that if i used a multiball , and the x domain is 0 - 127,, and I will require some kind of step function

when x = 0
red channel midi CC is 127

while 1<x<1/6 of 127 green channel increases linearly so that
when x = 1/6 of domain 127 red and green midi cc channel are fully open = yellow

while 1/6 of 127 < x < 2/6 of 127 red channel fades out linearly
when x = 2/6 of 127 gre3n channel midi cc is = 127

while 2/6 of 127 < x < 3/6 of 127 blue channel fades in linearly
when x = 64 green and blue midi CC is full at 127 = cyan

and now green fades out
blue remains
and red fades back in
and so on.

I presumed the Y in the multi ball would be controlling a fourth parameter or the dimmer, but this model does not take into account that the mix of RGB makes white... so there is a third channel missing in the mix in my stupid model. I think i would make the y axis 0 < y < 64 control the fader of the dimmer and then when 64 < y < 127 i would make this fade in the missing color.

Thanks for reading all this high school maths.
r00n
Newbie
Posts: 11
Joined: 04 Jan 2015 07:08

Re: code help

Post by r00n »

just going to stick with the three faders.
its the best solution
Post Reply