Introduction to ReaScript
The audio workstation Reaper largely differs from the majority of alternatives (Pro Tools, Logic, etc.) in its extensive flexibility. From color themes to built-in macros for optimizing repetitive parts of the end user’s workflow to a system called ReaScript. ReaScript is “a feature that allows you to edit, run and debug scripts within REAPER. Scripts are simple text files from which you can call any REAPER action, and also call back into most of the REAPER API functions.” In short, Reaper offers the ability to program additional functionality to meet your needs, with direct access to the core components of the software.
Markers and Regions in a Game Audio Workflow
In most typical music production settings, mixing engineers tend to use markers and regions as ways to separate parts of a project, for example, a named region called “Verse 1” dedicated to the first verse, “Chorus” for the chorus, then “Verse 2” for the following verse. This separates the project into visually differentiable sections and is a great way to stay organized. However, in many game audio contexts, regions are used to separate individual assets for sound design work prior to export/rendering. Rather than having a handful of regions in a project, game audio professionals may have dozens, even hundreds of markers or regions in a session.
Find and Replace
While text editors like Microsoft Word and Visual Studio may have intricate find and replace functionality for modifying content that exists in many places in a large project, most audio workstations don’t have a need for this sort of functionality (especially for something as specific as tweaking marker and region names). However, in game audio, a mistake that affects 40 regions in a project with 250 can take a considerable bit of time to correct. I wrote the following two ReaScripts to address this specific problem, using a programming language called Lua. They allow the user to find and replace naming mistakes and make small alterations to the many markers and regions within a project. The clip below demonstrates this functionality, and the code is freely available for download below. Enjoy!
In the following demo, a few of the regions are incorrectly named, with a different manufacturer assigned to the sample being played. By using the Find and Replace in Region Names ReaScript, correcting this issue was a matter of a few clicks. If the text is illegible, click the “SD” button in the lower corner.
Using The Code
Feel free to download, modify, and use the code however you would like (MIT License). It has been code-reviewed by Reaper super-users ‘cfillion’ (the developer of ReaPack) and ‘X-Raym’ (who has written countless scripts for Reaper users over the past decade). There are a few different ways to access these scripts, however I strongly recommend Method 1, as it is the easiest way to stay up to date, just make sure to Synchronize Packages every once in a while!
Method 1 (Preferred) - Downloading via ReaPack
These ReaScripts are officially included as part of the ReaTeam scripts in ReaPack, a package and script manager for Reaper users to download community made scripts that extend the functionality of Reaper. As of May 2020, ReaPack has over 130,000 downloads, and anyone with ReaPack installed can download these two ReaScripts from directly within Reaper: simply go to the Extensions menu > ReaPack and click Synchronize Packages. That’s it! You should be able to find all of my scripts in the Actions menu in Reaper by searching for “acendan”.
Method2 - Downloading via GitHub
While these scripts have officially been code-reviewed and published as part of the ReaTeam scripts in ReaPack, I will be adding experimental fixes and updates directly via my GitHub. I also have a few more scripts that may come in handy, but aren’t necessarily as stable as the ones you may find in the ReaTeam scripts. You can either download them directly from GitHub or by going to Extensions > ReaPack > Import Repositories and copy/pasting the link below!
https://acendan.github.io/reascripts/index.xml
Method 3 - Downloading the Lua Files Directly
ReaPack is the best way to download the code, as any updates made to the public version in ReaPack will be propagated to anyone that has downloaded the scripts. However, you can download the ReaScript lua files (v1.2 - May 27, 2020) using the button here or by copying the code below.
Note: If the filename contains “Region” (i.e. Find and Replace in Region Names), it will run a find/replace in the project’s regions. If the file name contains “Marker”, it will run a find/replace in the project’s markers. By consolidating these separate scripts into an identical source file (that only differs in filename), future updates to the script via ReaPack will be significantly more streamlined.