Best Practices for Saving Additional Metadata within an Edit

Hi there. I’m just starting a project with Tracktion Engine and I’m wondering if there is a way to extend Edit’s to add additional metadata for a track or clip so that it is all saved in the same file or if there is a better way to save information that isn’t “built in” to the engine?

For example, (this isn’t what I’m doing, but similar enough to help us in discussion), let’s say I want to make a midi editor that will have some nice high-level information displayed along with groups of midi notes, like chord symbols or something. (for sake of argument let’s say this isn’t already something Tracktion does, since I think it already has chord clips built in).

I believe under the hood its using ValueTrees to save data, but I’m not sure if there’s a way to extend it from the outside.

So in summary, what is the best way to go about adding my own extra data and integrating it with the data provided and saved in Tracktion Engine?

Thank you,
-Nick

You can add data to the ValueTree pretty much anywhere and it will be preserved. Add a ValueTree::Listener to the root of the state and you’ll get notified when it changes. I’d advise prefixing your properties with your company name or similar so that there aren’t conflicts. You can see that we do this in Waveform, Edit / Mix Groups aren’t a part of the engine, they are a UI only feature. The engine knows nothing about them, but what tracks belong to what group are stored in the ValueTree.

2 Likes

Fantastic, thank you for the advice!

Just leaving another note for my future self or anyone else who may benefit, but this thread also goes into some great advice about tapping into the Tracktion Enginge’s ValueTree. I’m sad I didn’t find it before, but :man_shrugging:

1 Like