…aka macros, scripting, automation.
I upload my Reaper projects to GitHub, including any wav files. Reaper imposes a certain maximum file size, quite reasonably. So if I am doing a 20 minute recording session, and I want to make sure the resulting wav file is saved to the cloud, I need to split it.
So far, I have only learnt how to assign keystrokes to simple actions. Ultimately, this is what I want to do with a single key stroke:
- As a Reaper user
- I want to split an audio file into a number of smaller audio files
- So that I can save my song to the cloud
Splitting an audio file into a number of smaller audio files breaks down to:
- Select a track/wav file in the Reaper UI
- Split the wav file at each 2 minute offset (which assumes that a 2 minute wav file will always be small enough to upload)
- For each time section before the next split (and the last section is included, even though strictly it has no split at the end), save (or “glue” in Reaper terms, for this context at least) the file to a unique file name
- Save the project so that it understands these smaller files replace the previous single file
Right now, all I have is the ability to split the file with a single keystroke. I lack the knowledge to, in any automated way, to a) land on the (assumed single) track, b) identify 2 minute sections (can I parameterize the size?), c) iterate over each of those sections and save the smaller file.
But that’s enough for now.
To demonstrate, first thing is to get a sample single wav file loaded into a Reaper project, something like this:
We then define our custom action, whose goal is to execute the 3 actions under the [Split under mouse] custom action name. More details of this part are in the Reaper manual. Although not detailed here, lower-case [c] is being used as the HotKey for this action.
With the custom action now implemented in our Reaper environment, if we move the mouse cursor to wherever we want the track to split, and then press [c], a split will happen, as shown in the next two shots.
Moving the mouse (note you do not need to click the mouse after moving), and repeating the [c] keystroke a further 4 times will give you this shape:
That ends the customisation so far. Right now, we have to do the rest manually, that is, in each of the sections, right-click, and select [Glue items] 6 times, one for each section, in order to create a set of 6 wav files to replace the single larger one. I will cover customisation of that another time.