Skip to main content

Python wrapper for REAPER DAW REST API

Project description

python-reaperdaw

GitHub Release PyPI PyPI - Downloads Buy me a coffee PayPal_Me

Python wrapper for REAPER DAW REST interface.

Please refer to ReaTeam's web interface modding documentation for API insights.

Setup in Reaper

  1. Launch your Reaper DAW
  2. Hit Ctrl + P or go to Options > Preferences
  3. Navigate to "Control/OSC/web" menu and click "Add"
  4. From the "Control surface mode" dropdown menu choose "Web browser interface"
  5. Set the web interface port or leave default 8080
  6. Optionally set username:password
  7. Optionally set the default web interface
  8. Copy the Access URL and paste it in your browser - now your Reaper has a web interface.
  9. Hit OK in both preference windows

Example usage

import aiohttp
import asyncio
import json
from reaperdaw import Reaper


async def main(host="localhost", port="8080", username="", password=""):

    async with aiohttp.ClientSession() as session:
        reaper = Reaper(session, host, port, username, password)

        # Sets Master Volume to 0db (maximum volume)
        await reaper.setMasterVolume(1)

        status = await reaper.getStatus()
        response = json.loads(status)
        print("Status:", status)
        print("Number of tracks:", response["number_of_tracks"])
        print("Number of armed tracks:", response["number_of_armed_tracks"])
        print("Armed tracks:", response["armed_tracks"])
        print("Time signature:", response["time_signature"])
        print("Play state:", response["play_state"])
        print("Repeat:", response["repeat"])
        print("Metronome:", response["metronome"])


loop = asyncio.get_event_loop()
loop.run_until_complete(main())

getStatus response

{
  "tracks": [
    {
      "index": 0,
      "name": "MASTER",
      "flags": [],
      "volume": "1.000000",
      "pan": "0.000000",
      "last_meter_peak": "-1500",
      "last_meter_pos": "-1500",
      "width_pan2": "1.000000",
      "panmode": "0",
      "sendcnt": "0",
      "recvcnt": "0",
      "hwoutcnt": "1",
      "color": "#000000"
    },
    {
      "index": 1,
      "name": "Track 1",
      "flags": ["record-armed"],
      "volume": "1.000000",
      "pan": "0.000000",
      "last_meter_peak": "-1500",
      "last_meter_pos": "-1500",
      "width_pan2": "1.000000",
      "panmode": "3",
      "sendcnt": "0",
      "recvcnt": "0",
      "hwoutcnt": "0",
      "color": "#764e78"
    },
    {
      "index": 2,
      "name": "Track 2",
      "flags": ["selected"],
      "volume": "1.000000",
      "pan": "0.000000",
      "last_meter_peak": "-1500",
      "last_meter_pos": "-1500",
      "width_pan2": "1.000000",
      "panmode": "3",
      "sendcnt": "0",
      "recvcnt": "0",
      "hwoutcnt": "0",
      "color": "#d9c25b"
    }
  ],
  "repeat": true,
  "metronome": false,
  "time_signature": "4/4",
  "beatpos": {
    "position_seconds": "0.000000000000000",
    "full_beat_position": "0.000000000000000",
    "measure_cnt": "0",
    "beats_in_measure": "0.000000000010000"
  },
  "play_state": "stopped",
  "transport": {
    "playstate": "stopped",
    "position_seconds": "0.000000",
    "repeat": true,
    "position_string": "1.1.00",
    "position_string_beats": "1.1.00"
  },
  "number_of_tracks": 2,
  "number_of_armed_tracks": 2,
  "armed-tracks": ["Track 1"]
}

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

python-reaperdaw-0.0.5.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

python_reaperdaw-0.0.5-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file python-reaperdaw-0.0.5.tar.gz.

File metadata

  • Download URL: python-reaperdaw-0.0.5.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for python-reaperdaw-0.0.5.tar.gz
Algorithm Hash digest
SHA256 5b2c57c05b45423d1dd61fc95ac11f08d8370b2a04e1f69f169912d54b3c9776
MD5 88af1bd7c99b657159e78519ef0ecd09
BLAKE2b-256 37413bf24d9a8c89ed07306b44c94ab6f43b8a7eb6c213777448ceadc5bd28a2

See more details on using hashes here.

File details

Details for the file python_reaperdaw-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: python_reaperdaw-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for python_reaperdaw-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 78fa3168655b8993c8200f94c40be3f27ea67ce9111f5ed9e2d9fde823e2bac3
MD5 b2e136eb9da5b034cf91e91b68e0613a
BLAKE2b-256 e836ceac6bcd939d841a8b22de5da6dff4a5dfbfa68f737d0a00feb3e5ea8ea5

See more details on using hashes here.

Supported by

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