Last active
December 11, 2023 06:25
-
-
Save koaps/851e9550fd915d04d0a1a514f0e516b9 to your computer and use it in GitHub Desktop.
Reapy in Pyenv
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install pyenv (OSX) - https://github.com/pyenv/pyenv | |
brew install pyenv | |
# Install Python build requirements | |
brew install openssl readline sqlite3 xz zlib tcl-tk | |
# Install python 3.12.1 | |
PYTHON_CONFIGURE_OPTS="--disable-ipv6 --enable-optimizations --enable-shared" pyenv install 3.12.1 | |
# Set global version | |
pyenv global 3.12.1 | |
# Update pip | |
pip install --upgrade pip | |
# Install Reapy | |
pip install python-reapy | |
# Enable python ReaScripts in Reaper | |
* Under Preferences -> Plug-ins -> ReaScript | |
* Check the Enable Python box | |
* Change the Python dll directory to `$HOME/.pyenv/versions/3.12.1/lib` | |
* Click Browse to make sure it opens the dir with the `libpython3.12.dylib` | |
* Put `libpython3.12.dylib` in the Force to use specific Python box | |
* You should see `libpython3.12.dylib is installed.` under the Enable Python checkbox | |
# Create a custom action under show action list.. | |
* Click New action.. | |
* Choose New ReaScript | |
* Change File type to python and make a file called `enable_dist_api.py` | |
* Put the follow code in the window | |
``` | |
import reapy | |
reapy.config.enable_dist_api() | |
``` | |
* Click the run button (should get a confirmation popup and asked to restart Reaper) | |
# Restart Reaper | |
# Try the test script below |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from reapy import reascript_api as RPR | |
RPR.GetCursorPosition() | |
RPR.SetEditCurPos(1, True, True) | |
RPR.GetCursorPosition() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment