Expanding functionality of an existing te::StepClip

Hi all,

I’m wondering how can I add extra functionality to existing Clip types or maybe add new Type. For example for te::StepClip I want to be able to mute specific pattern in patternSequence.

After checking source code I cannot find any way to register new ClipType. And looks like actual creation of StepClip happens here…
tracktion_engine/tracktion_Clip.cpp at 73986e9a6d377411a51a933446743ebf07770a14 · Tracktion/tracktion_engine · GitHub

Thanks in advance!

It’s not currently possible to add new clip types at the moment. We do want to get there but it’s not trivial as there are lots of places that interact with clips.

For the muting of step clips, could you just set the velocity of the pattern to 0?
You can add custom properties to the ValueTree state of the clip e.g. to mute a pattern and then use that to set the velocity of the pattern?

That’s understandable. Thanks!

I don’t see any methods to set velocity for the whole pattern, just void setVelocities (int channel, const juce::Array< int > &)
or
void setVelocity (int channel, int index, int value)
I don’t want to change velocity for individual notes, because I use those values for GUI in other components.
So far I started on modifying existing te::StepClip on my fork on tracktion_engine

I was thinking the StepClip::Channel::noteValue which scales the velocity for each note. So setting this to 0 will effectively mute the note.

Does that help?

That one seems to mute channel that is used across multiple Patterns in PatternSequence. Anyway after experimenting with possibilities looks like I would be better off using multiple te::StepClip
Thanks!