i’m trying to turn a hand-writtern diagram/score into an autonomously playing pattern. it consists of a number of sub-patterns that play one after another, except some can break this sequence and jump to another level/layer of the sequence. for simplicity sake, here it is with 2 levels/layers:
[1, 2, 3], [3, 2, 1], [4, 4, 4], [3, 5, 9], [7, 7, 9]
[8, 7, 5], [6, 6, 5], [4, 3, 2], [8, 8, 8], [1, 1, 1]
so, for instance, after the third pattern, [4, 4, 4], it can either go on undisturbed onto [3, 5, 9] or jump down one level to [8, 8, 8]. and so on…
((note that i’m placing these into arrays just to represent the sequences, this is very much just a sketch)).
what would you say would be the most effective and flexible way to implement this?
i thought of dictionaries or multidimensional arrays but i don’t quite know how to traverse those with these rules which affect only some of the patterns
thanks!
n