Forums > MaxMSP

how can i change a subpatch attribute from inside the subpatch?

July 5, 2010 | 3:06 am

i want to change the background color of a subpatcher, but from inside the patcher, just like i were to send "bgcolor black" message into the left inlet. thanks. just getting into max, so far a gift from god…. be hard to like any other kind of programming now.

July 5, 2010 | 3:10 am

well that message doesn’t change bgcolor anyway. what do i have to send some kinda color code? i tried #666666.

July 5, 2010 | 5:22 am

look at the file bgcolor.maxhelp

July 5, 2010 | 6:44 am

thanks, but i meant the color of the little subpatch object in the main patch.

July 5, 2010 | 11:15 am

the actual [p subpatch] object? just use the Inspector. You can also grab and drag any Inspector field onto the object, it’ll connect a message box with the right command ready-to-go. Use a [swatch] to make the colors more intuitive, unless you like specifying colors using RGB values :)

July 7, 2010 | 12:32 am

the subpatch has to be able to trigger it’s own color change from within itself. right now, i have an [led] connected to a special output on the subpatch… but i’d like to do away with that garbage and just have the subpatch change color. anybody know if this is possible? thanks.

July 12, 2010 | 5:56 am

script sendbox [subpatch scripting name] bgcolor 1. 0. 0. 1.

to [thispatcher]

will set the background color of the subpatch box to red.

you can send any (?) attribute-changing message this way, and hide the messages. the [thispatcher] needs to be on the main level though.

July 12, 2010 | 4:05 pm

it’s something like this:

– Pasted Max Patch, click to expand. –

Viewing 8 posts - 1 through 8 (of 8 total)