Last updated:

REAPER v5, Text Items and Scripts: Subtitling, Faster Than Ever!

reaper Subtitles Alien 2347 E08

Introduction

Last year, I wrote a lot about subtitling with Region in REAPER, and how handy it was to use a DAW for defining time codes, thanks to sound waveforms visualization, audio analysis, and items.

I had myself contribute to the development of subtitling with REAPER, by providing new Region actions (via scripts), actions modifications (via SWS extension fork) and the elaboration of advanced workflows. If the audio project was done in the REAPER, with audio items named with dialog lines, transcoding full length movie into basic subtitles only took a minute.

Despite all that, subtitling in REAPER still looked a bit hacky… nice, but not handy, we couldn’t really feel a deep integration… Could it be more flexible, ergonomic and powerful ?

The answer is a yes so big that it makes all my other REAPER subtitling articles obsolete.

Here is a demo, with a single audio track, using the Dynamic Split function. It is a conference, so there is only one speaker, and really few background noises. I only do the first minute, with the help of a transcript.

Concept

The core idea behind this new workflow: use empty items as text items, instead of using region subtitles from SWS. This paradigm shift offers a lot of new possibilities compared to regions.

  • You can select text items, not regions
  • You can then work on multiple text items at the same time
  • You can use a lot of already existing actions related to items
  • There is a lot more ways to edit items than regions
  • You can have several layers (tracks) of text items (useful for alternative version, backups, other languages, character dialogs, selective export, different frame rates…)
  • You can see all subtitles in the Arrangement View (regions subtitles need the edit cursor to be inside the parent region to be displayed)
  • Some regions actions are not friendly with region subtitles
  • You can still have other regions, because they are just items

That it is the result of a lot of hard work.
First from Cockos, who made a lot of improvements in REAPER v5 for scripting, video support, and some improvements about empty items. Secondly from SWS extension team (and Breeder, especially), who also made a lot of functions accessible for ReaScript in REAPER v5. And finally, from scripters: HeDa, who initiated this new workflow by providing a nice text items window reader, and the fundamental import/export SRT from text items, and myself, who coded a lot of new actions for these text items.
We started from one native empty item action only and ended with more than 40 actions. This is a nice collaborative effort of the REAPER un-official community development. 😛

How to use this text items ? What are the key points of this new subtitling workflow ?

Before reading this article, be sure to know what are ReaScripts.

Import/Export Subtitles

These two scripts are the core of our text item based subtitling workflow.

Import SRT as Text Items

This action is possible thanks to the script: HeDa_Import SRT.lua

It is pretty to use :

  1. select a track
  2. run the script
  3. select your SRT
  4. import

Text items are created on the selected track, accordingly to the time codes found in the SRT files.

HeDa SRT importer is pretty easy to use.
HeDa SRT importer in action !

Export Text Items to SRT

With HeDa, we developed a powerful SRT exporter which has two big advantages

  • Subtitles time codes are offset by edit cursor position. The action Go to Start of Project is useful if you don’t want that offset. If you project has a negative start, but you want subtitles to be exported from position 0, you may consider using the script X-Raym_Move edit cursor to time 0 or to project start.lua in my script pack.
  • Text items exportation is selective, depending on track selection and item selection. This allows you to edit your subtitles on several tracks. Yes, we transformed REAPER into a multi-tracks subtitler !
    This means that you can export all selected tracks as one subtitles file or export one file for each track separately. Why not a track per language, per character in the story, per versions, per destination framerate or for non-hearing people, all in the same project ?

Forum discussion and other demos: Lua Script: Export/Import subtitles SubRip SRT format

The HeDa’s Notes Reader

There was already a Notes READER in SWS extension, but this script made by HeDa has far more features to offer for displaying notes :

  • Multiple tracks items reading
  • HTML format support
  • Customizable display options
  • Multiple Reader instances at the same time
  • Auto color background or text from items color
HeDa’s Notes READER, one of the most impressive script out there.

This Reader has also a lot of features for more advanced text items related workflow (such as Karaoke).

Forum discussion and other demos: EEL script: Notes Reader

Warning
Notes Reader is being re-coded by HeDa to be even more stable and powerful. There is indeed some known bugs and limitations in the current version (v0.96).

Text Items Creations and Mergin Scripts

Creation

There is one only actions related to empty items in REAPER. That’s why I develop scripts to have other ways to create text items, from other elements.

  • X-Raym_Create text items on first selected track from regions.lua
  • X-Raym_Create text items on first selected track from selected items notes.lua
  • X-Raym_Create text items on first selected track from selected takes name.lua
Create text items from other items names !

