Set the color of individual ball in multiball

Discuss Lemur and share techniques.
Post Reply
misal
Newbie
Posts: 11
Joined: 08 Dec 2011 21:35

Set the color of individual ball in multiball

Post by misal »

How can i set the individual colors of all the balls in a multiball-object by scripting?

i tried

Code: Select all

setattribute(Multiball[0], 'color', 5000);
But this just sets the frame color of the multiball-object.
marino_liine
Regular
Posts: 120
Joined: 26 Apr 2011 09:05

Re: Set the color of individual ball in multiball

Post by marino_liine »

Hi misal,

An easy way to set the color of ball 8 for example (assuming you have a global variable called multiball_colors.. see the attached example jzml)

Code: Select all

decl color = RGB(1.0,0.0,0.0);
multiball_colors[7] = color;
setattribute(MultiBall, 'colors',multiball_colors;
that will set the 8th ball to bright red.

I have attached an example patch which uses faders to mix between the RGB scale. There are three faders for each ball which control the mix of Red, Green and Blue.
If you need more info don't hesitate to ask.
Attachments
Multiball_Colors.jzml.zip
Example of multiball color scripts
(3.53 KiB) Downloaded 228 times
Anton
Regular
Posts: 74
Joined: 08 Dec 2011 12:36

Re: Set the color of individual ball in multiball

Post by Anton »

what if I wanted to set the color of a monitor to the color of a ball. how do i get the color of an individual ball?

I treid something like

Code: Select all

decl b;
b=getattribute(Multiball[0], 'color');
setattribute(Reverb, 'color', b);
where Reverb was the name of the monitor this script lived in.
mbncp
Regular
Posts: 87
Joined: 08 Dec 2011 07:25

Re: Set the color of individual ball in multiball

Post by mbncp »

just guessing, but did you try:

Code: Select all

decl b;
b=getattribute(Multiball, 'color');
setattribute(Reverb, 'color', b[0]);
nick_liine
Liine Staff
Posts: 285
Joined: 01 Oct 2010 11:06

Re: Set the color of individual ball in multiball

Post by nick_liine »

Anton wrote:what if I wanted to set the color of a monitor to the color of a ball. how do i get the color of an individual ball?

I treid something like

Code: Select all

decl b;
b=getattribute(Multiball[0], 'color');
setattribute(Reverb, 'color', b);
where Reverb was the name of the monitor this script lived in.

If you want to get the colors of the balls, first make sure the Multicolor checkbox is ticked. The attribute for the balls is 'colors', not 'color' (that's for the frame).

Code: Select all

decl b;
b = getattribute(Multiball, 'colors');
setattribute(Reverb,'color',b);
Anton
Regular
Posts: 74
Joined: 08 Dec 2011 12:36

Re: Set the color of individual ball in multiball

Post by Anton »

hi Thanks,
So how do you get the color of a certain ball number?
misal
Newbie
Posts: 11
Joined: 08 Dec 2011 21:35

Re: Set the color of individual ball in multiball

Post by misal »

Thanks for your answers.
What i actually want is to set the touched ball to a different color. Then, if i press a hold button, the touched ball stays touched. So i think i need to get the number of the touched ball as well?
Thanks for any help.
Post Reply