Good Old Python Kinect TDAbleton CHOP Questions - but SERIOUSLY need an assist now

Hi,

I am here because I have exhausted all my resources and searches. I’ve tried about 10+ different combinations from over 18 tabs of sites and pages from the knowledgebase; not to mention like 8 30+mins YouTube tutorials. I have a good amount of Beginner experience and have successfully done a few setups with Kinect, and other neat stuff.

THE GOAL:
Volume Control of an Ableton Track/Clip using Kinect (not the standard kind, because I already have a setup where one hand gesture Up/Down controls the volume perfectly.)

The problem, is not how to do it, but how to do it IF a certain set of conditions are met. This is where I looked at Python, which has helped in the past with simple things.

This is a simple thing, but I just have 0 to none Python skills, and I know it’s just a few lines of code, and I don’t know which ones go with which and getting errors, and migraines.

THE SETUP I’M TRYING TO CONFIGURE:
I just want to control the volume, to go up and down (ie from 0 to 100) in an Ableton Track or ClipSlot) but only when-
IF my leftHand’s Y axis is between and certain range (ie from -0.30 to 0.30)
AND ALSO IF
my leftHand’s X axis in within another range.

The purpose is to not have to keep my hands up the whole time just to control the volume. The problem is right now, I can’t find a way to make this work with BOTH conditions being met, only one-
and the result is as soon as I drop my leftHand, the volume plummets.

I want to ideally do this:
When my leftHand’s X axis enters a range (using the Kinect’s outputs, ideally in an area just at left arm’s length) THEN somehow “activate” or make the Y axis become the next operator to actually control the volume.
This way, my leftHand enter’s into the X Axis range and triggers the ability to control the Y axis (which will be the one actually controlling the volume going up or down), and when I “leave” the X Axis range, for the volume to STAY at the level that I left it at (meaning where my leftHand Y axis was when I “exited” that zone.)

How in the living heck do you make this happen? I know it’s probably so simple, and I’m so mad at myself that I can’t figure it out, so I am phoning a friend!

I’m attaching a screenshot of what I have in TD as far as Kinect stuff.
In the TDAbleton package in the same project, basically there are 3 clips under 1 track.
I know how to trigger (FIRE) the clips individually with my RightHand, but rather than controlling each one’s volume independently, I’m simplifying it by controlling the main volume with the LeftHand.

So the setup is-
RightHand triggers a clip to start and stop when I want (this is successful).
Then,
LeftHand controls the Volume, but only if my hand is a little under almost extended, and in that zone, by me raising my hand up or down the volume is raised or lowered.
Then,
Take my LeftHand out of that zone and the volume remains where I left it, unless I go back into that zone and make it change.

Otherwise, I’m stuck keeping my hand up the entire time, and with a 4 minute track, that’s a workout that will burn your arm. Plus, if I’m being honest, it looks stupid af lol.
The hand up the whole time. I’d like to free up the hands and do other things with them unless I need to raise/lower the Vol again.

2 conditions in one or two CHOPS need to be met to make it happen.
I just have no clue of how to do it, and everything I’m trying, chops like (math, merge, expression, out, in, CHOPexecute,) are making things just bug out.

Someone please help!

Thanks!

use a logic-chop to A check the condition of the hand-position, and B to combine the two conditions into one with the AND-Operation.
You can then use the conitional value to trigger a HOLD-Chop or a mathCHOP doing the logic with your right hand to control the volume.

1 Like

Hi- okay, I think I see what you are saying. But you said right hand will need to also be used? Because I just want to use one hand for the volume- the left. Regardless I will try this and get back on here with the results! Thanks for responding so quick =)

I misunderstood your question. I thought you wanted to use tour right hand to activate the control-mechanism. The basic principle still applies.

You are correct my friend, because in short- it worked! You are a true maestro! Thank you.

I went with the Logic AND Hold CHOP controlling 2 channels- according to “the bible” of derivative, it waits until the 2nd channel receives the Step, and then steps whatever is in its 1st channel.
So in the Logic CHOP, I have the left hand X and the value set at ‘off when at zero or less’, which is fed by a Math CHOP upstream with the range defined for 0 and 1.
Of course, now in the Hold CHOP, I have that going into the CH2 input, and in the CH1 input is where I have a Select CHOP of my left hand Y axis. With a Math CHOP, I defined the range I wanted based on the value the Volume par understands in TDAtrack, and just mimicked that.

This goes to a Trigger, then to a Merge (because I have a few other ops for other things already) and finally to an Out CHOP downstream, and into TDA.

In TDA I have a Select to grab the LeftHand Y dropped in the Volume’s expression par, and ofcourse it assigns the volume level from 0.00 to 1 by me moving my hand up and down, and it stops when I move my hand back out of that range.

Took a little rattling around, cause at first it wouldn’t hold the Vol where I wanted it, despite me selecting what I logically thought would make that work in the Hold CHOP, but I was wrong.
Apparently it needs to be set to ‘While Off’ and the ‘Hold Last’ button to OFF. At least in my setup.
This works exactly how I need it to perform.

Many thanks again my friend, and I hope our exchange helps many more to come!

There,