Thank you very much for all the help!
After investigating I have already found the error.
The error is in the index of âend_columnâ. Iâll explain what happens, but I think this is poorly designed under Renoiseâs hood, and should be resolved.
To select only the first note column, this doesnât work:
renoise.song().selection_in_pattern={
start_line=1,
end_line=16,
start_track=1,
end_track=1,
start_column=1,
end_column=1 --index 1 not work!
}
It works like this:
renoise.song().selection_in_pattern={
start_line=1,
end_line=16,
start_track=1,
end_track=1,
start_column=1,
end_column=2 --index >1, inconsistent with the selection range!
}
This makes it impossible to select the last effect column. Because the index of âend_columnâ would be higher than the valid range(1), and it returns error.
(1)
Column indexes are valid from 1 to
(renoise.song().tracks.visible_note_columns + renoise.song().tracks.visible_effect_columns)
For example, if the selected track is 1, and it only has 1 visible note column and 8 visible effect columns, this doesnât work:
renoise.song().selection_in_pattern={
start_line=1,
end_line=16,
start_track=1,
end_track=1,
start_column=9,
end_column=10 --index 10 return error!
}
Should be valid:
renoise.song().selection_in_pattern={
start_line=1,
end_line=16,
start_track=1,
end_track=1,
start_column=9,
end_column=9 --but index 9 not show the selection!
}
It clearly looks like a design error in setting the starting and ending index of the column. Can anyone confirm this?
As I think it should beâŚ
For the correct selection of the first note column, it should be:
start_column = 1
end_column = 1
For column 3:
start_column = 3
end_column = 3
For note column 12:
start_column = 12
end_column = 12
For the first effect column with 1 visible note column:
start_column = 1 + 1
end_column = 1 + 1
For the last effect column with 1 visible note column:
start_column = 1 + 8
end_column = 1 + 8
I doubt that @taktik is not aware of this. I assume he have defined the range this way allowing for that little bug that prevents selecting only the last effect column. It is a âfairly hiddenâ matter.
Edit:
Apparently, this error will only happen if the user does not make a first selection with the mouse or keyboard commands. If you do, the indexes will already work correctly. There also appears to be an initial mismatch in the selection area.
There seems to be an initial problem with the index of end_column. This messes up the programming of any tool that uses end_column so that it works correctly from the beginning.
Does anyone want to play around with this by programming a test tool to see if it comes to the same conclusion? This is a somewhat confusing topic.