The core of the problem is that you don’t have sub-positions. It is up to you to deterime these.
However, you can still as i proposed, determine them in advance as:
Nevertheless, you will be confronted with duration problems if the substitution is not consistent with your first rhythm structure. (cf. figure).
I don’t know if it’s correct to call them onsets(maybe onsets are measured in ms?) I call them ordinal numbers,
You can call them whatever you like, this is up to you Still as I advise you, you should reconsider what you want to do with this. Forget the naming business. The rhythm structure in OM, doesn’t know about beats/upbeats. It is agnostic. So you should figure out, depending on WHAT you want to do so you can implement some code to construct your rhythm structure. If you depend on patches done before, you are on the wrong and harsh road to solve your problem. Believe me.
Again my advice: First draft on paper your strategy if possible step by step. THEN you can think about HOW to implement it with the tools OM has to offer. It you will find that the solution is easier than you thought it was.
pos to rtree1.omp (32.2 KB)