If you need to create one item from several selected items, you may use the scripts below. It may be useful in some cases.

  • X-Raym_Create one text item with dialog dash on first selected track from selected items notes.lua
  • X-Raym_Create one text item on first selected track from last selected items notes.lua
  • X-Raym_Create one text item on first selected track from selected items notes.lua

Merging

I also coded ways to merge already existing text items. These are especially handy if you created your text items from other items, such as your dialog audio items.

  • X-Raym_Merge selected text items notes.lua
  • X-Raym_Merge selected text items notes adding dialog dash.lua
This two scripts for merging text items are among the basis of subtitling editing in REAPER.

I also made advanced way to merge items, based on their length, or their overlaps with other items and on their color.

  • X-Raym_Merge consecutive and short text items on selected tracks by pair with color.lua
  • X-Raym_Merge consecutive and short text items on selected tracks by pair with dialog dash.lua
  • X-Raym_Merge overlapping and consecutive similar text items on selected tracks.lua
Merging similar items is very handy when you have a lot of duplicated text items. This may occur if you create this text items from other items names. Note that it also check for items color.

Forum discussion and other demos: Scripts (LUA): Create Text Items Actions (various)

Item Background color

In the new theme system in REAPER (called Walter), empty items can have backgrounds color, depending on your theme (the default v5 theme has this feature, but your v4 custom theme may not have it). This is very useful in a lot of cases:

  • you can temporary mark subtitles/text items
  • you can color subtitles depending on the character speaking
  • you can make selective export based on item color
  • you can edit your text items on a folder track containing your audio tracks. The waveforms will nicely appear over the empty items, making the edit process very ergonomic.

You can see a demo of that in the screenshots just above.

Text Formatting Scripts

SRT subtitles can have basic formatting markup based on XML/HTML.

  • bold
  • italic
  • underline
  • color

As the HeDa’s Note Reader is able to handle this formatting, I created scripts to create/delete these markups.

  • X-Raym_Add background color markup to selected items notes.lua
  • X-Raym_Add bold markup to selected items notes.lua
  • X-Raym_Add font color markup to selected items notes.lua
  • X-Raym_Add italic markup to selected items notes.lua
  • X-Raym_Add musical notes to selected items notes.lua
  • X-Raym_Add underline markup to selected items notes.lua
  • X-Raym_Delete all HTML markup from selected items notes.lua
  • X-Raym_Delete background color markup from selected items notes.lua
  • X-Raym_Delete bold markup from selected items notes.lua
  • X-Raym_Delete font color markup from selected items notes.lua
  • X-Raym_Delete italic markup from selected items notes.lua
  • X-Raym_Delete musical notes from selected items notes.lua
  • X-Raym_Delete underline markup from selected items notes.lua
A nice toolbar with the formatting text items actions scripts.

HeDa imagined a custom background tag, which is able to force the background color of the Note Reader. It may be useful in some cases !

The scripts involving colors are able to update the color tag value to the value of the item background color. It can be very handy if you have text items color based on character, and that you want your SRT subtitles to contains this color infos.

I also created scripts than insert/modify existing text.

  • X-Raym_Add text at beginning of selected items notes.lua
  • X-Raym_Add text at end of selected items notes.lua
  • X-Raym_Add text to selected items notes (Items Notes Processor).lua
  • X-Raym_Delete selected items notes.lua
  • X-Raym_Insert multiple lines lorem ipsum to selected items notes.lua
  • X-Raym_Insert single line lorem ipsum to selected items notes.lua
  • X-Raym_Search and replace in selected items notes.lua

Forum discussion and other demos: Scripts (LUA): Text Items Formatting Actions (various)

Extra Actions and Custom Actions

I also develop some actions to go with subtitling in REAPER :

  • X-Raym_Select items with same color as mouse context (or first selected item) on selected tracks.lua
    Nice if you want to set in Italic all text items related to a special character (such as voice over narrator), which would have a certain color, and if all of your subtitles are in one track only (useful for managing overlaps, and to avoid having to many tracks). Demo here.
  • Custom: Insert empty items at mouse cursor
    A custom actions to create text items with two clicks only using REAPER mouse modifiers. First click use the native Time Selection: Set Start point action on a Track mouse modifier, and the custom action is placed on the arrangement middle click mouse modifier. More infos about the set up in Setup chapter.

    insert Text Items Mouse
    With Maj pressed, and a succession of Left Click, Middle Click, it is very easy to create subtitles timecodes.
  • X-Raym_Quantize selected items start and end to closest frame.lua
    Native item quantization window doesn’t support frame. This will assure you that your text items snap nicely to the video frame rate of your project.
  • X-Raym_Expand selected items length to the next item position if close enough.lua
    This is a nice way to fill gaps between items, only if the next items is not too far. If the next item is too far, it extend the item length by the value determined by the threshold, so the subtitles can be displayed a bit more longer than the actual audio. A must have for subtitling !
  • X-Raym_Expand first selected item to next item end.lua
    A very convenient way to expand subtitles, especially if you create them from transient detection.

