1

I want to make a speaker graphic 'wobble' to different frequencies..
Here's what I've done so far

I made a speaker graphic in a comp And I parented the scale to a null in the main comp

enter image description here

And I isolated the kick drum with a combo of a band pass filter and a bass-treble. Then I converted that audio into keyframes and pick whipped that null with that speaker's scale parented to it.

enter image description here

So here's where I'm stuck at:
I want to limit the speaker's scale within some values. Like the speaker should not exceed 75.8% and 76% of scale.

So what I tried so far is something like this ↓
temp = thisComp.layer("Audio Amplitude").effect("Both Channels")("Slider"); [temp, temp] +[Math.min(73.8-2), Math.min(73.8-2)] [Math.max(23), Math.max(23)]

1 Answer 1

2

You need to do a linear map as an Expression. So the example below would take any value between 0-100 and map it between -100 to 100.

input = effect("Slider Control")("Slider");
inputLow = 0;
inputHigh = 100;
outputLow = -100;
outputHigh = 100;

linear(input,inputLow,inputHigh,outputLow,outputHigh)
2
  • Sorry I'm totally new to expressions, can you please show me how I put that into my rest of the expression?
    – user152435
    Commented Aug 26, 2020 at 8:09
  • Edit - Thanks man, after you gave me a primer, I was able to find it on Google...
    – user152435
    Commented Aug 26, 2020 at 8:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.