Skip to main content
Known Participant
October 31, 2019
Answered

ExtendScript Change Text in mogrt

  • October 31, 2019
  • 1 reply
  • 4363 views

I'm trying to programmatically change text in MOGRT that I've created in Premiere Pro, with the goal of creating an MOGRT with text that changes based on an audio trigger. 

 

I've written code that will change the value in the ExtendScript Toolkit, but the MOGRT in the open project does not change.  I've looked at the PPro API and the PPro Panel sample but neither are helpful; I want the script to be part of the MOGRT, not invoked by a panel/button.

 

Any help is welcome.

This topic has been closed for replies.
Correct answer Bruce Bullis

>Since you're already iterating over all existing trackItems, I don't think looping across the sequence.duration (your outermost loop) will do any good.

 

I'll leave out the outer loop.  Should I be able to get the audioTrackItem marker via script?  I don't see any attributes of the audioTrackItem that expose the marker time...there's .hasMarker() but that's a boolean.


Each trackItem has a projectItem; projectItems have markers.

1 reply

Bruce Bullis
Legend
November 1, 2019

Scripts cannot be embedded in / invoked from .mogrts.
PProPanel successfully inserts an instance of a .mogrt, and modifies its parameters.

daviscydAuthor
Known Participant
November 2, 2019

Would there be another way in PPro to create a counter effect…similar to timecode…that is driven/triggered by an audio clip(s)?

For example:  I have a video sequence that has additional identical audio clips at regular intervals and a text title.  Could the PProPanel script increment the text in the title (i.e. a number) when the audio clip sounds?

Bruce Bullis
Legend
November 4, 2019

The only part that'd be tough is getting the audio amplitude, within ExtendScript. That data is readily available to audio filters, but would need to be exported or saved somewhere else, for a script to access it. Maybe timeline markers? 
Once you know when to place those titles, yes, you can update their contents.