Single file header-only C++11 file parser for Reaper project files.
Reverse engineering of Reaper project files is done empirically. ReaParser is experimental, some results may be unexpected.
ReaParser can extract the following information from a Reaper project file:
- Name
- Reaper version and OS saved with
- Sample Rate
- Master tempo and time signature
- Name
- Numeric ID
- GUID
- Volume/Pan
- Mute/Solo
- Phase
- Media Items
- FX Chain
- Name
- Associated filepath and file format
- Start and end positions
- Length
- Name
- Associated filepath and file format
- Data string
ReaParser::ReaProject project;
ReaParser::ReaOptions options;
options.NormalizePan = false;
try {
project = ReaParser::LoadProjectFile("TestProject/TestProject.rpp", options);
}
catch (ReaParser::Exception& e) {
std::cout << e.What() << std::endl;
}
std::cout << "Reaper project: " << project.Name << std::endl;
std::cout << "Reaper version: " << project.Version.ToString() << std::endl;
std::cout << "Sample rate: " << project.SampleRate << std::endl;
std::cout << "Tempo: " << project.Tempo.BPM << " bpm " << project.Tempo.Beats << "/" << project.Tempo.Bars << std::endl << std::endl;
if (project.Tracks.size() > 0) {
for (auto& track : project.Tracks) {
std::cout << track.NumericID << ") " << track.Name << " (" << track.GUID << ")\n";
std::cout << "Volume: " << track.Volume << "dB Pan: " << track.Pan << "%\n";
std::cout << "Muted: " <<
(track.Muted ? "Yes" : "No") << std::endl;
std::cout << "Phase: " <<
(track.PhaseInverted ? "Flipped" : "Normal") << std::endl;
}
}
for (auto& track : project.Tracks) {
if (track.MediaItems.size() > 0) {
std::cout << "Items: ---------------------" << std::endl;
for (auto& item : track.MediaItems) {
std::cout << "\"" << item.Name << "\"" << std::endl;
if (item.Type == ReaParser::ReaMediaType::Sample)
std::cout << "FILE : " << item.Filepath << std::endl;
std::cout << "START : " << item.Start << "s" << std::endl;
std::cout << "END : " << item.End << "s" << std::endl;
std::cout << "LENGTH: " << item.Length << "s" << std::endl;
}
}
}
(See Test.cpp for more functionality)
- Project preferences
- Automation
- Regions
- More Media Item details