< Back to IRCAM Forum

Rhythm trees. How to access sub list?

In the openmusic documentation page, rhythm trees says: A rhythm tree is a list representing a rhythmic structure. This list is organized hierarchically in sub lists , etc.

As I tried to use diferent fuctions in the voice’s tree output, it seems that the output is a list with two elements. The first element is the number of measures and the second element is the time signature with its subdivisions. If I’m not wrong, this second element is a sub list. I’d like to access that.

I tried many list functions and all yield the same result, a list with two elements. For example, connecting a lisp lenght function outputs “2”.

How do I access the sub list?

2021-06-12 09_32_08-^Patch

Hi archiduque,

The Rhythm trees have a special tree structure and is somehow recursive, ie the (D S) ( ) where S can be also an RT containing another DS. For further reading (sorry in french):
https://hal.archives-ouvertes.fr/hal-02992756/document

Now the question is, “why do you want to access the sub list?” I am asking this, because if you want to change it, you can use the tools in Score->trees.
If you need just to output the sublists, you can do something like that:

(the patch:)
Patch 9.omp (9.4 KB)

Best
K

What I’m trying to do is on this post: How to select pulses and assign them a name

I want to access the sub list to be able to select, manipulate and assign variables to each pulse, and each note on that pulse. Is it possible with the sub lists?

I couln’t find the Lisp tree and Lisp cadr functions shown on your patch. Where are they?

see: Functions not listed in the functions tab