Polish the Subtitles with Dedicated Softwares

Subtitling in REAPER is perfect for creating time codes, multi tracks subtitling and conditional formating (based on items color for example).

But the goal is not to replace a dedicated subtitling software, especially when it comes to make some complex text operation (such as calculating the number of character per seconds for each subtitles and auto-split a line if needed).

You will always have to open your exported subtitles in a dedicated software.

I will strongly advice you to use Subtitle Edit which is become very mature, ergonomic and powerful. Its development is still highly active. It also have audio waveform display, but the detection and navigation is less ergonomic than withing REAPER.

A screenshot of Subtitle Edit, a very nice subtitling software
A screenshot of Subtitle Edit, a very nice subtitling software

Beyond Subtitling

I spoke about text items in a subtitling workflow but the truth is that it could go way beyond that. ADR (Automatic Dialog Replacement), lyrics, karaoke, helping text for foley artists or the music composer… all of these fields are being explored.

Because all of this possibilities strongly depends on how the notes are displayed in a READER, I invite you to support HeDa’s scripts development by contributing on its Patreon page.  Also, be sure to follow the news about it on Heda’s Notes Reader script forum thread.

You can also support my scripts development and maintenance by clicking on the donation widget on the sidebar ! 🙂 Any contribution would be very appreciated, as all of this took me countless weeks of free work.

Downloads and Setup

You may want to download only the scripts you need, and make you own toolbars. But if you want a quicker way to set up all this, here are the files you have to download, and how to integrate them into REAPER. Don’t be afraid by the number of steps, once you will make this once, you will be able to do it in less than 30 seconds the next time.

SWS Extensions

Almost all of text items related scripts rely on functions provided by the SWS extension.

Having the SWS extension will also let you have the nice Notes Editor Window, to quickly edit item notes.

In general, no matter what is your type of work on REAPER, the SWS extension will be your friend, by providing a tons a new features.

You can download it on the SWS extension website.

X-Raym REAPER Script pack

In order to make these work with the toolbars and custom actions provided below, you will need to use REAPER v5.05 (currently in beta).

Download “X-Raym ReaScripts Collection”

master.zip – Downloaded 13579 times –
  1. Download my script pack from the the dedicated page or from the button above.
  2. Put them in the default users scripts folder (Options/Show REAPER resource path in explorer/finder…)
  3. Import them. You can make a research of all files in the folders, select them all, to import them all at once.

HeDa’s Scripts

  • Download the HeDa’s script Notes Reader and the Heda’s Import SRT script from HeDa’s website..
  • Put them it the default users scripts folder.

Toolbars and Custom Actions

Toolbars and Custom Actions related to this articles are present in my script pack.

  • Custom Actions/Text Items.ReaperKeyMap: Some REAPER custom actions (macros) for text items editing. Import them with the Actions List window.
  • Menus and Toolbars/Text Items.ReaperMenu: A toolbar with my most used actions for any text items worflow. Import it with the Customize Menus/Toobars window.
A simplified toolbar for most common Text Items workflow.

Mouse Modifiers

In order to be able to insert empty items with two clicks as shown above, you will have to manually set the mouse modifiers for my custom actions, if you don’t wont to loose your custom settings. Here what I propose:

  • Track -> Left Click -> Shift -> Time Selection: Set start point
  • Arrange View -> Middle Click -> Shift -> Custom: Insert empty items at mouse cursor

Of course, you can put this action manually, with the mouse modifiers of your choice.

More infos on mouse modifiers on KennyMania’s Tutorial: Mouse Modifier in REAPER.

Conclusion

As you can see, that’s a lot of new possibilities for subtitling workflow that is now possible thanks to REAPER v5, and scripts we made for it.

It is now unique subtitling features that are now available in REAPER, things that can’t be build in a regular subtitle editor, such as conditional formatting and multi tracks editing.

Without any doubt, REAPER could now be considered as a sofwtare for subtitlers, even professionals. Sure, it requires a bit of time to set up and to learn but you will save so much time that I can affirm that you will not regret spending few minutes of installation.

From all subtitles timecode setting workflow I came so far, this one is from far the most ergonomic, flexible and faset, especially if your voices tracks are clean enough to use Dynamic Split, or if you subtitle an audio project that has been done in REAPER.

Even if you don’t consider exporting your subtitles from REAPER, being able to have dialog Reference tracks is a must have, especially for your composer. There is a lot of possibilities to explore with these text items, and subtitling is just one of them.

Thanks for you reading, and your support, if you consider making a donation, or leaving a comment !

Cheers !