Meta-pattern edition of CollectionClip's?

Hey everyone!

I am using FolderTrack's to nest multiple AudioTrack's.

I can retrieve the CollectionClip's that is generated from the child AudioTrack's MidiClip's, parse them, and display them on the timeline.

What would be the best approach to create a new, empty CollectionClip, that would nest multiple MidiClip's (one per subtrack), so the user can edit sort of “meta-pattern” without the need to manually one MidiClip per subtrack.

Since CollectionClip's don’t seem to have a specific EditItemId, what would be a good way to refer to these “meta-patterns” (if needed)? Maybe a EdiItemId var stored on the FolderTrack ValueTree?

Thank you!

I’m not quite sure what the functionality would be of these meta-clips?
You can already group clips in a CollectionClip using Clip::setGroup (EditItemID), is that what you’re after?

I’d probably try this feature out in Waveform first if I were you to see what kind of functionality is available.

1 Like

Hey @dave96 !

I tried groups in Waveform but they’re not exactly useful for what I want to achieve.

Looking more in-depth on how CollectionClip's are created, I think I could simply create new MidiClip's on each subtrack for my FolderTrack, then call FolderTrack::generateCollectionClips().

My editor would simply allow the user to insert MIDI events on each MidiClip's of the subtracks.

The only concern I have is that I cannot really assign an EditItemID on the CollectionClip's. Would generating a unique EditItemID through Clip::setGroup() on my CollectionClip's enough to identify them (mostly for UI purposes) ?


You can’t assign your own EditItemIDs to things, they’re UIDs so really need to be managed automatically to avoid clashes.

If this is just for your own UI though, you can directly set your own property on the state member ValueTree. Does that do what you need?

1 Like

Perfect, that’s what I wanted to try next. Thanks @dave96 !

Ah, it seems CollectionClip's don’t have a ValueTree! That would be a nice addition for a future update.

Ah yes, sorry, it won’t have a state as it’s a transient Clip so will come and go as it needs to. That would be the state is never constant.

I’m still not quite sure what you mean by meta-pattern editing. Maybe you just need to use a single MidiClip under the hood and change the UI on top of it?

1 Like