# [PD] euclidean rhythms

Martin Dupras martindupras at gmail.com
Thu May 26 01:29:40 CEST 2011

```I had a quick read of the paper just now. I might have missed the
point altogether, but from what I understand, the results that he gets
from the Euclidian algorithm are the same (if you accept a rotation
pattern as being equivalent) as what you'd get from the simple
rounding of fractions.

In other words: let's say you want 5 beats in a grid of 12 (or a
12-sided polygon, if we use his graphical representation), the exact
spacing between two beats would be 12/5, or 2.4.

The first beat would be 0*2.4= 0.
The second beat would 1*2.4 = 2.4, rounded to 2
The third would be 2*2.4 = 4.8, which we round to 5.
The fourth would be 3*2.4= 7.2, which we round to 7.
The fifth would be 4*2.4  = 9.6, which we round to 10.

We now have the pattern x.x..x.x..x.

The way I would do it would be to store the pattern in table;
calculate the slice size (e.g. 12/5), then multiply successfully by
values from 0 to n-1 (0 to 4, since we want 5 divisions of 12), round
that, and then store a "1" at the rounded index values.

I'm sure there are plenty of more elegant methods.

- martin

On 25 May 2011 22:13, Cody Loyd <codyloyd at gmail.com> wrote:
> Posted this on the PD forum.. but haven't heard anything yet so i
> thought I'd try here as well.
>
> Euclidean Rhythms
>
> I am interested in implementing something like THIS:
>
> http://www.hisschemoller.com/
>
> in PD.
>
> I understand the algorithm for generating the rhythms on paper, but
> i'm not sure how in Pd to go about doing it.  I'd imagine that it
> would involve some pretty heavy 'list surgery' and I'm not too sure
> how to go about doing it.
>
> This website:
>
> http://ruinwesen.com/blog?id=216
>
> gives a little more info on how the algorithm works (especially in the
> PDF he links to, page 2 has the relevant example), and talks about
> coding the thing in Lisp, but i can't figure it out in PD.
>
> any hints?
>
> _______________________________________________
> Pd-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not_exactly_euclidian_rhythms.pd
Type: application/octet-stream
Size: 1966 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20110526/56781f51/attachment-0001.obj>
```

More information about the Pd-list mailing list