Nice start.
Some things may be possible, but not in all cases.
With the effect plugins, i suspect stuff is possible. you could figure out which parameter you are changing in the Fx plugin editor and allow a user to make the parameter "visible"in the mixer.
Even though the is_automatable parameter is read-only, this way, one can at least tag parameters for automation by rightclicking on them in the mixer-view because we can influence if parameters are shown or hidden in the mixer view.
With instrument plugins, we have a pretty serious problem because we lack two two fundamental aspects for the instrument automation device in the current API.
Just to continue on your above suggestion, i once created this snippet right after i released the pitch device plugin:
function get_active_instrument_parameters()
local sng = renoise.song()
local cur_ins = sng.selected_instrument_index
if sng.instruments[cur_ins].plugin_properties.plugin_loaded == false then
return -1
end
local vsti_parameters = sng.instruments[cur_ins].plugin_properties.plugin_device.parameters
for x = 1, #vsti_parameters do
local func_ref = 'i'..tostring(cur_ins)..'p'..tostring(x)
if device_notifiers[func_ref] == nil then
device_notifiers[func_ref] = function()
local ins_name = sng.instruments[cur_ins].name
local title = vsti_parameters[x].name
local parvalue = vsti_parameters[x].value_string
local message = "Instrument ["..ins_name.."] is changing parameter #"..tostring(x).." ["..title..
"] with value ["..parvalue.."]."
renoise.app():show_status(message)
end
end
if not vsti_parameters[x].value_observable:has_notifier(device_notifiers[func_ref]) then
vsti_parameters[x].value_observable:add_notifier(device_notifiers[func_ref])
end
end
end
renoise.tool():add_menu_entry {
name = "Main Menu:Tools:show plugin parameters",
invoke = get_active_instrument_parameters
}
In the above case we speak of figuring out which parameter of VSTI plugin X we need. The only way we can do some figuring out is if we can control the Inst. automation device in more details
There are however two problems that we as scripters can’t overcome here.
Problem one:We cannot change the selected parameter link in the instr. automation device
Problem two:We cannot find out which parameters are exactly linked to the vsti instrument.
And what do i mean with problem two? Well the parameters in the instrument automation device don’t have a relative link number, only a name, but the name won’t help us as this painful screenshot illustrates:
Currently this is what we have
class: DeviceParameter
properties:
is_automatable
is_automated
is_automated_observable
is_midi_mapped
is_midi_mapped_observable
name
polarity
show_in_mixer
show_in_mixer_observable
time_quantum
value
value_default
value_max
value_min
value_observable
value_quantum
value_string
value_string_observable
methods:
__STRICT
record_value
We lack a parameter index (which parameter number of that plugin is frankly selected?) to do the actual comparing with what we got back from the parameter notifier of the vsti plugin that we are monitoring.
And we also need this index to be read/write enabled, else we won’t be able to program the instr. automation device for the user.
So if the instr. automation device would be expanded with that one editable property, we can script a parameter-learning system for vsti plugins.
Owhyeah, ofcourse, we need to know which plugin is linked, so also the linked instrument index needs to be available for reading and writing.