Pardon me if I was rude
Well, I had this:
for i = 1, sampcount do
smp = renoise.song().selected_instrument:sample(i)
if smp.volume > 1 then smp.volume = 1 end
sliders[i] =
vb:column {
vb:slider { id = "vol"..i, min = 0, max = 1, value = smp.volume, height = 150, width = 40 },
vb:minislider { id = "pan"..i, min = 0, max = 1, value = smp.panning , height = 20, width = 40 },
vb:minislider { id = "txp"..i, min = -120, max = 120, value = smp.transpose , height = 20, width = 40 },
vb:minislider { id = "fit"..i, min = -127, max = 127, value = smp.fine_tune , height = 20, width = 40 },
vb:popup { id = "lpm"..i, items = LOOP_MODES , value = smp.loop_mode , height = 20, width = 40 },
vb:popup { id = "ctm"..i, items = CUT_MODES , value = smp.new_note_action, height = 20, width = 40 },
}
for _,pmt in ipairs({'vol','pan','txp','fit','lpm','ctm'}) do
vb.views[pmt..i]:add_notifier(function()
loadstring("renoise.song().selected_instrument:sample("..i..")."..pmtname[pmt].." = "..vb.views[pmt..i].value)()
end)
end
vb.views['matrix']:add_child(sliders[i])
end
now tell me that second for loop isn’t rediculous, annoying, and ugly.