General concepts

Import/export

ReaLearn can import and export data in 2 formats:

JSON

A wide-spread data exchange format. It’s a text format, so if you are familiar with the search & replace feature of your favorite text editor, this is one way to do batch editing.

Luau

A full-blown programming language derived from the famous Lua language that is also used in REAPER itself.

For the programmers and script junkies out there: It’s perfectly possible to program ReaLearn from outside by passing it a snippet of JSON via TrackFX_SetNamedConfigParm(). Parameter name is set-state. This mechanism is implemented on ReaLearn side using REAPER’s named parameter mechanism (search for named_parameter_name).

Example that assumes that the first FX of the first track is a ReaLearn instance:

local track = reaper.GetTrack(0, 0)
local state = [[
{
  "controlDeviceId": "62",
  "feedbackDeviceId": "fx-output",
  "mappings": [
    {
      "name": "1",
      "source": {
        "type": 1,
        "channel": 0,
        "number": 64
      },
      "mode": {},
      "target": {
        "type": 2
      }
    }
  ]
}
]]
reaper.TrackFX_SetNamedConfigParm(track, 0, "set-state", state)

Feedback relay

Feedback relay happens when a feedback-enabled mapping becomes inactive and another feedback-enabled mapping with the same Source becomes active. In that case, ReaLearn has to swap the displayed value of the previous mapping target with the displayed value of the new mapping target.