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>
This commit is contained in:
+1174
File diff suppressed because it is too large
Load Diff
+75
@@ -0,0 +1,75 @@
|
||||
--- name: Generic grid controller - Playtime
|
||||
--- realearn_version: 2.16.0-pre.8
|
||||
--- author: helgoboss
|
||||
--- device_manufacturer: Generic
|
||||
--- device_name: Generic
|
||||
--- description: |
|
||||
--- This main preset turns any grid-like controller into a device for doing very basic clip launching via Playtime.
|
||||
---
|
||||
--- This generic preset is intended to be used as fallback if no device-specific preset exists. It lacks features because it can't take advantage
|
||||
--- of device-specific features.
|
||||
--- used_schemes: [grid]
|
||||
--- required_features: [playtime]
|
||||
|
||||
--!strict
|
||||
|
||||
-- Configuration
|
||||
|
||||
local stop_column_if_slot_empty = true
|
||||
|
||||
-- Requires
|
||||
|
||||
local realearn = require("realearn")
|
||||
|
||||
-- Constants
|
||||
|
||||
-- TODO This should be parameterized from the controller preset. One more reason to allow script parameterization :)
|
||||
|
||||
local column_count = 4
|
||||
local row_count = 4
|
||||
|
||||
-- Mappings
|
||||
|
||||
local mappings = {}
|
||||
|
||||
-- For each slot
|
||||
for col = 0, column_count - 1 do
|
||||
for row = 0, row_count - 1 do
|
||||
local mapping = realearn.Mapping {
|
||||
name = `Trigger slot {col + 1}/{row + 1}`,
|
||||
source = realearn.Source.Virtual {
|
||||
character = "Multi",
|
||||
id = `col{col + 1}/row{row + 1}/pad`,
|
||||
},
|
||||
glue = {
|
||||
feedback = realearn.Feedback.Text {
|
||||
text_expression = "{{ target.slot_state.id }}",
|
||||
color = realearn.VirtualColor {
|
||||
prop = "target.slot.color",
|
||||
},
|
||||
},
|
||||
},
|
||||
target = realearn.Target.PlaytimeSlotTransportAction {
|
||||
slot = realearn.PlaytimeSlotDescriptor.Dynamic {
|
||||
column_expression = `control_unit_column_index + {col}`,
|
||||
row_expression = `control_unit_row_index + {row}`,
|
||||
},
|
||||
action = "Trigger",
|
||||
stop_column_if_slot_empty = stop_column_if_slot_empty,
|
||||
},
|
||||
}
|
||||
table.insert(mappings, mapping)
|
||||
end
|
||||
end
|
||||
|
||||
return realearn.Compartment {
|
||||
mappings = mappings :: any,
|
||||
custom_data = {
|
||||
playtime = {
|
||||
control_unit = {
|
||||
column_count = column_count,
|
||||
row_count = row_count,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
+122
@@ -0,0 +1,122 @@
|
||||
--- name: Numbered - FX parameters
|
||||
--- realearn_version: 2.16.0-pre.9
|
||||
--- author: helgoboss
|
||||
--- device_manufacturer: Generic
|
||||
--- device_name: Generic
|
||||
--- description: |
|
||||
--- This main preset is built for controllers that offer a set of knobs and buttons. Each knob will control one parameter of
|
||||
--- the unit FX (which by default resolves to the currently focused FX), starting with parameter 1. Each button will switch
|
||||
--- to the next bank of parameters. If the controller has `bank-left` and `bank-right` buttons, they can be used to switch
|
||||
--- between pages, making it possible to control even more parameters.
|
||||
---
|
||||
--- At the moment, this preset assumes that the controller has exactly 16 knobs and buttons. In future, this will be variable.
|
||||
--- used_schemes: [numbered]
|
||||
|
||||
--!strict
|
||||
|
||||
local realearn = require("realearn")
|
||||
|
||||
--- Configuration
|
||||
|
||||
local multi_count = 16
|
||||
local button_count = 16
|
||||
|
||||
-- Code
|
||||
|
||||
local page_count = 16
|
||||
local bank_count = button_count
|
||||
|
||||
local parameters: { realearn.Parameter } = {
|
||||
{
|
||||
index = 0,
|
||||
name = "Page",
|
||||
value_count = page_count,
|
||||
},
|
||||
{
|
||||
index = 1,
|
||||
name = "Bank",
|
||||
value_count = bank_count,
|
||||
},
|
||||
}
|
||||
|
||||
local mappings: { realearn.Mapping } = {
|
||||
-- Side button left => Decrease page
|
||||
realearn.Mapping {
|
||||
name = "Page -",
|
||||
source = realearn.Source.Virtual {
|
||||
character = "Button",
|
||||
id = "bank-left",
|
||||
},
|
||||
glue = {
|
||||
absolute_mode = "IncrementalButton",
|
||||
reverse = true,
|
||||
},
|
||||
target = realearn.Target.CompartmentParameterValue {
|
||||
parameter = realearn.CompartmentParameterDescriptor.ById {
|
||||
index = 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
-- Side button right => Increase page
|
||||
realearn.Mapping {
|
||||
name = "Page +",
|
||||
source = realearn.Source.Virtual {
|
||||
character = "Button",
|
||||
id = "bank-right",
|
||||
},
|
||||
glue = {
|
||||
absolute_mode = "IncrementalButton",
|
||||
reverse = false,
|
||||
},
|
||||
target = realearn.Target.CompartmentParameterValue {
|
||||
parameter = realearn.CompartmentParameterDescriptor.ById {
|
||||
index = 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
-- Encoder movement => Set FX parameter value
|
||||
for i = 0, multi_count - 1 do
|
||||
local m = realearn.Mapping {
|
||||
name = `Set parameter value {i + 1}`,
|
||||
source = realearn.Source.Virtual {
|
||||
character = "Multi",
|
||||
id = i,
|
||||
},
|
||||
target = realearn.Target.FxParameterValue {
|
||||
parameter = realearn.FxParameterDescriptor.Dynamic {
|
||||
fx = realearn.FxDescriptor.Instance {},
|
||||
expression = `p[0] * {page_count} * {bank_count} + p[1] * {bank_count} + {i}`,
|
||||
},
|
||||
},
|
||||
}
|
||||
table.insert(mappings, m)
|
||||
end
|
||||
|
||||
-- Encoder push => Select bank
|
||||
for i = 0, button_count - 1 do
|
||||
local normalized_bank = i / (button_count - 1)
|
||||
local m = realearn.Mapping {
|
||||
name = `Switch to bank {i + 1}`,
|
||||
source = realearn.Source.Virtual {
|
||||
character = "Button",
|
||||
id = i,
|
||||
},
|
||||
glue = {
|
||||
out_of_range_behavior = "Min",
|
||||
target_interval = { normalized_bank, normalized_bank },
|
||||
},
|
||||
target = realearn.Target.CompartmentParameterValue {
|
||||
parameter = realearn.CompartmentParameterDescriptor.ById {
|
||||
index = 1,
|
||||
},
|
||||
},
|
||||
}
|
||||
table.insert(mappings, m)
|
||||
end
|
||||
|
||||
return realearn.Compartment {
|
||||
parameters = parameters,
|
||||
mappings = mappings,
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
local mappings = {}
|
||||
|
||||
for i = 0, 7 do
|
||||
local m = {
|
||||
name = tostring(i + 1),
|
||||
source = {
|
||||
kind = "Key",
|
||||
keystroke = {
|
||||
modifiers = 1,
|
||||
key = 49 + i,
|
||||
},
|
||||
},
|
||||
glue = {
|
||||
button_filter = "PressOnly",
|
||||
},
|
||||
target = {
|
||||
kind = "SendMidi",
|
||||
message = "B0 00 0" .. i,
|
||||
},
|
||||
}
|
||||
table.insert(mappings, m)
|
||||
end
|
||||
|
||||
return {
|
||||
kind = "MainCompartment",
|
||||
value = {
|
||||
mappings = mappings,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user