Tracktion Engine now Open Source!

I’m going through the framework with a fine tooth comb, taking notes and UMLing. :slight_smile:

1 Like

This is by no means “correct” UML but I am working on all the sub frameworks. I use an outdated UML program that does not do namespaces in returns so I added a period.

Project design proto

EDIT - FYI, anybody looking at the UML, it’s not finished, the inheritance lines are ambiguous.

4 Likes

Not really in need of such an engine, but it’s interesting anyway. Just for the sake of seeing a bigger project purely designed in JUCE I glanced over the sources.
Now, timestretch/tracktion_TimeStrech.h peaked my interest. Then seeing ElastiqueStretcher I thought: “Wow, could this be of potential use?”

TRACKTION_ENABLE_TIMESTRETCH_ELASTIQUE destroyed all hopes… so
#pragma comment (lib, “libelastiqueProV3.lib”)
I guess it uses the proprietary zplane implementation? Too bad. Was really hoping there would be something to learn from without further license hassles.

Great project anyway! May I ask what’s the reason for the sudden open source decision? It’s almost too suspicious :joy:

Yes, to be able to use Zplane’s Elastique, you need to be a licensed developer, which costs $$$$$. This prompted me to immediately to look into adding another time/pitch change library into the Tracktion Engine code, namely the RubberBand library. Which has its own licensing and other issues, but at least it is open source so it can be played with.

The LGPL SoundTouch library which the Tracktion Engine uses if there’s no Elastique available doesn’t really cut it by itself. It can be cool for some things but one really needs to have some variety in the pitch and time stretch sound processings and RubberBand gives some of that. (The implementation in my fork is very much a work in progress…)

Yes, it wouldn’t make much sense re-inventing the wheel here. Elastique and few other companies have pretty much nailed time-stretching.

We licence Elastique Pro in Waveform hence the support in Tracktion Engine. Then we provide SoundTouch support for people without an Elastique licence.

@Xenakios I didn’t realise Rubberband was open source and GPL, maybe this is a newer development? This could be a viable alternative for GPL projects, I’ll have to take a look at your fork once I’ve caught up with everything I’ve missed during ADC.

1 Like

It may seem sudden from the outside but we’ve been planning this for a very long time!

There’s nothing really suspicious about it, all the reasons for open sourcing software apply and we want to see what people make with the DAW Engine. As far as we’re aware, there’s not really another project like this out there.

Obviously there is a commercial interest with the paid-for licence tiers but there is always the free tiers for smaller or independent companies which makes it incredibly accessible.

Yes, this is a difficult one. As you’ve discovered, we already have a Project class which is a collection of assets (Edits, audio files, MIDI files, video files etc.) which makes it impossible to call this a Project.

We did think about changing the name to something like Session but that’s fairly equally ambiguous. Arrangement was another candidate but then there’s lots of different types of “arrangements”.

We also have an entire app code base and 15 years worth of users who are used to the “Edit” naming scheme so having this differ in code would be confusing. Project/Edit are notions more commonly found in video editors which is where Jules cut his teeth.

One thing I would say (and I’ll add some documentation to this end soon) is that you should avoid using Project if possible, mainly because it’s not really needed and you can do everything now with an Edit and relative paths (this wasn’t possible until a few weeks ago).
Project (and ProjectManager) is on my list to give a big ValueTree-based overhaul to which may change the API so probably not a good idea to fully rely on that right now.

My implementation is at the moment buggy (not crashing but consumes a huge amount of memory while rendering and produces glitchy audio) but I’ll try to sort it out in the near future. At least if I understand how exactly implementing the time stretch stuff for the Tracktion Engine needs to be done… :wink: RubberBand itself is also a bit vague in terms of how it needs to be used.

I am also thinking about adding Rubberband to HISE so maybe we can solve the riddles from their API as joint venture :wink:

2 Likes

This is amazing, thank you so much.

I am working on a gestural audiovisual live looper named Holofunk that has aspirations to someday work on HoloLens and run in a full spatial audio mode like the new Ambeo app for Magic Leap.

In order to do this I need spatial audio support in my audio library. I’m still sussing out whether JUCE itself supports spatial audio on any Windows platforms. But consider this a request for “beyond multichannel” support: please consider integrating with JUCE’s spatial audio support or even providing it yourself. Augmented reality music creation is about to become huge, and having full access to Tracktion and spatial audio support would be the foundation of an incredible experience.

Thanks!

JUCE has no particular support for surround, multichannel etc audio. The AudioBuffer and some other infrastructure allow doing those but it’s up to you to implement any needed panning and other spatialization processing. The Tracktion Engine unfortunately seems even worse, there apparently are parts in the code that are hardcoded to support only mono or stereo signals. It seems that at this point the Tracktion Engine isn’t going to be useful for multichannel and advanced spatial audio work. But you could use JUCE for the low level audio plumbing and maybe use some other 3rd
party library for the spatial processing.

1 Like

Thanks, that’s helpful. I hope that Tracktion continues its refactoring process into something that supports a general input-to-output audio stream graph including spatial audio support.

Microsoft’s AudioGraph API is pretty good as far as generality and spatial audio support, but for real-time end-to-end latency it just doesn’t cut it. But Microsoft also has WASAPI support for spatial audio. In general I expect more platforms to add their own native spatial audio APIs (e.g. I’m sure ARKit and the Google AR libraries both have spatial audio support), so insofar as JUCE provides cross-platform audio support, spatial audio is becoming part of that.

Off to research how the JUCE native plugin for Unity works with multiple record and/or playback streams. My original approach was to end-run entirely avoid Unity’s audio, using a P/Invoke library wrapping JUCE, but that seems less likely to work when it comes to spatial audio.

As I mentioned somewhere above we don’t have full multi-channel support yet but I do have a plan for how this would work in the Engine.

With a DAW engine there’s an infinite amount of things that could be added so we’ll be largely steered by our own needs in Waveform and demand from users.

That is completely understandable, of course. And anyone like me complaining could instead now roll up one’s sleeves and get to work on it… :wink:

1 Like

Visual Studio 2017’s Intellisense really struggles with a project where the Tracktion Engine is used. (Detects errors in the code where there are no errors, autocomplete is extremely slow etc…)

Do you think it would be possible to do similar tricks in the code base that JUCE eventually did that allowed Intellisense to work relatively fast and mostly correctly?

1 Like

I think we already did that by adding the namespace explicitly to all the header files?

OK, I will check if it is because of something I have done.

I am seeing this too. It’s very bad.

Hmm, I’m not sure what else we could do? Maybe it’s just the size of the header file?
Is there anything else JUCE does apart from the namespace in the header files?

Looking at the source in github it looks like the headers are correctly including the namespace per file but possibly the cpp files do not, for example you’re including cpp files inside a namespace here https://github.com/Tracktion/tracktion_engine/blob/master/modules/tracktion_engine/tracktion_engine_audio_files.cpp I’m pretty sure VS doesn’t like this.

5 Likes