Files
virtual-controller/plugin-reaper-relearn/doc/realearn/modules/ROOT/pages/further-concepts/general.adoc
T
Paul Lipscomb 7ecc718f5d Reorganize top-level directories with clearer naming convention
app -> app-desktop-macos, presets -> app-presets, server -> remote-server,
daw-config-reaper -> osc-config-daw, plugin-reaper-realearn -> plugin-reaper-relearn.
Updated run.py and presets.py path references accordingly.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-15 17:51:05 -04:00

55 lines
1.8 KiB
Plaintext

= General concepts
[[import-export]]
== Import/export
ReaLearn can import and export data in 2 formats:
link:https://www.json.org/json-en.html[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 link:https://en.wikipedia.org/wiki/Text_editor[text editor], this is one way to do batch editing.
link:https://luau.org/[Luau]::
A full-blown programming language derived from the famous Lua language that is also used in REAPER itself.
[TIP]
====
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 https://www.reaper.fm/sdk/reascript/reascripthelp.html#TrackFX_SetNamedConfigParm[`TrackFX_SetNamedConfigParm()`].
Parameter name is `set-state`.
This mechanism is implemented on ReaLearn side using https://www.reaper.fm/sdk/vst/vst_ext.php[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:
[source,lua]
----
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
Feedback _relay_ happens when a feedback-enabled mapping becomes inactive and another feedback-enabled mapping with the same xref:key-concepts.adoc#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.