Reason call this Keyboard mapping. I think this can be useful in Renoise, too. Assign a unassigned keyboard key to enable/disable an effect. For example, using a Reference effect on master channel and you use a key to actively switch between a reference song and your song.
It’s kinda doable via a custom tool.
I wrote one, Mister Master that adds devices to the master chain: stereo expander, and a gainer.
It then adds OSC hooks so that I can send OSC messages to set the song to mono, or mute/unmute the song while comparing to a reference track (played elsewhere, such as in Reaper)
I ended up not using it much because I now do this sort of A/B thing either totally in Reaper, or using similar features in Ozone 9.
But such code could include an option for keyboard assignment as well.
The big caveat is that the code expects to find tools with specific names.
I do like the idea of being able to add a device, and then when you go to Options|Keyboard that track+device is listed as a target for a keyboard mapping.
Thx for the tip. I made a simple tool for this:
function switch_reference()
--disable recording
renoise.song().transport.record_parameter_mode = renoise.Transport.RECORD_PARAMETER_MODE_PATTERN
--search for master track
for it, track in ipairs(renoise.song().tracks) do
if track.type == renoise.Track.TRACK_TYPE_MASTER then
--search for mcompare
for id, device in ipairs(track.devices) do
if device.name == "VST: MeldaProduction: MCompare" then
for ip, parameter in ipairs(device.parameters) do
if parameter.name == "Selected" then
if parameter.value > 0 then
renoise.song().tracks[it].devices[id].parameters[ip]:record_value(0)
else
renoise.song().tracks[it].devices[id].parameters[ip]:record_value(0.04)
end
end
end
end
end
end
end
end
function openclose_span()
--disable recording
renoise.song().transport.record_parameter_mode = renoise.Transport.RECORD_PARAMETER_MODE_PATTERN
--search for master track
for it, track in ipairs(renoise.song().tracks) do
if track.type == renoise.Track.TRACK_TYPE_MASTER then
--search for mcompare
for id, device in ipairs(track.devices) do
if device.name == "VST: Voxengo: SPAN" then
if device.external_editor_visible then
device.external_editor_visible = false
else
device.external_editor_visible = true
end
end
end
end
end
end
renoise.tool():add_keybinding {
name = "Global:Reference:Reference switch ...",
invoke = function()
switch_reference()
end
}
renoise.tool():add_keybinding {
name = "Global:Reference:Open / Close SPAN ...",
invoke = function()
openclose_span()
end
}
renoise.tool():add_menu_entry {
name = "--- Main Menu:Tools:Reference:Reference switch ...",
invoke = function()
switch_reference()
end
}
renoise.tool():add_menu_entry {
name = "--- Main Menu:Tools:Reference:Open / Close SPAN ...",
invoke = function()
openclose_span()
end
}
Is there a alternative way to set a value instead of using record_value? I also didn’t found a way to disable the edit mode. I disabled parameter recording in the midi mapping dialog, so it will not fill up the master track fx column
Also added a shortcut to open/close SPAN, very cool.
Hi @toimp. I have not tested your code, but only some notes…
You can start like this:
local song=renoise.song
To define your “it” (index of the master track):
local it = song().sequencer_track_count + 1
So you should use this line of code within the iterations:
song():track(it):device(id):parameter(ip):record_value(0)
It will be much faster.
You should also define your functions as local.
local function bla_bla_bla()