Euclidean spread -- algorithm/example?

The Frozen Wasteland QAR sequencer module has algorithm that evenly spaces n events in m time.

I’d like to find a code example of that ‘even spread’ algorithm, for another application:

I have a scale generator that permutes the N prime numbers into fractions. I’d like to ‘thin’ the scale by picking (for example) 21 evenly spaced values from a table of 37 values.

I can go back to the Euclidean sequencer academic papers if I have to but this sounds like a problem someone already solved, so if you know of a good solution, let me know.

You could have a look at the source for one of the open source euclidean sequencers to see how it was done.

1 Like

You could have a look at the source for one of the open source euclidean sequencers to see how it was done. Yeah, sorry, it seemed like the sort of thing where asking wasn’t inappropriate. After I posted this I found examples of it.

Oh and what I needed exactly is here: Bjorklund Algorithm in C++ · GitHub

1 Like

Incase you are interested, this is the paper cited at the top of the gist http://cgm.cs.mcgill.ca/~godfried/publications/banff.pdf

2 Likes