Skip to content

darkstardevx/REAPER_Scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome to my REAPER Scripts Repository

This is a journey into creating REAPER Scripts (ReaScripts) while learning the LUA Programming language. I always prefer to learn a new programming language by diving in and learning the code as I go along, I do use reference and APIs when necessary though. All the scripts contained herein were created by using Templates, Google Search, LUA reference and ChatGPT Assistance.

ReaScript is a feature that allows you to edit, run and debug scripts within REAPER. Scripts are simple text files from which you can call any REAPER action, and also call back into most of the REAPER API functions (the same API used by compiled REAPER plug-ins and extensions). ReaScript can be used to create anything from advanced macros to full-featured REAPER extensions.

Supported scripting languages:

EEL2

  • A language developed in-house (but open source) which has some similarities to C and JavaScript. EEL is also used to write JSFX plug-ins, OSCII-bot scripts, and video processing effects in REAPER. EEL offers high run-time performance. It supports basic UI management (dedicated script window, docking, context menus, mouse input, etc) and graphics manipulation (drawing primitives, loading image files, etc). EEL is embedded within REAPER and requires no additional downloads or settings.

Lua (v5.4)

  • A popular scripting language. Lua is probably easier to learn and use than EEL or Python, and offers good performance. It supports the same UI and graphic features as EEL. As a general-use scripting language, Lua also benefits from third-party resources, libraries, tutorials, and code examples. Lua is embedded within REAPER and requires no additional downloads or settings. Note that REAPER v6.x and earlier used Lua v5.3.

Python (v2.7-v3.x)

  • Another popular scripting language. Python must be downloaded and installed separately (see requirements) and as such, will never be as portable between users as EEL or Lua. Within REAPER, Python performance is not as good as EEL or Lua, and does not offer any UI or graphic features. However, Python does benefit from a vast number of third-party resources, libraries, tutorials, and code examples.

What is the REAPER Scripts API?

REAPER, a digital audio workstation (DAW) developed by Cockos, offers an extensive API for scripting. This allows users to customize and automate workflows, create custom actions, and even develop new features. Scripts can be written using EEL, Lua, or Python.

How to Access the API Index

The official API documentation is available on the Cockos REAPER Developer Documentation page. It includes:

  • Function Reference: A list of all API functions, their descriptions, parameters, and return values.
  • Constants and Variables: Predefined constants that are useful in scripts.
  • Examples: Code snippets for common tasks.

Getting Started with REAPER Scripts

  1. Enable ReaScript:
  • Go to Options > Preferences > Plug-ins > ReaScript.
  • Make sure scripting languages (Lua, Python, or EEL) are installed and configured.
  1. Script Editor:
  • Open REAPER, go to Actions > Show Action List.
  • Click on "New" to create a new script, or "Edit" to modify an existing one.
  1. Learn the Basics:
  • Start by exploring simple scripts, like toggling the metronome or setting the tempo.
  • Use the reaper.ShowConsoleMsg() function to debug scripts by printing messages.

Example Script in Lua

Here’s a basic Lua script that displays a "Hello, World!" message in REAPER:

reaper.ShowConsoleMsg("Hello, World!\n")

Key API Categories

  • Project Management: Functions to manipulate projects, tracks, and items.
  • Audio Control: Adjust volume, pan, FX, etc.
  • MIDI: Work with MIDI data and events.
  • UI Interaction: Create custom dialogs, toolbars, and menus.

Additional Resources

  • REAPER Forum: Scripting: A great place to ask questions and share scripts.
  • ReaTeam Scripts Repository: A collection of community scripts for REAPER, accessible via ReaPack.

Let me know if you'd like help with a specific script or API function!

Releases

No releases published

Packages

No packages published