< Back to IRCAM Forum

Deleting meters from rhythm tree

Is there any way to substract meters from trees?

Hi yavuztilek,

You mean retrieving meters?
Here is the simplest way [+ plus retrieving the rest]:

Best
K

Thank you for response! Could you explain what is car and cadr?

Dear yavuztilek

car and cdr are the most basic primitives of list manipulation in Lisp.
more here:

cadr is equivalent for (car (cdr <list>))

Best
K

Thanks! One more question, how can I combine them together?

I assume you mean to construct the tree again?

Best
K

Many thanks! But I have a problem, I want to add random rests on a rhythm tree. I made a loop and randomly multiplied the numbers after mapcar (with cadr) object with -1 and 1. I constructed the tree again with mapcar (list) but I get division by 0 error when I connect it to voice object.

I suspect that you have generated erroneous structured trees.
If you need this please open a new topic describing what you want to do.
Will then provide you with a solution.

Best
K