It reproduces exactly what you say.Indeed, it does not include the missing pages at the end of the song, renoise is not programmed for it.However, a copy does not fail, but does not start.By not start, does not return an error, simply does nothing.I had never thought of this, because I always add more patterns in the sequence than I need.
Look at this code:
function amic_CH02_8B() --START A NEW SECTION RENOWNED & CLONE PREVIOUS 4 PATTERNS -- OK!
local song = renoise.song()
local seq = song.sequencer
local sid = song.selected_sequence_index
local pattern = song:pattern(sid)
if ( sid >= 4 ) then
local nol = pattern.number_of_lines
--print("nol:", nol)
seq:insert_new_pattern_at( sid + 1 ) --insert new pattern
song.sequencer:set_sequence_is_start_of_section( sid + 1, true ) --start a new section at the current pattern
song.sequencer:set_sequence_section_name( sid + 1, "SECTION CLONED x4" ) --sets a section name
seq:insert_new_pattern_at( sid + 2 ) --insert new pattern
seq:insert_new_pattern_at( sid + 3 ) --insert new pattern
seq:insert_new_pattern_at( sid + 4 ) --insert new pattern
song.selected_sequence_index = sid + 1 --select next pattern
song.selected_pattern:copy_from( song.patterns[seq:pattern( sid - 3 )]) --copy previous pattern in selected pattern
song:pattern(song.selected_sequence_index).number_of_lines = nol
song.selected_sequence_index = sid + 2 --select next pattern
song.selected_pattern:copy_from( song.patterns[seq:pattern( sid - 2 )]) --copy previous pattern in selected pattern
song:pattern(song.selected_sequence_index).number_of_lines = nol
song.selected_sequence_index = sid + 3 --select next pattern
song.selected_pattern:copy_from( song.patterns[seq:pattern( sid - 1 )]) --copy previous pattern in selected pattern
song:pattern(song.selected_sequence_index).number_of_lines = nol
song.selected_sequence_index = sid + 4 --select next pattern
song.selected_pattern:copy_from( song.patterns[seq:pattern( sid )]) --copy previous pattern in selected pattern
song:pattern(song.selected_sequence_index).number_of_lines = nol
song.sequencer:sort() --sort sequence
renoise.app():show_status( "GT16-Colors, AMIC: new section renowned & previous 4 patterns cloned." )
else renoise.app():show_status( "⚠ GT16-Colors, AMIC: please, select the last block pattern to clone x4!" )
end
end
This function is used to clone below 4 patterns, previously selecting the last pattern, which runs at the end of the song.
seq:insert_new_pattern_at( sid + 4 ) --insert new pattern
This line (and similar) command inserts a new pattern, before cloning over.Otherwise it returns an error, a crash.Renoise is prepared to avoid this bug.That is, Renoise orders not paste, the order of inserting new pages is missing.For that, it is necessary to count the number of selected patterns, and subtract, to order add X patterns, the remaining.
This should be reviewed. What you say is better for workflow.By the way, lately I read in the forums many complaints of details related to the workflow…
By the way, " GFX pattern"? A pattern is formed by tracks, only (types: track, group, master and send).Then, each track is made up of different columns, associated with automation and effects chains…