Updated to v0.3 with some fixes.
- The line_index variable in the sandbox is now starting at 1 instead of 0 - for the sake of keeping things consistent and general.
- Function executes on all pattern edits. To make it only react on note value edits, put “if sub_column_type == 1 then…” in function.
- Added a song_pos class that will help iterate thru lines in song.
- Added number_of_lines to renoise.PatternSequence (renoise.song().sequencer.number_of_lines)
Here is an even more complex code example. It will spam the pattern with whatever effect is being entered in the note column fx, until a note is found. It’s quite handy when entering/updating Axx arps.
-- create a song_pos object, helping us to iterate thru song
local song_pos = renoise.SongPos()
-- iterate thru song until a note is found
for k = global_line_index, renoise.song().sequencer.number_of_lines-1 do
song_pos.global_line_index = k
local iter_pattern_idx = song.sequencer.pattern_sequence[song_pos.sequence]
local iter_note_column = song:pattern(iter_pattern_idx):track(track_index):line(song_pos.line):note_column(column_index)
if (iter_note_column.note_value == renoise.PatternLine.EMPTY_NOTE) then
iter_note_column.effect_number_value = note_column.effect_number_value
-- Effect spammer
iter_note_column.effect_amount_value = note_column.effect_amount_value
-- a note is found. quit function.
Since it’s multiline, it has to be pasted in the provided code editor.
Another example, just for “fun”. Track backwards
renoise.song().transport.edit_step = 0; global_line_index = global_line_index - 2
Working on a new version, possibly released this weekend. Some bugs have been found and fixed, like error when editing a group track (thanks ffx). Also optimizations and some behavioral changes that should minimize any confusion during normal tracking.
I’m finishing an editor, preset system and menu at the moment. It’s quite a bit of work making every little detail work properly with preset system and menu updates et c.