Instrument column randomizer

Hey, does anyone know of any way you can randomize the instrument column, preferably within a defined range? Similar to the randomize notes tool perhaps. I want to speed up my workflow for hocketing between different vsts. Thanks.

think you might have to do it manually… or write a lua tool for it!

randomize (or humanize) selection has no effect on the instrument number column, and there isn’t an option for randomization in the advanced editor panel

update, i did that. sort of. i copied the random range track tool and modified it to affect the instrument column.

I’ve pasted the relevant code if you’re interested. The only changes are to affecting the instrument column and to not overwrite start and end lines.

--randomize instrument
local function random_range_track_instrument()
  local spt=song.selected_pattern_track
  local sel=song.selection_in_pattern
  local range={sel.start_line,sel.end_line}
  if (sel~=nil) and not song.selected_effect_column then
    local val_1={}
    local val_2={}
    for ncl=1,12 do
    for lne=range[1]+1,range[2]-1 do
      --instrument value only
      for ncl=1,12 do
        local instrument_col=spt:line(lne):note_column(ncl)
        if (instrument_col.is_selected) then
          if (instrument_col.instrument_value<120) then
            if (val_1[ncl]<120) and (val_2[ncl]<120) then
              if (val_1[ncl]<val_2[ncl]) then
              elseif (val_1[ncl]>val_2[ncl]) then
  else"Random Range Track: first select an area whitin the instrument columns for randomize the instrument!")

  name=("Pattern Editor:Selection:Randomize Instrument (Range Track)"),
  invoke=function() random_range_track_instrument() end

renoise.tool():add_keybinding {
  name=("Pattern Editor:Selection:Randomize Instrument (Range Track)"),
  invoke=function() random_range_track_instrument() end

How would I go ahead and utilize this code snippet? Could you perhaps share the modified tool? The ability to randomize instruments is something I have been missing since day one with Renoise.

main.lua (8.4 KB)
Here is the edited tool. copy it over the main.lua in the random range tool folder.
If you were interested in how you would use the code, you would just copy the code from my previous post and paste it into the lua script for the tool i linked. But sending you the tool is easier. I included a hotkey binding to make it easy to use.

Great! Got it to work. Thank you so much!

I noticed your post is about a year old, but I’m hoping you’ve found a solution to your instrument column randomization issue by now. However, if you’re still on the hunt or for anyone else who might stumble across this thread, I have some ideas that might help.
If you’re feeling adventurous, you could set up a sort of makeshift system using an online d20 roller like the one from It’s obviously not as automated as a specialized tool would be, but it could introduce an element of randomness that might spark some creativity. You roll the d20, and each number could correspond to a different VST or parameter adjustment.

I keep a set of physical polyhedrals on my music desk for random number generators :game_die::upside_down_face:

analog purist

1 Like