General
Set the color of individual ball in multiball
Started by misal on .
Sign in or create an account to join the conversation.
How can i set the individual colors of all the balls in a multiball-object by scripting?
i tried
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)
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
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
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.just guessing, but did you try:
decl b;
b=getattribute(Multiball, 'color');
setattribute(Reverb, 'color', b[0]);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 likewhere Reverb was the name of the monitor this script lived in.decl b; b=getattribute(Multiball[0], 'color'); setattribute(Reverb, 'color', b);
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);hi Thanks,
So how do you get the color of a certain ball number?
So how do you get the color of a certain ball number?
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.
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.