Last updated:

ReaScript: What can we Expect from v5 Pre-Releases?

REAPER 5 IDE

You probably already see in my articles or on the Cockos REAPER Forum that I often recommend to use REAPER v5 pre-releases for scripting.

What make ReaScript for v5 so nice ?

The goal of this article is not to present you every improvements, bug-fixes and optimization that are added in every single v5 pre-release, but to give you a nice idea of what direction is taking scripting for REAPER.

Lua

v5.0pre1 - December 21 2014
 + ReaScript: integrated Lua 5.3 scripting support
REAPER Lua
A Lua ReaScript in Sublime Text

Lua is a popular scripting language. REAPER is now capable to interpret scripts coded in this language, natively, without any other libraries to install.

There is a lot of great things about Lua.

First, it’s syntax, wich is very simple.

Secondly, as it is a popular language, there is a lot of documentations online, and people which can help you outside of the REAPER forum.

And last but not least, there is a lot of nice native functions in Lua, for strings, arrays, tables, maths etc… It’s a very nice language!

IDE

v5.0pre1 - December 21 2014
 + ReaScript: new IDE supports syntax highlighting, multiple editing panes, watch lists, structure matching, and more
REAPER 5 IDE
The integrated IDE for editing scripts inside REAPER

So now you can code and debug scripts right inside of REAPER! When you click on EDIT on the Action list (with a script actions selected), you will have access to nice code editor, with syntax colorization, and variables value on the side. Very handy !

Functions Created by Extensions

v5.0pre6 - January 16 2015
 + ReaScript/EEL: support functions exported by plugin extensions
These text formating scripts use functions provided by the SWS/S&M extensions.

Extensions can create API functions. You will be able to access these functions with scripts. A lot of functions are provided by SWS/S&N functions, and they have no equivalent with Cockos standards functions. You will have more actions possibilities than ever!

ProjExtState

v5.0pre1 - December 21 2014
 + API: added Get/SetProjExtState, so reascripts and extensions can save data with the project
A non-destructive glue action scripts by matthewjumpsoffthebuildings, based on ProjExtState.

These functions is a way to save/retrieve datas directly in/from the project file. We can imagine a lot of powerful things with it!

Enveloppe Functions

v5.0pre5 - January 10 2015
 + API: added GetFXEnvelope()
v5.0pre4 - January 8 2015
 + API: added CountEnvelopePoints, GetEnvelopePoint, GetEnvelopePointByTime, SetEnvelopePoint, InsertEnvelopePoint, Envelope_SortPoints, Envelope_Evaluate
 + API: added FindTempoTimeSigMarker, EditTempoTimeSigMarker, DeleteTempoTimeSigMarker
 + API: added SetMediaItemTake_Source
envelope scripts
Theses scripts involve REAPER API envelope functions.

Opening envelopes for scripting is an awesome thing. Envelopes are indispensables in so many workflow, it is really great to have the possibility to code scripts for them!

Toogle State

v5.0pre8 - January 23 2015
 + ReaScript: toggle state support (e.g. script toolbar buttons can have on/off states)
regions from text items
A demo of toggle button state for scripts, with the Show/Hide Markers and Regions script by HeDa.

This is one of the thing that really tell the difference between scripts and regular actions: scripts can be executed continuously in background – or in foreground, with a GFX window, until they are switch off. Toolbar button that are linked to scripts can now tell clearly if a script is executed or not.

More improvements for scripts that are running this way will come!

API Documentation

It was not told in the REAPER changelog but the way REAPER generates the API documentation has changed.

There is still room for improvements, but it surely allow more customization.

Here is a demo, with an extract of the document, of what we can do with a bit of CSS.

See the Pen CSS for ReaScript API documentation by X-Raym (@X-Raym) on CodePen.

Management

v5.0pre17 - March 12 2015
 # Actions window: show Scripts and Custom actions separated
actions list
Actions listing now make the difference between Scripts and Custom Actions.

This is definitely not the most incredible new feature in the list, but I see in it the sign of a new approach: scripts are getting to have more recognition. We can hope that more feature in that direction will come!

Conclusion

As you can see, a lot of great things is coming with the future v5, and we can already test some of these with the pre-releases.

This was just a sample of all the things that are implemented at each new version, but it shew you a nice overview of what we will be able to do as scripters in the near future!

Cheers!