Hi, I have this, that used to work ( a function for wiping effect amounts and effect values in selection) and I’ve tried to optimize it so that it won’t cause a “tool became unresponsive” when working with 512 row patterns.
I’m wondering why doesn’t this actually do anything?
local ecvisible=nil
if renoise.song().selection_in_pattern==nil then return else end
ecvisible=renoise.song():track(renoise.song().selected_track_index).visible_effect_columns
for i=renoise.song().selection_in_pattern.start_line,renoise.song().selection_in_pattern.end_line do renoise.song():pattern(renoise.song().selected_pattern_index):track(renoise.song().selected_track_index):line(i):effect_column(ecvisible).number_string=".."
renoise.song():pattern(renoise.song().selected_pattern_index):track(renoise.song().selected_track_index):line(i):effect_column(ecvisible).amount_string=".."
end
end
so at first i’m defining that ecvisible will be nill from start, but then read that the visible effect column number will be in ecvisible.
then I start a for-loop, where you start from start_line selection in pattern, and then you end in end_line selection in pattern.
then you do, to that specific pattern index, to that specific track index, to those lines between start_line and end_line, and to those available effect columns, the set of setting number_string be “…”. Then for the amount_string the amount_string will be set to “…”.
I run this script, see no errors, but nothing actually happens. so, what am i missing?
i put a print between ecvisible and for-loop, and i get the correct amount (2 effect columns). so there should be, in theory, no issues, right?
I’ve been instructed to use : because it is faster, but what might i be doing wrong in this after all?