Ableton Live-Style Timeline Duplication

Discussion about: tracktion.com
Post Reply New Topic
RELATED
PRODUCTS

Post

Hey all,

I've been trying Waveform again and have been really impressed. I've never been 100% happy with any DAW I've used but Waveform now does pretty much everything I would want a DAW to do. All the annoyances and pain points from when I tried it years ago seem to have since been resolved. One thing I do miss is being able to duplicate a time selection like in Ableton Live. Basically you select time across one or more tracks and as many times as you hit ctrl/cmd+d it will duplicate that selection. Like this:
custom-duplicate2.gif
Waveform duplicate does not work like this but as you can see I've created a macro to mimic Live's functionality. I thought I would share the script in case anyone else is interested in it. Here it is:

Code: Select all

if(Tracktion.getPosition ('markOut')){
    // There is a range set

    // Comment this line to avoid splitting clips partially in the marked region (they will instead be ignored
    // if they start before the marked region)
    Tracktion.splitMarkedRegion();

    // Select all marked clips, then get them in an array
    Tracktion.selectClips ('marked');

    var selectedClips = Tracktion.getSelectedEditElements ('clip');

    if(selectedClips.length){
        // There are clips in the marked region
        // Iterate over the array to find the offset from markIn of the clip with the earliest start
        var offset = Math.pow(10, 1000);
        for(var i = 0; i < selectedClips.length; i++){
            var clipOffset = selectedClips[i].getProperty ('start') - Tracktion.getPosition ('markIn');
            if(clipOffset < offset){
                offset = clipOffset;
            }
            if(offset === 0){
                break;
            }
        }

        if(offset < 0 || offset === Math.pow(10, 1000)){
            offset = 0;
        }

        // Copy clips in the current time selection
        Tracktion.copy();
        // Paste in place - pasted clips are selected automatically
        Tracktion.paste();
        // Move the cursor to markOut plus the offset of the earliest clip
        // and then move the selected clips (i.e. the ones that were just pasted) there as well
        Tracktion.setPosition ('cursor', Tracktion.getPosition ('markOut') + offset);
        Tracktion.moveStartOfSelectedClipsToCursor();

        // Shift the marked region over by one length
        // Grab current markOut position
        var markOut = Tracktion.getPosition ('markOut');

        // Move markOut one length forward
        Tracktion.setPosition ('markOut', markOut + (markOut - Tracktion.getPosition('markIn')));
        // Set markIn to the old markOut position
        Tracktion.setPosition ('markIn', markOut);
    }
    // No marked clips - do nothing
}else{
    // No range set - just call regular duplicate method
    Tracktion.duplicate();
}
Let me know if you find it useful (or encounter any issues)!
You do not have the required permissions to view the files attached to this post.
Softsynth addict and electronic music enthusiast.
"Destruction is the work of an afternoon. Creation is the work of a lifetime."

Post

You could put the bit you want to repeat in an Edit and then insert the Edit multiple times in your main Edit.

I've been looking at a 1989 DOS MIDI sequencer (software) I bought in 1990 (finally found the floppy disk - 5.25" (!)) and dug out the manual. It allows for the insertion of MIDI phrases (which it calls patterns) wherever required. I need to scan the user manual at some point, and then it's all going on archive.org. I'll send details to the T devs, because the MIDI is more thorough than anything I've seen since. I have a Yamaha hardware sequencer (QX5, IIRC) that allows patterns too. Just record/create a pattern once and refer to it anywhere in your song.
[W10-64, T5/6/7/W8/9/10/11/12/13, 32(to W8)&64 all, Spike],[W7-32, T5/6/7/W8, Gina16] everything underused.

Post

Hi,
arranger does the same and your script doesn't work for me.
Thanks
Orion, Bitwig, Tracktion, Mixbus :party: :tu: :clap:
Win 10, intel i7, ram 20 steinberg UR22mkII :wink:

Post

imstre wrote: Thu Feb 29, 2024 7:57 am Hi,
arranger does the same and your script doesn't work for me.
Thanks
Hi,
Not sure what you mean, sorry. Is there functionality I missed that already does this? For the script, what happens when you highlight some tracks with clips and invoke the macro? It's possible that there's some setting that might interfere with it but I haven't found any that cause issues.
Softsynth addict and electronic music enthusiast.
"Destruction is the work of an afternoon. Creation is the work of a lifetime."

Post

Here's a video that explains the arranger track.

https://www.youtube.com/watch?v=OtujnuccvHM

d.

Post

dayvyg wrote: Thu Feb 29, 2024 11:15 pm Here's a video that explains the arranger track.

https://www.youtube.com/watch?v=OtujnuccvHM

d.
Yeah, the arranger track is very cool but it works across all tracks (as far as I can tell). My use case here is more for making drum beats or something else where you are arranging clips on a few tracks in a repeating pattern but you are not working with all tracks at once. I know a lot of people like to do drum beats with MIDI or step clips but I like to do them right in the timeline.
Softsynth addict and electronic music enthusiast.
"Destruction is the work of an afternoon. Creation is the work of a lifetime."

Post

Greenstorm33 wrote: Thu Feb 29, 2024 12:03 am Hey
hi!
thanks for your script. Yes, the arranger works for all tracks. standard methods with allocation do not allow duplicating normally, duplication occurs with an error. Your method is very good! thank you!

Post Reply

Return to “Tracktion”