General

Set the color of individual ball in multiball

Started by misal on .

Sign in or create an account to join the conversation.

7 posts

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

i tried
setattribute(Multiball[0], 'color', 5000);
But this just sets the frame color of the multiball-object.
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)
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.

Multiball_Colors.jzml.zip
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
decl b;
b=getattribute(Multiball[0], 'color');
setattribute(Reverb, 'color', b);
where Reverb was the name of the monitor this script lived in.
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
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).
decl b;
b = getattribute(Multiball, 'colors');
setattribute(Reverb,'color',b);
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.