Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Clamping intensity of audio driven intensity

Explorer ,
Oct 16, 2017 Oct 16, 2017

Hello people !

I have a intensity of a beam that is driven by an audio.

But at certain  pick the beam is way to bright.

I dont want the beam intensity to go above 8.

I want it to stay between 0  and 8.

so i added the clamp expression but than what happends is that

the clamp wil break the intensity and it wont go on the audio anymore,

this is what the expressions looks like:

thisComp.layer("Audio Amplitude").effect("Both Channels")("Slider")

clamp(0,0,8)

I appreciate any help.

Thanks

1.0K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Oct 16, 2017 Oct 16, 2017

You should use the full ease or linear method instead.

ease(t, tMin, tMax, value1, value2)

t is the reference values from the audio to keyframes layer (or sound keys or whatever you are using) tMin is the value where you want to want the effect to start, tMin is the maximum value you want to use to drive your effect. These numbers are easy to figure out by looking at the graph editor. Value1 and value2 is the minimum and maximum value you want to send to beam intensity.

I hope this helps.

Translate
Community Expert ,
Oct 16, 2017 Oct 16, 2017

You should use the full ease or linear method instead.

ease(t, tMin, tMax, value1, value2)

t is the reference values from the audio to keyframes layer (or sound keys or whatever you are using) tMin is the value where you want to want the effect to start, tMin is the maximum value you want to use to drive your effect. These numbers are easy to figure out by looking at the graph editor. Value1 and value2 is the minimum and maximum value you want to send to beam intensity.

I hope this helps.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 16, 2017 Oct 16, 2017

Hello Rick!

Thanks for your fast reply!

For some reasons, the intensity stays locked at the tMax value.

So the music is not affecting the intensity anymore.

This is how i added it:

thisComp.layer("Audio Amplitude").effect("Both Channels")("Slider")

ease(thisComp.layer("Audio Amplitude").effect("Both Channels")("Slider"), 0, 8, 0, 12)

any way i can solve this?

thnks!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 16, 2017 Oct 16, 2017

I would have to see what Both Channels looked like in the graph editor. Here is a sequence that I recently cut and the peak average I would use would be about 12. There is a high of about 17 in the entire audio track but that doesn't happen very often.

Screen Shot 2017-10-16 at 9.35.08 AM.png

I might also want the low at about 1 so that the background noise in this shot did not influence the effect. If my minimum glow intensity was going to be .1  and the maximum was to be .6 to give me the look I wanted, my expression would be:

t = thisComp.layer("Audio Amplitude").effect("Both Channels")("Slider");

ease(t, 1, 12, .1, .6)

If you still have problems show us the graph editor and make sure you are looking at the value graph and not the speed graph because the speed graph numbers will not give you the right range of values.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 16, 2017 Oct 16, 2017

Unfortunately still not workng.

Here is a screen shot of how things look here.

Screen Shot 2017-10-16 at 19.24.05.png

so as you can see, its way to bright at this point.

when i add the ease script. the Glow intensity doesnt work anymore.

The Glow intensity is inked to "Both Channels" of the soundtrack.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 16, 2017 Oct 16, 2017

Your expression samples a range from zero to eight. The peak shown in your graph editor is more than 60, the lowest is about 10. You need to modify the tMax number.

What does your expression look like? What is the maximum value you want for intensity? If it is 12 (seems awfully high to me)  and you want to start at zero for intensity then the expression applied to intensity should look exactly like this:

t = thisComp.layer("Audio Amplitude").effect("Both Channels")("Slider");

ease(t, 10, 60, 0, 12)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 16, 2017 Oct 16, 2017
LATEST

I get it.. I see the problem. i didnthad the "t =" infront of the line.

t = thisComp.layer("Audio Amplitude").effect("Both Channels")("Slider");

ease(t, 10, 60, 0, 12

i think there is where it wrong.  Many thanks for your

Many thanks for your time and help !

greetings.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines