Cockos publishes no specification of the file; its wiki and API describe only the same text as passed to scripts, called state chunks. This page is based on the parser and writer in the rpp Python library and on real project files.
Lines
The file is text, one entry per line, and is indented by REAPER for readability; the indentation does not change the meaning. A line is one of these:
| Line | Meaning |
|---|---|
<TAG args… | Opens a block. The tag and any further tokens on the line are the block’s header. |
> | Closes the most recently opened block. |
KEYWORD args… | A keyword and its values. |
| A base64 line | One token of data inside a block, such as a plug-in state. |
|text… | A line starting with a pipe character is one token: the rest of the line as written. |
A file holds one block, <REAPER_PROJECT, with every other block nested
inside it.
Tokens and quoting
Tokens are separated by spaces. A token that starts with a quote character runs to the next matching quote, and the quotes are not part of the value. There are three quote characters, and a writer uses them in this order, so that a value can hold the other two:
| Quote | When the rpp writer uses it |
|---|---|
" | By default, when a value is empty, starts with a quote, or contains a space or tab. |
' | When the value contains ". |
` | When the value contains ' as well, or a backtick. A backtick in the value is replaced by ', because there is no way left to quote it. |
NAME "Lead vocal"
NAME 'The "Big" Riff'
NAME `Don't say "stop"`
RECORD_PATH "Media" ""
Numbers
Numbers are written in decimal, with as many as 14 places after the point in the sample files. Many keyword lines have a fixed set of numeric fields; the meaning of each is listed under project, tracks and items.
Binary data
Binary state is written as base64 lines inside a block. REAPER writes plug-in state and settings this way, for example the recording and render configurations:
<RECORD_CFG
Y2FsZhgAAAAFAAAA
>
The lengths of the lines are chosen by REAPER; a reader joins them before decoding.
The first line
<REAPER_PROJECT 0.1 "4.602/OSX64" 1396967059
See the project block for the three fields.
Not confirmed
- The character encoding (the sample files are ASCII, and UTF-8 is the likely encoding for other text) and the line ending REAPER prefers.
- How the rules above differ, if at all, in very old versions of REAPER.