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

Fade In/Out - Audio Expression

Engaged ,
Apr 30, 2018 Apr 30, 2018

I have the expression below and wanted that the transition of audio between -192 and 0, and 0 to -192 be smooth during 2 seconds.

intro = comp("MASTER").layer("Control").effect("Intro")("Slider"); // example: results in 20

preview = comp("MASTER").layer("Control").effect("Preview")("Slider"); // example: results in 10

if(time < intro || time > preview) [-192,-192] else [0,0]; // the duration is 10 secs at 0 dB between 20 and 30 secs

How can I make a fade in, and also a fade out?

TOPICS
Expressions
3.7K
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 , Apr 30, 2018 Apr 30, 2018

Something like thismaybe:

intro = comp("MASTER").layer("Control").effect("Intro")("Slider");

preview = comp("MASTER").layer("Control").effect("Preview")("Slider");

if (time < intro)

  linear(time,intro-2,intro,[-192,-192],[0,0])

else

  linear(time,preview-2,preview,[0,0],[-192,-192])

Dan

Translate
Community Expert ,
Apr 30, 2018 Apr 30, 2018

Something like thismaybe:

intro = comp("MASTER").layer("Control").effect("Intro")("Slider");

preview = comp("MASTER").layer("Control").effect("Preview")("Slider");

if (time < intro)

  linear(time,intro-2,intro,[-192,-192],[0,0])

else

  linear(time,preview-2,preview,[0,0],[-192,-192])

Dan

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
Engaged ,
Apr 30, 2018 Apr 30, 2018

Sensational; thank you, Dan!

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
New Here ,
Jul 06, 2023 Jul 06, 2023
LATEST

How to automatically fade out audio

 

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