-
Fade audio in/out based on layer’s in/out points
Can’t seem to find anything on this. I use my layer opacity fade script but can’t apply it to audio. Gives me an error that it must be a dimension of 2, not 1. But the output is a single value isnt it? Here’s what I typically use below for opacity that I want to adapt to audio as well:
transition = effect("Transition Duration")("Slider"); // transition time in frames
if (marker.numKeys<2){
tSecs = transition / ( 1 / thisComp.frameDuration); // convert to seconds
linear(time, inPoint, inPoint + tSecs, 0, 100) - linear(time, outPoint - tSecs, outPoint, 0, 100)
}else{
linear(time, inPoint, marker.key(1).time, 0, 100) - linear(time, marker.key(2).time, outPoint, 0, 100)
}