Non-linear time app with TE

Is the Tracktion Engine suitable for “non-linear time” apps ?
(thinking about something where you can launch/loop/stop different sequences at different moments, à la ableton session view)


It’s possible but at the moment requires some clever manipulation of clips on a timeline. We’ve done it before in apps.

We do have a plan to add clip-launching in a much simpler way to the Engine but need to prioritise this with other things. If it’s something that’s needed by a lot of devs, it will certainly help boost the priority!


Well as you know dave96, I’m eagerly waiting on it! :grinning:

I’ve also been curious if TE might be suitable for creating a tracker…

ah, interesting, I’ll think about it!

Not sure we can handle the loop aspect this way though. I’m thinking about having several sequences/clips/time selections/whatever playing, each one with a different start time and duration, and all/some played in loop… is that something that can be done with the same workaround?

+1 for that. But I’m also curious what are “the other things”… :slight_smile:

It’s possible with MIDI clips and possibly with audio that doesn’t need to be time-stretched (and that includes having a dynamic tempo track).

Other big possible features include improved surround/multi-channel support and running the Engine as a plugin with fully synchronised timeline.
There’s also requests for bindings to other languages and a higher level API.

We also have to balance this against improving documentation and adding examples/tutorials (and obviously what we need to add for new Waveform features).

So it’s really down to what we can fit in and what people want to see the most. Let us know!


Hey guys,

I’m currently trying to acheive Live style clip launching with Tracktion Engine, has there been any movement on this since this post was made?

@dave96 you mentioned that you’d already had success doing this in your own applications. Would you mind giving a basic overview of how you did it?

At the moment I’ve got looping working by using MIDIClip, setting the loop range to the length of the clip and setting the length to be Edit::maximumLength - the desired clip start point. As you can imagine this is slow when generating clips as createLoopRangeDefinesAllRepetitionsSequence needs to generate up to 48 hours worth of MIDI lol.

My next idea is to have a thread that re-adds a clip further down the timeline before it finishes looping, but before I venture down this path is there any advice you can give me on whether its a viable approach?



That second approach is how I’ve done it before. Just do it on a timer rather than a thread as interacting with the model isn’t thread safe.

You can also remove old clips that aren’t playing anymore to avoid creating a huge ValueTree in the model.


I’m interested in that as well (clip triggering ala ableton). I might try something with a timer that keeps on adding new clips. For this strategy what is a good way to trigger audio? Is it a good idea to use clips + audio samples similsr to the step sequencer demo (using a SamplerPlugin instance per track and loading one loop only to each sampler)?

I’m also interested in a clip launching mode. In the meantime, I’d love some pointers on the timeline + timer approach.

The general idea is that you just run a timer and keep the area around the playhead populated with clips with the content that you need. It just needs a bit of thought as to where the playhead is and what content you want on the timeline around it.

1 Like

I’m interested.


TBH I’m in the middle of working on features that should mean you won’t have to do the timeline + timer approach anymore. It’s a big chunk of work though so won’t be done for a few months at best.



4) Add Beat-based AudioNodes [complete, June 2022]

now complete on the roadmap, the innovation that facilitates looping/clip launching? If so, what sort of things should we be looking at, conceptually, to implement? I see that there’s a LoopingMidiNode class now, though I’m not sure I’ve seen a similar construct for audio. Am I looking in the right place? Thanks.

1 Like

The audio equivalent is WaveNodeRealTime.

Yes and no. This is really the backend to clip launching. It’s possible now to do clip-launching type features if you control clip additions/removals on the timeline yourself.

You enabled this mode for both MIDI and audio by calling setUsesProxy (false) on them. This stops them creating proxy files/sequences so all the processing happens during the audio callback and time is more flexible.

For full feature support, we’ll need to add some additions to the model to have a notion of “launch cells/slots”.

1 Like

Thanks Dave. Will dig in, and I’m sure I’ll revert with clarifying questions

Hi Dave

I’m trying to implement your idea (I run a timer and keep the area around the playhead populated with clips with the content that I need) but I get glitchy playback.

I created a PIP to reproduce the behavior:
AudioGlitchWhenMovingClips.h (4.7 KB)

Many thanks

It might be simpler if you call setUsesProxy (false) on the clips and then loop them in to the far future.
If you want to then stop them playing you can change the end times of the clips.
Obviously if the transport position changes you’ll also need to update the clips to ensure they’re over the playhead.

Does that help?

I don’t have MidiClip::setUsesProxy because I’m using Tracktion engine 1.1.
I can’t loop clips, because my final goal is to record the output to a destination track using getWaveInputDevice() and setTargetTrack().
It’s not possible to move clips using setStart() during playback without audio glitches ?

Thanks a lot

Yes it should be possible but so much has changed with TE 2.0 that we can’t really debug v1.1 any more. The changes in 2.0 have been specifically added to allow this functionality and fix any glitches when moving/resizing etc. playing clips.