Skip to content
Christian Fillion edited this page Jun 9, 2017 · 71 revisions
  1. Package Types
    1. ReaScript
    2. JS Effect
    3. Extension
    4. Theme
    5. Language Pack
    6. Web Interface
    7. Misc. Data
  2. Snippets
    1. Bundle additional files
    2. Multiple user-callable scripts
    3. Hide from the action list
    4. Download from internet
    5. Rename a file
    6. Multiple slots
    7. Compatibility syntax

Package Types

ReaScript

(Note that only @version is required)

-- @description Display name/short description
-- @version 1.0
-- @author John Doe
-- @about
--   # Your Package Title
--   Longer description/documentation for this package in *markdown*.
-- @changelog
--   + Initial release

reaper.ShowMessageBox("Hello World", "Script code here", 0)

JS Effect

Utility/Effect Name.jsfx

version: 1.0.5
desc: Display name/short description
author: John Doe
about:
  # Your Package Title
  Longer description and documentation for this package in *markdown*.
changelog:
  - Added super cool feature XYZ
  - Removed unused triggers

@init

@slider

@block

@sample

Extension

Extensions/Brain Interface.ext

@description Display name/short description
@version 1.0.5
@author John Doe
@about
  # Your Package Title
  Longer description/documentation for this package in *markdown*.
@changelog
  - Added super cool feature XYZ
  - Removed unused triggers
@provides
   [darwin] reaper_braininterface.dylib http://example.com/download/$version/$path
   [windows] reaper_braininterface.dll http://example.com/download/$version/$path

Theme

Category/author_Theme Name.theme

@description Theme Name
@version 1.0
@provides ThemeFile.ReaperThemeZip http://stash.reaper.fm/12345/$path
@author John Doe
@links
  Forum Thread http://forum.cockos.com/showthread.php?t=175565
@screenshots
  Arrange Window https://i.imgur.com/niDeNll.png
  MIDI Editor https://i.imgur.com/cixprJ7.png
@about
  Optionally write a description of your theme or some documentation here.

Language Pack

Translations/Klingon.ReaperLangPack

#NAME: LangPack Name
;Version: 1.0.1
;Author: John Doe
;Changelog: Fixed a typo
;About: Optionally write some text here (or remove this line)

[common]
DCEF2B4D03DE723C=Name

Web Interface

Web Interfaces/My Interface.www

@description Web Browser Interface Name
@author YourName
@version 1.0
@screenshot https://i.imgur.com/8NOddMK.png
@about Optionally write some text here (or remove this line)
@provides
  my_interface/index.html
  my_interface/*.{css,js,png}

Misc. Data

Utility/Chord Names.data

@description Display name/short description
@version 1.0.5
@author John Doe
@provides Some Directory/*.txt

Snippets

Bundle additional files

Add @noindex or NoIndex: true at the top of Library_File.lua and User_Callable_File.lua to prevent them from being also indexed.

-- @version 1.0
-- @provides
--   Library_File.lua
--   A Sub Directory/*.png
--   [main] User_Callable_File.lua

reaper.ShowMessageBox("Hello World", "Script code here", 0)

Multiple user-callable scripts

This will create a package containing two files without including itself (because of @metapackage). Notice the lua comment syntax (--) is not required in this case.

@version 1.0
@metapackage
@provides
  [main] User_Callable_File1.lua
  [main] User_Callable_File2.lua

Hide from the action list

The dot means "current file".

-- @version 1.0
-- @provides [nomain] .

function LibraryFunction()
end

Download from internet

@version 1.0
@provides . http://host.com/download/url/for/file1
@provides logo.png http://host.com/download/url/for/file2

Rename a file

This will install "Original.lua" in the repository as "Target/Name.lua".

-- @version 1.0
-- @provides Original.lua > Target/Name.lua

Multiple Slots

This will install the current file under multiple different filenames at once. get_action_context is used to get the current filename and extract the slot number. The @metapackage prevents the current file from being installed as-is so that only those created in the @provides tag are.

-- @version 1.0
-- @metapackage
-- @provides
--   [main] . > myname_slot 1.lua
--   [main] . > myname_slot 2.lua
--   [main] . > myname_slot 3.lua

local script_name = ({reaper.get_action_context()})[2]:match("([^/\\_]+).lua$")
local slot = tonumber(name:match("slot (%d+)"))

reaper.Undo_BeginBlock()

-- code here

reaper.Undo_EndBlock(script_name, 1)

Compatibility syntax

Changelog can also be used as a regular tag in the first block like in the standard syntax. Note that the stars at the start of each line in the first block are only for esthetic purpose and are not required.

--[[
 * ReaScript Name: Display name/short description
 * Version: 1.0
 * Author: John Doe
 * About:
 *   Longer description/documentation for this package in *markdown*.
--]]

--[[
 Changelog:
 * v1.0
    + Initial release
--]]

reaper.ShowMessageBox("Hello World", "Script code here", 0)
Clone this wiki locally