Math CHOP Range Mapping with Mouse In

Dear all,

I want to use Mouse In CHOP to control three different Math CHOP operators for my three audio output volumes.

Basically, when the mouse is on the left end, it shows -1, the center to be 0, and the right end to be 1. So I was trying to map this range into three different math operators.
First Math to be mapped from -1 - 0 range to 1 - 0 range (so the volume of Audio A increases when the mouse moves to left and disappears when the mouse is in the centre);
Second Math to be mapped from 0 - 1 range to 0 - 1 range (so the volume of Audio B increases when the mouse moves right and disappears when the mouse is in the centre);
Third Math to be mapped from -0.5 to 0.5 range to 0 - 1 - 0 range (so the volume of Audio C is at maximum when the mouse is at the center and decreases when it moves towards two sides).

I know Third Math might be a bit complicated, but when I was trying to map for the first two maths, the range didn’t stop at zero when the mouse moved to the center. And when I export the Math CHOP value to the audio device’s volume, the negative numbers will still play the music. I was wondering if there is a way to stop the range at the zero value so that the volume can stop when the mouse goes to the center.

Here is the sample file for what I’m working on.
Math CHOP Mapping.2.toe (22.7 KB)

I haven’t figured out what I can do with the Third Math where I want it to be in the 0-1-0 range, so the center becomes the largest volume and gradually disappears toward two sides. If anyone knows about this or can point me in some direction, that would be much appreciated!

Or if anyone knows if there is a simpler way to control the volume of three different audio files according to the mouse position, that will also help a lot (QAQ)

Thank you.
Karen

Hi @karen0317,

for the third case, on the Math CHOP’s OP page, set the `Channel Pre OP` parameter to positive and then map the values from `0-1` to `1-0`. By using the positive the values will increase when you go left and when you go right from the center.

Otherwise also make sure to use Limit CHOPs for the other 2 scenarios to clamp the values at 0.

Cheers
Markus

Thank you! The Limit CHOP is very useful!