Let's Learn Scripting in REAPER: Ep00 & Ep01 Notes


Hey folks! Very excited to be getting into ReaScripts in this brand-new series. Just to clarify something outright, I am an Absolute n00b of scripting in REAPER. I know Max/MSP, an object-based audio programming language, and a basic amount of Python, but I consider myself an absolute beginner. I will NOT be teaching this series. I'll be the student, and I'll try to embark on this journey to learn to code, and every month, bring to you all the stuff I learned in condensed form. I will pour through resources, get help from the pros in the field (like this episode's Guest Leandro Facchinetti) and hopefully through my trails, failures and tribulations, you will learn a few things as well! You, my viewers, in turn, will be my motivation. I have tried to learn scripting with varying degrees of success in the past, but I always got distracted midway and didn't keep going. By promising you to work on my scripting monthly, I will hopefully get a boost of motivation when I inevitably get lazy or start facing hurdles as we get into more pro territory! With the caveat out of the way, let's begin the series with an overview. On the first Monday of Every month, I will release a new episode, and document some of the stuff I learned. Every video will come with a blog post, where I will post additional info cut for time, links to external resources and tutorials, and feature guest coders to go over everything from the basic to more advanced stuff. Here's Episode 00:

What are ReaScripts and what are their benefits? ReaScripts come in two forms: Custom scripts: These are bits of code that we import into REAPER as an action. They work like any other action. They can be assigned to a hotkey, or put on a toolbar, or ran from the Action list. JSFX: These are custom plug-ins that can process Audio/MIDI/Video in real-time* *videos can't be ingested in real-time by REAPER, but Video processors process video on your timeline as you play. So it's not exactly real-time in that case. In both case, there are already thousands of scripts that you can download from the REAPER stash, or using ReaPack. Most are donation-ware, so you can download them from free, but make sure to donate to the creators who make your life easier! Benefits of Custom Scripts: Custom scripts are easier to distribute than custom actions between users. Sometimes when you lovely folks download my custom actions from the Rapid-Fire REAPER tutorials, I've received emails that they didn't work, because the viewer didn't have SWS installed or even specific custom scripts I may have used in my custom actions. With a custom script, everything they need to run the action is in the code. They are also more customizable. The range of what you can do with custom actions is still limited, especially if your custom actions requires some steps in the middle of the process to get any kind of input or selection from the user. Choice of programming languages: You can write scripts for REAPER with 4 languages. Below are the pros and cons of each one. Also check out the REAPER documentation on these here. 1. EEL2: An open-source programming language designed by Cockos. ✓Easy to learn ✓JSFX and Video Processors are written in EEL2 ✓Basic UI (User Interface) Design features ✓Comes standard with REAPER and requires no additional installs ✗ Relative to the other languages, very little study materials available Admiral Bumblebee is one of the best educators for EEL2. I highly recommend exploring his website, and we will do it together in the future. 2. Lua: Popular language used by many video games, adobe products, OBS. This is the language we will begin with in this series. Most custom scripts are written in Lua. ✓Simple yet powerful language ✓Code-Assembly* is easy with lua ✓Lots of resources available ✓Can bridge other programs with REAPER ✓Comes standard with REAPER and requires no additional installs ✗ Only very basic UI Design *Using the REAPER API, we can assemble codes we want to script with, rather than having to write much base-level code. 3. Python: The most popular of the languages we have so far. Python doesn't come installed with REAPER, but does come with a huge code library of amazing functionality not possible using EEL2/LUA, including Machine learning AI features! ✓Lots of resources available ✓Rich Code library full of very advanced functions ✗ Requires additional installs & set-up to write and distribute 4. C/C++: Scripts with this language work a bit differently than the rest. Even their documentation is in a different place on the REAPER website. ✓The most powerful and advanced of all (SWS scripts are in C++) ✓Lots of resources available ✓Rich Code library full of very advanced functions ✗ More difficult to debug ✗ Not very suitable for beginners to scripting. The REAPER API The REAPER API (Advanced programming interface) is a searchable database of functions for ReaScripts. It can be accessed from REAPER by clicking on API Help in the ReaScript Development Window.

To access this window go to Window>ReaScript Documentation This is where you find bits of code that you can assemble into your scripts, not unlike what we do with custom actions. Here's Episode 01:

API/ReaScript Development Window Tips The ReaScript Development Window can be accessed for any custom script you may have downloaded. Simply highlight the script, choose Edit Action and the window will open revealing the code, which you can study. Hovering the mouse over any of the functions (color-coded in Yellow) will reveal additional information on the function. Pressing F1 will open the documentation for that action in the API. Pressing Cmd+K (Ctrl+K for PC) will reveal all the arguments and outputs for functions in the blue pane at the bottom of the window. Cmd+Mousewheel (Ctrl+Mousewheel for PC) Will zoom in and out, resizing the font. leafac_iddqd_Search REAPER Mania tutorial For the 50th episode of Rapid-Fire REAPER Tutorials, we created an action to look up a Kenny Gioia tutorial. Watch that video for more on that. That action pretty much just open Kenny Gioia's page. This custom script opens a dialog box right in REAPER, where you can search for any video. In Episode 1 we showed you how to modify it to perform any internet search right from REAPER, which is pretty powerful if you ask me. You can download the action from Leandro's Github. Simply copy this link, and go to Extensions>Reapack>Import Repositories... https://github.com/leafac/reaper/raw/master/index.xml Paste the link there, hit okay and then you can go to Extensions>Reapack>Browse Packages, and search for leafac. Select all and right click>Install. Resources:



7 views0 comments