Color Change of Circle on Gradient Background: Using Gestures with tryplex OSCeleton

gabemott's picture


I've got a very simple composition that shows you how to match color values. Now it needs color, and I was hoping to use "swipes" to change the color of the circle.

It would go: Gray, Yellow, Cyan, Green, Magenta, Red, Blue and back.

Right now, the left hand controls the background gradient curtain and the right hand moves the flat circle.

All we need to add is a "color swipe". Maybe like the ones shown by @scalf here:

I also still need help with the transitions between a few different OSCeleton compositions. But that's another matter.

We've are headed to a show on Hawaii next wekend and it would be great to incorporate these elements. Many thanks for all help.

OSC_Gradient_YCGMRB.qtz870.17 KB

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

gabemott's picture
Re: Color Change of Circle on Gradient Background: Using ...

This is an outline of the intention, read the "what we need now" section.

2011_0508_INTRO1_colorbox.pdf122.83 KB

laserpilot's picture
Re: Color Change of Circle on Gradient Background: Using ...

Why not use a color multiplexer instead of those 7 rgb settings? You could then set the swipe gesture boolean into a counter and a mod 7 mathexpression to cycle through those 7 indexes

you could even do something like color multiplexer into a color to rgb and into 4 'smooths' and back into an rgb and get a nice fade between the colors instead of a hard switch if you get what I mean...there's probably a better way to do it, but that's how I do fades between colors

Are you asking how to detect swipe gestures with the skeleton? One easy way would be to try and get the vector of the change between hand motions. Ie subtract the current hand position from one frame or even 5 frames ago (get this using the queue object). If the vector is large enough then it counts as a fast swipe and not just a regular move...and you could probably further refine it to be a vertical swipe versus a horizontal one

dust's picture
Re: Color Change of Circle on Gradient Background: Using ...

Swipe is a pretty simple gesture. Basically all you need to do is sample and hold your position coordinates. Then conditionally check if the current position is greater or less than the sampled position. If the held position is greater that means the position is moving to the right. Once you get the direction down then set a second conditional on the distance between the sampled and current positions. Thats just a-b. Then use a logic patch set to and on both conditionals to get your trigger.