Cannot modify all device parameters?

image

I noticed that certain parameters of the internal effects are not accessible via the generic Lua API.
For example the Display-Mode and the channel mode of the EQ5 here are not exposed as parameters.

My question: Is there a canonical way to modify these?
I figured that I could theoretically modify the XML-Data from the preset. The channel mode value seems to be there. But not the display-mode. Is there a convenient API for modifying XML values?

This has been bugging me for a while. Any help is appreciated.

<?xml version="1.0" encoding="UTF-8"?>
<FilterDevicePreset doc_version="12">
  <DeviceSlot type="Eq5Device">
    <IsMaximized>true</IsMaximized>
    <InputMode>L+R</InputMode>
    <MaxVisualizedGain>20</MaxVisualizedGain>
    <Gain0>
      <Value>0.0</Value>
    </Gain0>
    <Gain1>
      <Value>0.0</Value>
    </Gain1>
    <Gain2>
      <Value>0.0</Value>
    </Gain2>
    <Gain3>
      <Value>0.0</Value>
    </Gain3>
    <Gain4>
      <Value>0.0</Value>
    </Gain4>
    <Frequency0>
      <Value>100</Value>
    </Frequency0>
    <Frequency1>
      <Value>1000</Value>
    </Frequency1>
    <Frequency2>
      <Value>4000</Value>
    </Frequency2>
    <Frequency3>
      <Value>8000</Value>
    </Frequency3>
    <Frequency4>
      <Value>12000</Value>
    </Frequency4>
    <BandWidth0>
      <Value>1.0</Value>
    </BandWidth0>
    <BandWidth1>
      <Value>4</Value>
    </BandWidth1>
    <BandWidth2>
      <Value>4</Value>
    </BandWidth2>
    <BandWidth3>
      <Value>4</Value>
    </BandWidth3>
    <BandWidth4>
      <Value>1.0</Value>
    </BandWidth4>
  </DeviceSlot>
</FilterDevicePreset>

Doesn’t seem so, but it’s easy enough to ham-hand any non-exposed settings by using string substitution and overwriting the XML, ala:

local t = renoise.song().selected_track
local last_device_idx = table.getn(t.devices) + 1
local send = t:insert_device_at('Audio/Effects/Native/#Send', last_device_idx)
local settings = {
  MuteSource = 'false',
  ApplyPostVolume = 'false',
  IsMaximized = 'false',
  -- etc, etc
}

local preset = send.active_preset_data

-- abstract this into its own function for profit
for k,v in pairs(settings) do
  local p_from = "<"..k..">(.*)</"..k..">"
  local p_to = "<"..k..">"..v.."</"..k..">"
  -- string substitution, aka "The Hand of Ham"
  preset = string.gsub(preset, p_from, p_to)
end

-- "overwrite" preset
send.active_preset_data = preset

It doesn’t look like it should work, but it does. In your case, you’d want to rewrite the InputMode node, but as for DisplayMode…??? I’ve got nothing.