I think Waveform is the best demonstration of this.
A StepClip has a length but itself can’t be looped in the same way that an audio or MIDI clip is. Instead, a StepClip’s content will be repeated for the duration of the clip.
A StepClip contains a number of Patterns. These have a number of notes and then a set of on/off states, gate and velocities per note.
Then you build the contents using a sequence of these Patterns.
Finally, you can specify if the extra space in the clip (after the initial length of all the consecutive PatternInstances) is filled with the last Pattern repeated or the whole sequence.
It’s a bit difficult to explain but I hope that helps.
That’s not strictly correct. Remember that sometimes we name things differently in the app to the code to reflect their real-world use. Obviously we try to minimise that so things don’t get confusing for us but they are different audiences.
Calling things Patterns and Pattern-Instances for users isn’t the best approach so we have “Patterns” and “Sections”, where a “Section” is filled with a “Pattern”.
In code, there is no “Section” but simply an array of “Patterns” (which are wrapped up by a “PatternInstance”).