ReaTeam / ReaScripts-Templates

Templates, models, boilerplates, examples and snippets for REAPER ReaScript.
70 stars 23 forks source link

"GetSetTextToVideoProcessor"-functions for Reaper's Lua #7

Closed mespotine closed 6 years ago

mespotine commented 6 years ago

Get/Set Text in Video Processor-functions

Meo Mespotine - 29.06.2018 mespotine.de ultraschall.fm/danke

licensed under an MIT-license

These functions allow you to change the displayed text in items with video-processor as TakeFX.

Only works for TakeFX in MediaItems! As I use StateChunks to change texts, TrackFX would be too slow to do that. Changes/gets the text of the first(!) video processor in the FX Chain of the MediaItem Only supports Reaper's built-in "Title text overlay"-preset! You can use safely newlines, these will be added properly.

Limitation: if you want to change text in the video-processor-window while rendering, you need to work with a defer-background-script, that checks, whether the playcursor reached your desired position, on which you want to change the text. That should work, but may result in stuttering video, at text-change, so don't do it, unless you need to.

Usecase: Use a MediaItem, that's streched along the whole project. Give it a video-processor as TakeFX Apply these functions to this MediaItem. That way, you can change the text whenever you want. Keep in mind: this MediaItem must be the "highest order", means, it must be above all other video/picture items otherwise, other items may "overwrite" the text Changing texts may cause hickups and stuttering in video-rendering, because of the change.