stable |

Reaper Integration

Export drum tracks directly to Reaper projects with automatic section markers.

How it works

The Reaper exporter creates .rpp (Reaper Project) files with section markers placed at exact time positions corresponding to each song section. Markers appear in Reaper's timeline and the marker list, letting you jump between sections instantly.

Generate song
ReaperExporter
project.rpp
+
drums.mid

Output files

output/
├── my_song/
│ ├── my_song.rpp # Reaper project with markers
│ ├── my_song_drums.mid # MIDI drum track
│ └── metadata.json # Section timing data
Immutable operations

The exporter never modifies your original files. Every export writes a new .rpp file. Your existing projects are always safe.

Workflow A — Create a new Reaper project

The most common case: generate drums, get a Reaper project with markers in one command.

1

Generate the drum track

# CLI — the simplest path
midi-drums reaper export \
    --genre metal \
    --style doom \
    --tempo 120 \
    --output doom_session.rpp \
    --midi

This single command does everything: generates the song, creates the .rpp, and writes the .mid alongside it.

# Python — with more control
from midi_drums.api.python_api import DrumGeneratorAPI
from midi_drums.exporters import ReaperExporter

api = DrumGeneratorAPI()
song = api.create_song(
    "metal", "doom",
    tempo=120,
    complexity=0.7,
    humanization=0.4,
)

exporter = ReaperExporter()
exporter.export_with_markers(
    song=song,
    output_rpp="doom_session.rpp",
)
2

Export with MIDI track

To also export the MIDI file alongside the project:

# CLI
midi-drums reaper export \
    --genre metal --style doom --tempo 120 \
    --output doom.rpp \
    --midi doom_drums.mid \
    --complexity 0.7 \
    --drummer roeder \
    --marker-color "#FF5500"
# Python
exporter.export_with_midi(
    song=song,
    output_rpp="doom.rpp",
    output_midi="doom_drums.mid",
    marker_color="#FF5500",
)
3

Open in Reaper

Open the .rpp file in Reaper: File → Open Project or drag it onto the Reaper window.

The project opens with your tempo pre-set and markers already placed in the timeline.

Importing the MIDI

If you exported a .mid file separately, drag it from the file browser into Reaper's arrange view onto a new track, or use Insert → Media File. The MIDI will align to bar 1 automatically.

4

Working with markers in Reaper

Markers appear in the timeline ruler as coloured flags. To use them effectively:

  • Jump to marker: press the number key matching the marker (1 = first, 2 = second, etc.)
  • View marker list: View → Region/Marker Manager (Shift+Ctrl+R)
  • Edit marker names/colors: double-click the marker flag in the ruler
  • Loop a section: set the loop region to cover verse or chorus markers and press R
  • Create a region from markers: select two adjacent markers, right-click → Create region from time selection

Markers are named after song sections (e.g. Intro, Verse 1, Chorus 1) and positioned at exact bar boundaries based on the generated tempo.

Workflow B — Add markers to an existing project

If you already have a Reaper project open and just want to stamp section markers into it:

Using a metadata file (recommended)

When you generate a song with the Python API, a metadata.json file is saved alongside the MIDI. This contains exact section timing and can be used to add markers to any Reaper project:

# Generate drums + save metadata
midi-drums generate \
    --genre rock \
    --style progressive \
    --tempo 145 \
    --output output/prog_rock/

# Later, add those markers to any existing project
midi-drums reaper add-markers \
    --metadata output/prog_rock/metadata.json \
    --output my_existing_project.rpp
from midi_drums.exporters import ReaperExporter

exporter = ReaperExporter()

# Add markers from metadata to an existing project
exporter.add_markers_from_metadata(
    metadata_path="output/prog_rock/metadata.json",
    input_rpp="my_existing_project.rpp",
    output_rpp="my_existing_project_with_markers.rpp",  # new file
)

Manual structure specification

If you don't have a metadata file, specify the structure directly:

# Describe the structure inline
midi-drums reaper add-markers \
    --structure "intro:4,verse:8,chorus:8,verse:8,chorus:8,outro:4" \
    --tempo 140 \
    --output project_with_markers.rpp

# Or auto-detect from a MIDI file in a known output directory
midi-drums reaper add-markers \
    --song output/my_song/complete.mid \
    --output project_with_markers.rpp \
    --marker-color "#00CC88"

CLI reference

FlagDescriptionDefault
--genreGenre (metal, rock, jazz, funk)metal
--styleStyle within the genreheavy
--tempoBPM for the generated track120
--outputOutput .rpp file pathrequired
--midiAlso export MIDI (same name as .rpp)off
--midi PATHExport MIDI to specific path
--drummerDrummer style to applynone
--complexityPattern complexity 0–10.7
--humanizationTiming/velocity variation 0–10.3
--marker-colorHex color for markers (#RRGGBB)#FF5500
--templateUse existing .rpp as baseminimal template

Python API

from midi_drums.exporters import ReaperExporter

exporter = ReaperExporter()

# Method 1: from a Song object
exporter.export_with_markers(song, output_rpp="out.rpp")
exporter.export_with_midi(song, output_rpp="out.rpp", output_midi="drums.mid")

# Method 2: from metadata.json
exporter.add_markers_from_metadata(
    metadata_path="metadata.json",
    input_rpp="existing.rpp",    # optional: start from existing project
    output_rpp="result.rpp",
)

# Method 3: from explicit structure
exporter.add_markers_from_structure(
    structure=[("intro", 4), ("verse", 8), ("chorus", 8)],
    tempo=140,
    input_rpp="existing.rpp",
    output_rpp="result.rpp",
    marker_color="#00CC88",
)

Marker color guide

Reaper renders marker colors in the timeline ruler. Some suggestions:

SectionColorHex
Intro / OutroMuted orange#FF8844
VerseSky blue#44AAFF
ChorusGreen#44DD88
BridgeAmber#FFCC44
BreakdownRed#FF4444
All sectionsCustom per-sectionset per section in metadata
Template projects

Use --template existing.rpp when you have audio tracks, VST instruments, or routing you want to preserve. The exporter copies your template and adds markers without touching anything else.