# New Tool (2.8) Auto Clone Patterns

**URL:** <https://forum.renoise.com/t/new-tool-2-8-auto-clone-patterns/29896>\
**Category:** Renoise Tools\
**Created:** [September 16, 2010, 8:07pm UTC](https://forum.renoise.com/t/new-tool-2-8-auto-clone-patterns/29896 "2010-09-16T20:07:54Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![Jonas](https://forum.renoise.com/user_avatar/forum.renoise.com/jonas/32/6937_2.png) [@Jonas](https://forum.renoise.com/u/Jonas)\
**Post date:** [September 18, 2010, 2:18pm UTC](https://forum.renoise.com/t/new-tool-2-8-auto-clone-patterns/29896/21 "2010-09-18T14:18:04Z")

</div>

> [@bystrano](#):
>
> Anyway here is the tool I wrote, but it should be treated as highly experimental.

Nice! Seems to work here fine ![:)](https://forum.renoise.com/uploads/default/original/2X/f/f31646767a12ff3f4d6b8c4766d2ea41b23d4ab9.gif) , thanks!

Am trying to push it to generate possible bugs, and thus far had a crash trying to undo all recorded input with your script enabled, crash gave the following notice in Renoises log:

> [@](#):
>
> CrashLog: Handling Exception! Code : C0000005  
> CrashLog: 0082ACCF: xmlUCSIsCat +490FF
> 
> Application: Caught an unhandled exception (Thread: GUI)!  
> Application: Saving a backup…
> 
> Error Message: A fatal error or crash occurred (unhandled exception in thread: GUI).  
> Error Message: A backup of the current document was saved at  
> Error Message: ‘C:\Users\plugexpert\AppData\Roaming\Renoise\V2.6.0\CrashBackups\Untitled\_9\_18\_2010\_\_16\_8\_crash.xrns’…  
> Error Message: This either happened because of a bug in Renoise, or because of a bug in one of its loaded components (plugins). Please contact [bug@renoise.com](mailto:bug@renoise.com) and report this problem, so that it can be fixed.  
> Error Message: Note: It’s very important that we know exactly what has happened (what you were doing before this message popped up), or the problem cannot be replicated/analyzed. Please include a description of what you were doing and which components were being used…
> 
> Application: Terminating…

---

<div class="post-metadata">

**Author:** ![dac514](https://forum.renoise.com/user_avatar/forum.renoise.com/dac514/32/100_2.png) [@dac514](https://forum.renoise.com/u/dac514)\
**Post date:** [September 18, 2010, 2:47pm UTC](https://forum.renoise.com/t/new-tool-2-8-auto-clone-patterns/29896/22 "2010-09-18T14:47:52Z")

</div>

IMHO, a variation of the Auto Add Pattern concept could be used to build something, here’s a simple spec:

1. Set up a loop in the pattern matrix with the mouse

2. Activate script, start recording

3. The script creates 6 tracks, bright red (like, a rectangle where Y is the loop and X are the tracks) in the pattern matrix, puts Xs on them for good measure. This is to distinguish them from normal tracks

4. As the user records, takes are shifted to the red tracks.

That’s it.

It implies that the user has 6 “punch in tracks” that will be overridden as time goes on, but at least it gives you 6 takes you can use. Change 6 to X if it’s a variable.

It also means idle cpu would be enough to handle this.

---

<div class="post-metadata">

**Author:** ![bystrano](https://forum.renoise.com/letter_avatar/bystrano/32/6_449c533f586939b6e5f246632a46421f.png) [@bystrano](https://forum.renoise.com/u/bystrano)\
**Post date:** [September 18, 2010, 3:46pm UTC](https://forum.renoise.com/t/new-tool-2-8-auto-clone-patterns/29896/23 "2010-09-18T15:46:10Z")

</div>

@ Jonas :  
Looks like a new bug report thread is born… I can’t reproduce it though, and I have no idea what could have caused this. Anyway, buggy scripts can trigger error messages, but if renoise crashes, it’s a bug in renoise.

@ Conner\_Bw :  
Don’t you think step 4 will be a problem to implement? It should happen when the end of the pattern is reached, and I can’t think of a reliable way to “observe” this…

---

<div class="post-metadata">

**Author:** ![dac514](https://forum.renoise.com/user_avatar/forum.renoise.com/dac514/32/100_2.png) [@dac514](https://forum.renoise.com/u/dac514)\
**Post date:** [September 18, 2010, 3:55pm UTC](https://forum.renoise.com/t/new-tool-2-8-auto-clone-patterns/29896/24 "2010-09-18T15:55:50Z")

</div>

> [@bystrano](#):
>
> @ Conner\_Bw :  
> Don’t you think step 4 will be a problem to implement? It should happen when the end of the pattern is reached, and I can’t think of a reliable way to “observe” this…

Minimum 2 patterns?

Shift previous track at any time the current track is playing.

---

<div class="post-metadata">

**Author:** ![bystrano](https://forum.renoise.com/letter_avatar/bystrano/32/6_449c533f586939b6e5f246632a46421f.png) [@bystrano](https://forum.renoise.com/u/bystrano)\
**Post date:** [September 18, 2010, 4:17pm UTC](https://forum.renoise.com/t/new-tool-2-8-auto-clone-patterns/29896/25 "2010-09-18T16:17:29Z")

</div>

> [@dac514](#):
>
> Minimum 2 patterns?

That’s a strong limitation to me… And I don’t see what you could to with this that you can’t do with AutoClone. To me, AutoClone creates a mess in the pattern sequence that you have to clean up after your recordings, and your idea is to create this mess in the tracks instead, but you’ll have to clean up anyway. Have I missed something?

---

<div class="post-metadata">

**Author:** ![dac514](https://forum.renoise.com/user_avatar/forum.renoise.com/dac514/32/100_2.png) [@dac514](https://forum.renoise.com/u/dac514)\
**Post date:** [September 18, 2010, 4:20pm UTC](https://forum.renoise.com/t/new-tool-2-8-auto-clone-patterns/29896/26 "2010-09-18T16:20:53Z")

</div>

> [@bystrano](#):
>
> That’s a strong limitation to me… And I don’t see what you could to with this that you can’t do with AutoClone. To me, AutoClone creates a mess in the pattern sequence that you have to clean up after your recordings, and your idea is to create this mess in the tracks instead, but you’ll have to clean up anyway. Have I missed something?

No, you haven’t missed anything. It’s just a horizontal AutoClone instead of vertical.

I didn’t say the solution was elegant, I just said it could be done with a variation of the current idea in this thread.

---

<div class="post-metadata">

**Author:** ![bystrano](https://forum.renoise.com/letter_avatar/bystrano/32/6_449c533f586939b6e5f246632a46421f.png) [@bystrano](https://forum.renoise.com/u/bystrano)\
**Post date:** [September 18, 2010, 5:24pm UTC](https://forum.renoise.com/t/new-tool-2-8-auto-clone-patterns/29896/27 "2010-09-18T17:24:05Z")

</div>

> [@dac514](#):
>
> No, you haven’t missed anything.

Actually, I missed the word “variation”… Sorry if I sounded too critical.

---

<div class="post-metadata">

**Author:** ![kazakore](https://forum.renoise.com/user_avatar/forum.renoise.com/kazakore/32/258_2.png) [@kazakore](https://forum.renoise.com/u/kazakore)\
**Post date:** [September 21, 2010, 9:30am UTC](https://forum.renoise.com/t/new-tool-2-8-auto-clone-patterns/29896/28 "2010-09-21T09:30:44Z")

</div>

> [@bystrano](#):
>
> That’s a strong limitation to me… And I don’t see what you could to with this that you can’t do with AutoClone. To me, AutoClone creates a mess in the pattern sequence that you have to clean up after your recordings, and your idea is to create this mess in the tracks instead, but you’ll have to clean up anyway. Have I missed something?

I can actually see a lot of benefits to Conner’s way. Most notibly, if you are recording over multiple-pattern loop (say 8 patterns) then it is a lot easier to choose takes for each individual pattern which are the best, while auditioning them with the others.

Although the way I see it would use normal Tracks rather than a new kind it seems Conner is proposing.

You want to take X number of passes. Clone Current Pattern X amount of times (including DSPs.) Mute all newly created Tracks. When you reach end of Loop move to next track and Mute the previous track.

Although don’t we have the issues of Song Position Data maybe not being accurate for this?

This way also helps a lot if you have long samples which rely on the new AutoSeek, even if only a single pattern recording. With current method you would have to move each pattern to the correct position to see how it sounds with the sample playing the correct position. With this method you just unmute the track you want to hear.

---

<div class="post-metadata">

**Author:** ![dac514](https://forum.renoise.com/user_avatar/forum.renoise.com/dac514/32/100_2.png) [@dac514](https://forum.renoise.com/u/dac514)\
**Post date:** [September 22, 2010, 2:41pm UTC](https://forum.renoise.com/t/new-tool-2-8-auto-clone-patterns/29896/29 "2010-09-22T14:41:05Z")

</div>

Before this gets totally derailed, maybe AutoClonePatterns\_v0.4.xrnx is ready for the tools page and everything else is another thread?

---

<div class="post-metadata">

**Author:** ![bystrano](https://forum.renoise.com/letter_avatar/bystrano/32/6_449c533f586939b6e5f246632a46421f.png) [@bystrano](https://forum.renoise.com/u/bystrano)\
**Post date:** [September 23, 2010, 6:56am UTC](https://forum.renoise.com/t/new-tool-2-8-auto-clone-patterns/29896/30 "2010-09-23T06:56:44Z")

</div>

> [@dac514](#):
>
> Before this gets totally derailed, maybe AutoClonePatterns\_v0.4.xrnx is ready for the tools page and everything else is another thread?

Yep, I just uploaded version v0.5, which is pretty much the same as 0.4, but it remembers its state when renoise is quit, meaning you don’t have to enable it everytime you launch renoise.  
I submitted it to the tool page too, it’s waiting for approval…

---

<div class="post-metadata">

**Author:** ![danoise](https://forum.renoise.com/user_avatar/forum.renoise.com/danoise/32/64_2.png) [@danoise](https://forum.renoise.com/u/danoise)\
**Post date:** [September 25, 2010, 11:23am UTC](https://forum.renoise.com/t/new-tool-2-8-auto-clone-patterns/29896/31 "2010-09-25T11:23:09Z")

</div>

This is very cool, but IMHO a little modification would make it even better. Please correct me if the following is already possible:

Say that the looped region contains the “fundamentals”, some groove that you wish to record on top of.  
Currently, the playback must enter the last pattern of the looped region before the auto-clone happens. This means that you are in fact recording something into the “fundamentals”, which is then carried over to the next take, and the next etc., overdubbing style.

Wouldn’t it be more useful if the cloning happened _when_ you entered the looped region? Perhaps this is not the intention of this tool?

---

<div class="post-metadata">

**Author:** ![dac514](https://forum.renoise.com/user_avatar/forum.renoise.com/dac514/32/100_2.png) [@dac514](https://forum.renoise.com/u/dac514)\
**Post date:** [September 25, 2010, 1:04pm UTC](https://forum.renoise.com/t/new-tool-2-8-auto-clone-patterns/29896/32 "2010-09-25T13:04:43Z")

</div>

> [@danoise](#):
>
> Currently, the playback must enter the last pattern of the looped region before the auto-clone happens. This means that you are in fact recording something into the “fundamentals”, which is then carried over to the next take, and the next etc., overdubbing style.

The current track is always deleted on clone, and renoise can only record to 1 track, so nothing gets carried over?

Did you not try the tool?

---

<div class="post-metadata">

**Author:** ![danoise](https://forum.renoise.com/user_avatar/forum.renoise.com/danoise/32/64_2.png) [@danoise](https://forum.renoise.com/u/danoise)\
**Post date:** [September 25, 2010, 3:29pm UTC](https://forum.renoise.com/t/new-tool-2-8-auto-clone-patterns/29896/33 "2010-09-25T15:29:23Z")

</div>

OK, somehow I got the idea that multiple looped patterns were supported.

I’m guessing all it would take is for the cloning to happen when playback enter the first looped pattern, instead of the last one. Would it be too much to ask for? ![](https://files.renoise.com/forum/emoticons/default/laugh.gif)

---

<div class="post-metadata">

**Author:** ![dac514](https://forum.renoise.com/user_avatar/forum.renoise.com/dac514/32/100_2.png) [@dac514](https://forum.renoise.com/u/dac514)\
**Post date:** [September 25, 2010, 3:40pm UTC](https://forum.renoise.com/t/new-tool-2-8-auto-clone-patterns/29896/34 "2010-09-25T15:40:44Z")

</div>

Multiple patterns are supported.

I’m a little confused? Is there a situation where how it works now doesn’t do what you expect? Or you would just rather it behave a different way?

Code wise it’s easy. Change line 81 from

```lua
  
 if renoise.song().transport.playback_pos.sequence == loop_end then  
  

```

To:

```lua
  
 if renoise.song().transport.playback_pos.sequence == loop_start then  
  

```

This should be a preference though, because I prefer the way it works now.

Furthermore, I’m not the author so this is merely an opinion.

Did you use the tool? Or what?

---

<div class="post-metadata">

**Author:** ![dac514](https://forum.renoise.com/user_avatar/forum.renoise.com/dac514/32/100_2.png) [@dac514](https://forum.renoise.com/u/dac514)\
**Post date:** [September 25, 2010, 3:54pm UTC](https://forum.renoise.com/t/new-tool-2-8-auto-clone-patterns/29896/35 "2010-09-25T15:54:28Z")

</div>

Ok I understand your issue now, I think?

This tool is meant to jam on a new track, it’s implied that the track you are recording on is empty. It supports X patterns, no problem. Once you reach the end of your jam, if you want to keep going, tada!

In your case, you have looped X patterns, where every track is full, and you want to create a clone and clear the track automatically before starting to jam.

Am i right?

---

<div class="post-metadata">

**Author:** ![danoise](https://forum.renoise.com/user_avatar/forum.renoise.com/danoise/32/64_2.png) [@danoise](https://forum.renoise.com/u/danoise)\
**Post date:** [September 25, 2010, 4:21pm UTC](https://forum.renoise.com/t/new-tool-2-8-auto-clone-patterns/29896/36 "2010-09-25T16:21:52Z")

</div>

Changing that line worked perfectly, thanks!

Let me try to explain what I didn’t want: the problem is that auto-cloning happens at the last pattern of the looped region, and I have just recorded something into those patterns when the cloning takes place.

But with the cloning happening before we enter the looped region, my backing track is perfectly intact and I can keep playing new stuff for as long as I want (just like how it works with a single pattern).

---

<div class="post-metadata">

**Author:** ![bystrano](https://forum.renoise.com/letter_avatar/bystrano/32/6_449c533f586939b6e5f246632a46421f.png) [@bystrano](https://forum.renoise.com/u/bystrano)\
**Post date:** [September 25, 2010, 8:06pm UTC](https://forum.renoise.com/t/new-tool-2-8-auto-clone-patterns/29896/37 "2010-09-25T20:06:57Z")

</div>

I agree that this behavior is odd, I didn’t think about it this way… It made me realise that this tool will behave even more oddly if you change tracks during your recording, which can definitly happen when jamming over multiple patterns.

I will work a bit on this and release a new version soon.

---

<div class="post-metadata">

**Author:** ![bystrano](https://forum.renoise.com/letter_avatar/bystrano/32/6_449c533f586939b6e5f246632a46421f.png) [@bystrano](https://forum.renoise.com/u/bystrano)\
**Post date:** [September 26, 2010, 8:59am UTC](https://forum.renoise.com/t/new-tool-2-8-auto-clone-patterns/29896/38 "2010-09-26T08:59:58Z")

</div>

I just uploaded a new version, v0.6 on the [tools page](http://tools.renoise.com/tools/auto-clone-patterns).  
The cloning now happens at the beginning of the recording, as suggested by Danoise. It doesn’t clear the currently selected track in the clone anymore, since it’s no more needed. This makes the tool more consistent if you happen to change track during your recording.  
After a recording, you will have an unaltered version of your loop after your recorded patterns. But you may also not want to keep it, so I added an option in the Tools menu that will automatically delete these unaltered patterns on rec stop.

What do you think, is it better like this?

EDIT : I just noticed the tool has to be validated again before it appears on the tool page. I added it as an attachement, so you can test it before it’s validated.

---

<div class="post-metadata">

**Author:** ![danoise](https://forum.renoise.com/user_avatar/forum.renoise.com/danoise/32/64_2.png) [@danoise](https://forum.renoise.com/u/danoise)\
**Post date:** [September 26, 2010, 10:29am UTC](https://forum.renoise.com/t/new-tool-2-8-auto-clone-patterns/29896/39 "2010-09-26T10:29:57Z")

</div>

Yes sir! Works like a charm. I will be using this tool a LOT

---

<div class="post-metadata">

**Author:** ![Jonas](https://forum.renoise.com/user_avatar/forum.renoise.com/jonas/32/6937_2.png) [@Jonas](https://forum.renoise.com/u/Jonas)\
**Post date:** [September 26, 2010, 11:11am UTC](https://forum.renoise.com/t/new-tool-2-8-auto-clone-patterns/29896/40 "2010-09-26T11:11:01Z")

</div>

thanks for the update bystrano!

[Previous page](https://forum.renoise.com/t/new-tool-2-8-auto-clone-patterns/29896.md?page=1)

[Next page](https://forum.renoise.com/t/new-tool-2-8-auto-clone-patterns/29896.md?page=3)
