Skip to content

Instantly share code, notes, and snippets.

@bjorn-nesby
Created June 1, 2018 13:21
Show Gist options
  • Save bjorn-nesby/899e95a7b0525960a01dd24a05393aa0 to your computer and use it in GitHub Desktop.
Save bjorn-nesby/899e95a7b0525960a01dd24a05393aa0 to your computer and use it in GitHub Desktop.
xRules rule: routing MIDI input to specific tracks, based on the note value
-----------------------------------------------------------
-- Ruleset definition for xRules
-- More info @ http://www.renoise.com/tools/xrules
-----------------------------------------------------------
return {
osc_enabled = false,
manage_voices = false,
description = "",
{
["actions"] = {
{
["call_function"] = [[-- set to this instrument (NB: 01 is "00" in Renoise)
instrument_index = 1
if (message_type == "note_on")
or (message_type == "note_off") then
-- specify track routings
if (values[1] == 24) then -- C-2
track_index = 1
elseif (values[1] == 26) then -- D-2
track_index = 2
end
end ]],
},
{
["output_message"] = 1,
},
},
["conditions"] = {},
["match_any"] = true,
["midi_enabled"] = true,
["name"] = "",
["osc_pattern"] = {
["pattern_in"] = "",
["pattern_out"] = "",
},
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment