[SOLVED] Can a tool include a native device preset?

i’m wondering if there’s a way of providing presets for native devices that are loaded directly from within the script itself? i.e. they are packaged as .xrnt files for instance, and instead of importing them in, they are loaded directly.

@taktik the reason i’m doing this is that for instance the Send + MultiBand Send devices do not have Mute setting control available via API, so one has to jump through hoops to get certain states of the device going.

i tried loading .xrdp but it didn’t work. i’m not sure what the difference is between .xrdp and .xrdt

found that it is possible, just requires one to first read the XML. kinda like this

function read_file(path)
    local file = io.open(path, "r")  -- Open the file in read mode
    if not file then
        error("File not found: " .. path)
    end
    local content = file:read("*a")  -- Read the entire content of the file into a string
    file:close()
    return content
end

  if s.selected_track.devices[checkline].name=="#Multiband Send" then 
  s.selected_track.devices[checkline].parameters[1].show_in_mixer=false
  s.selected_track.devices[checkline].parameters[3].show_in_mixer=false
  s.selected_track.devices[checkline].parameters[5].show_in_mixer=false 
      local PakettiMultiSend_xml_file_path = "Presets/PakettiMultiSend.XML"
    local PakettiMultiSend_xml_data = read_file(PakettiMultiSend_xml_file_path)
renoise.song().selected_track.devices[2].active_preset_data=PakettiMultiSend_xml_data

  else end

  if s.selected_track.devices[checkline].name=="#Send" then 
  s.selected_track.devices[2].parameters[2].show_in_mixer=true
    local PakettiSend_xml_file_path = "Presets/PakettiSend.XML"
    local PakettiSend_xml_data = read_file(PakettiSend_xml_file_path)
renoise.song().selected_track.devices[2].active_preset_data=PakettiSend_xml_data
else end

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.