I have a project with a switch object, one row with twelve columns, and am looking for a way to change the color of a single switch by controlling it with a pad.
I'm hoping to set it up so that when you tap the pad it will cycle through three different colors for a specific switch, and not all twelve at once.
The only thing I've figured out so far is to set the attribute of the switch so that multiple colors show up. Yes, I am new to this.
Like I say, I'd like to be able to control the color change of just one switch, by tapping a pad that will cycle through three different colors.
Any help is appreciated!
Target a single switch and change it's color with a pad?
Re: Target a single switch and change it's color with a pad?
Got it so when I press a pad it changes the color of the switches. Did so by moving the "setattribute" script to the pad object rather than the switch object, and setting the script to run when the pad is pressed "On". Easy enough.
Now I just need two things:
1. To be able to target just one of the 12 switches in the switch object (1 row of 12 columns), and not all 12.
2. The ability to cycle between 3 colors with each tap on the pad.
Now I just need two things:
1. To be able to target just one of the 12 switches in the switch object (1 row of 12 columns), and not all 12.
2. The ability to cycle between 3 colors with each tap on the pad.
Re: Target a single switch and change it's color with a pad?
Came up with a solution for #2:jbw wrote:Now I just need two things:
1. To be able to target just one of the 12 switches in the switch object (1 row of 12 columns), and not all 12.
2. The ability to cycle between 3 colors with each tap on the pad.
Create three separate pads, one for each color. So rather than cycling through colors with one pad, just tap one of the three to change the color.
Last thing needed:
The ability to target a specific switch, because right now it changes the color of all the 12 switches. Again, it's 1 row and 12 columns, and I want to be able to change the color of just 1 rather than all 12
Any help for this last one is appreciated! Hopefully there's a way to do this.
Re: Target a single switch and change it's color with a pad?
Here's the code I have set to the 3 Pads (with the number different for each color):
And for the "Switches25" I have the "Multicolor" box checked.
The answer is probably something relatively easy. I just haven't found it yet.
Code: Select all
setattribute(Switches25,'colors',{8355711});
The answer is probably something relatively easy. I just haven't found it yet.
Re: Target a single switch and change it's color with a pad?
I guess this is something you want. The color expression now holds 3 random colors, just change those values to the ones you want. Any questions, just ask;)
O wait the forum is full, so I'll just use dropbox...
https://www.dropbox.com/s/gdx6x4p2u12ks ... .jzml?dl=0
Cheers!
O wait the forum is full, so I'll just use dropbox...
https://www.dropbox.com/s/gdx6x4p2u12ks ... .jzml?dl=0
Cheers!
"Having no silence in music is like having no black or white in a painting" - Brian Eno
https://soundcloud.com/mrcorba
https://soundcloud.com/mrcorba
Re: Target a single switch and change it's color with a pad?
Thanks!MrCorba wrote:I guess this is something you want. The color expression now holds 3 random colors, just change those values to the ones you want. Any questions, just ask;)
O wait the forum is full, so I'll just use dropbox...
https://www.dropbox.com/s/gdx6x4p2u12ks ... .jzml?dl=0
Cheers!
Re: Target a single switch and change it's color with a pad?
Link expired. Please repost.MrCorba wrote:
I guess this is something you want. The color expression now holds 3 random colors, just change those values to the ones you want. Any questions, just ask;)
O wait the forum is full, so I'll just use dropbox...
https://www.dropbox.com/s/gdx6x4p2u12ks ... .jzml?dl=0
Re: Target a single switch and change it's color with a pad?
I actually deleted it and I didn't have it anymore so I tried to recreate it. It was something like this, maybe JBW has the original one.
- Attachments
-
- Switch.jzml
- (4.75 KiB) Downloaded 185 times
"Having no silence in music is like having no black or white in a painting" - Brian Eno
https://soundcloud.com/mrcorba
https://soundcloud.com/mrcorba
Re: Target a single switch and change it's color with a pad?
Thanks for the repost. Much appreciated.