< Back to IRCAM Forum

Avoiding the simplification of fractions

Hi everyone,

I have a quick question: is there a way to prevent the simplification of fractions in OpenMusic?

I’ve managed to patch an algorithm to generate Euclidean rhythms (which distribute a given number of attacks into a specified number of spaces as evenly as possible), from the paper “Infinite Rhythmic Tiling Canons” by Clifton Callender:

The issue I’m encountering is that this algorithm represents the Euclidean rhythm as a fraction (with the numerator being the number of attacks and the denominator being the number of available spaces). The input for the function I programmed in OpenMusic takes a fraction, but OpenMusic automatically simplifies any fraction entered. Is there a way to prevent this automatic simplification?

Here’s the patch:

euclidean rhythms.omp (12.5 KB)

Thanks in advance!

1 Like

Dear zeracosaitam1

Unfortunately you cannot not eval a fraction in lisp. But you can use instead a list of two numbers (it is the same issue with timesignatures in trees!)

Here is the patch:

euclidean rhythms1.omp (18.7 KB)

Best
K

1 Like