Auto creation of new patterns, when copying patterns using GFX pattern

When you expand the pattern sequencer, the gfx version appears…

This does not create the patterns you need at the end of the song, to clone a section of the song to the end, where you have reached.

We have to create these patterns first, else the copy fails.

Why ? ;(

Lets please select some patterns we wanna clone, for new section of song, or verse, and paste them anywhere we want.

Would be nice if Renoise dont overwrite patterns, and simply create them, after the one it is inside, when you paste those patterns. :slight_smile:

?

When you expand the pattern sequencer, the gfx version appears…

This does not create the patterns you need at the end of the song, to clone a section of the song to the end, where you have reached.

We have to create these patterns first, else the copy fails.

Why ? ;(

Lets please select some patterns we wanna clone, for new section of song, or verse, and paste them anywhere we want.

Would be nice if Renoise dont overwrite patterns, and simply create them, after the one it is inside, when you paste those patterns. :slight_smile:

?

We have to create these patterns first, else the copy fails?

Hi SIDwave, how are you?

I’m not sure what happens to you with duplicate patterns or areas.I’ll explain how I proceed to clone. Steps to select a specific area (or section) and clone it.:

  1. Run Renoise and your project.
  2. Open Matrix Pattern and widen.You will have several written patterns.
  3. Ok!Visually locate the first rectangle (a rectangle is a track within a pattern).
  4. Visually locate the last rectangle.
  5. Press the Shift key and hold down.
  6. Left click with mouse above the first box (initial position).
  7. Left click with mouse above the last box wanted. Note: if the area is too high (does not fit on the vertical screen), use the mouse wheel
  8. Release the Shift key.You have selected a specific area.
  9. Copy: Ctrl + C.Now you can create new patterns (or tracks/groups) or paste over others (overwrite).
  10. Select with mouse the first rectangle where you want to paste (the initial position).
  11. Paste: Ctrl + V.It will clone the previously selected area, respecting the position of each rectangle.

If you use effects within a group, the target area must have a group beforehand.Otherwise, Renoise use a track to paste the effects into the corresponding position. In fact, it does not distinguish between track and group.The starting area should be similar to the target area.If you follow these steps, you still have problems?

I am working on several cloning functions, for my tool. I am interested in this topic.

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…

It passes exactly the same in horizontal. Renoise does not add new tracks:

  • sequence (patterns), vertical
  • index (tracks), horizontal

^

|patterns

|

|

| MATRIX

|

|

|___________________tracks >

If you need more patterns, maybe you need more tracks too