Reathon - create reaper sessions programatically in python

Thanks to the wonderful and generous help of @tedmoore and @francesco.cameli I managed to bash my way through writing some supercollider code (which turned out to be more fun and intuitive than I first envisaged) and put together a relatively 1:1 implementation which in some cases is an improvement over the Python version.

The code is hosted on GitHub and be can be quarked or cloned into your extensions for easy install.

The interface revolves around constructing objects and adding them to the next hierarchical unit up.

Project
:arrow_down:
Track
:arrow_down:
Item

Each object accepts any number of ‘properties’ as a List/Array, and is unpacked with pairsDo internally. The example below gives the track a name this way, by passing ["name", "Glitchy Music"] to the ReaTrack constructor.

(
~project = ReaProj(); // create a ReaProj instance
~track = ReaTrack(["name", "Glitchy Music"]); // Create a ReaTrack
~item = ReaItem("~/glitchbox.wav", 0, 1); // file path, position (in timeline), length
~track.addItem(~item);
~project.addTrack(~track);
~project.write("~/path_to_project.rpp");
)

Once you write the file is made for you!

3 Likes