Hmmm, this one is a bit tricky. If I understand correctly, the proposed scenario is one where the audio layer is stretched if it’s shorter than the video layer, but if it’s longer, it’s not.
Assuming that’s the case, I think, theoretically, it could be done, but we’d need to go one step beyond Expressions and use Templater Bot’s Event Scripts function to use some ExtendScript to evaluate the length of the two layers and update Templater as needed.
To start, I’d set up two different master comps. One that has Time Sculpting set up for a longer audio file and one for a shorter duration. Once that’s done, we’d need to develop a script that evaluates the length of the two layers to determine the duration of the assets in question. I believe that app.project.item().duration object should work for this.
Finally, once we know the length of the two layers, we should be able to use a $D.job.set() command to update the target value in the data to the comp with the matching layout logic.
Since this is a bit more complex than the previous questions, there’s likely going to be some trial and error involved in writing the script and testing to make sure that it executes correctly. However, from a conceptual level, I do believe it should be possible.
If you have any questions, let us know, and we’ll do our best to help out.
Thanks,
Jeff