Skip to main content

Reaper API continue the legacy of RomeoDespres/reapy

Project description

Reapy

This is a project to continue the legacy of https://github.com/RomeoDespres/reapy since 2025.

  • The goal is to keep Reapy living on and make the fun automation happened in the current Python and Reaper versions.
  • The original Reapy package hasn't been updated in a long time. I attempted to submit a bug fixes causing fx methods not working after reconnect long ago, but has not been handled. I assume the contributors have moved on.
  • It is a cool project, so let's keep it aflow. And instead of keeping it a fork, this will be on its own.
  • Unfortunately I have very little time to figure the documentations, helps appreciated!!!

Official Reascript documentation

https://www.reaper.fm/sdk/reascript/reascript.php

How to setup Reapy / Reascript

The guide is MacOS only currently, tested on Reaper v7.36

Part 1 Reaper Setup

Enable Reascript

  • Open Reaper Preferences (Settings), under Plug-ins -- Reascript, select Enable Python for use with ReaScript.
  • The next field is: Custom path to Python dll directory
    • On Apple Silicon with Python installed using homebrew, you can find the libpython$PYTHON_VERSION.dylib in /opt/homebrew/opt/python@$PYTHON_VERSION/Frameworks/Python.framework/Versions/$PYTHON_VERSION/lib, relace $PYTHON_VERSION with the version you intend to use, e.g. 3.12.
    • If you are unsure how to find it you can run: python3.12 -c "import sys; print(sys.prefix)" to get the folder before lib, the the dylib file in like in ./lib or ./lib/python3.12/config-3.12-darwin/
  • In the dylib file, type in the name of the dylib file, e.g libpython3.12.dylib
  • Restart Reaper

Part 2 Python package

  • pip install reapy
  • For local dev:
    • Under your virtual environment, navigate to the root folder of this project
    • pip install -e .
  • Run python -c "import reapy; reapy.configure_reaper()"
    • You may see this message:
    DisabledDistAPIWarning: Can't reach distant API. Please start REAPER, or call reapy.config.enable_dist_api() from inside REAPER to enable distant API.
    warnings.warn(errors.DisabledDistAPIWarning())
    
    • Don't worry just restart Reapy and Python that is it!
  • Test the installation with: python -c "import reapy; reapy.print('a message')"
  • Check Reaper there should be a console log message.

Optional: For uninterrupted automation

This part is not conpulsory for Reapy/Reascript to work, but it disabled certain features to make automation more repreducible.

Open Preferences on Reaper

- In `General`, uncheck automatic update version check in Startup Settings. (Better for CI automation)

- General --> Open project(s) on startup to -- New project (ignore default template)

- Project --> Project loading uncheck prompt when files are not found on project load (This can break automation)

- Audio --> Recording uncheck all options in Prompt to save/delete/rename new files

- Audio --> Rendering check Automatically close render window when render has finished

Quick guide:

Refer to examples folder.

Using ReaScript API directly

Not all API are implemented in reapy currently. You can find available API in: https://www.reaper.fm/sdk/reascript/reascripthelp.html

from reapy import reascript_api as RPR

print(RPR.GetProjectName())

Interact with UI with Perform Action

Action list can be found in: https://raw.githubusercontent.com/Ultraschall/ultraschall-lua-api-for-reaper/Ultraschall-API-4.6/ultraschall_api/misc/misc_docs/Reaper-ActionList.txt

Use Action ID:

You can find available action ID in:

https://raw.githubusercontent.com/Ultraschall/ultraschall-lua-api-for-reaper/Ultraschall-API-4.6/ultraschall_api/misc/misc_docs/Reaper-ActionList.txt

import reapy
project = reapy.Project()
track = project.tracks[0].select()
project.perform_action(40701)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

reapy_next-0.10.1.tar.gz (81.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

reapy_next-0.10.1-py3-none-any.whl (133.1 kB view details)

Uploaded Python 3

File details

Details for the file reapy_next-0.10.1.tar.gz.

File metadata

  • Download URL: reapy_next-0.10.1.tar.gz
  • Upload date:
  • Size: 81.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for reapy_next-0.10.1.tar.gz
Algorithm Hash digest
SHA256 4991ad1da41e12afc5bce66e708abaa932cbc0ae432c3e15069c348ade995890
MD5 d06c1aa227b1f1ebeb10ae0c1cf7d40f
BLAKE2b-256 06a920df45759b64c9ed294a46c96d42758a1a44eaf2419e70bc39ddd21ccb87

See more details on using hashes here.

File details

Details for the file reapy_next-0.10.1-py3-none-any.whl.

File metadata

  • Download URL: reapy_next-0.10.1-py3-none-any.whl
  • Upload date:
  • Size: 133.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for reapy_next-0.10.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1ae9b44ddf944a0fb3c0d463b3ed7fc8fc78f500c5b9db1679d4f104a5d9f315
MD5 7df5dc774ee11c7e24076b718c0a7dd6
BLAKE2b-256 d79587b551c924f8931604b4ce80bf8d8cf0bb3ee78ab9a5289ac36a33bade4e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page