Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dbkaplun/euclidean-rhythm
Euclidean rhythms in JS
https://github.com/dbkaplun/euclidean-rhythm
Last synced: 14 days ago
JSON representation
Euclidean rhythms in JS
- Host: GitHub
- URL: https://github.com/dbkaplun/euclidean-rhythm
- Owner: dbkaplun
- License: mit
- Created: 2015-11-12T00:05:43.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2023-01-16T01:49:50.000Z (almost 2 years ago)
- Last Synced: 2024-10-18T15:31:39.836Z (24 days ago)
- Language: JavaScript
- Homepage: http://dbkaplun.github.io/euclidean-rhythm/
- Size: 6.18 MB
- Stars: 58
- Watchers: 4
- Forks: 6
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# [euclidean-rhythm](https://dbkaplun.github.io/euclidean-rhythm)
> The **Euclidean rhythm** in music was discovered by [Godfried Toussaint](https://en.wikipedia.org/wiki/Godfried_Toussaint)
> in 2004 and is described in a 2005 paper
> "The [Euclidean Algorithm](https://en.wikipedia.org/wiki/Euclidean_algorithm) Generates Traditional Musical Rhythms".[[1]](http://cgm.cs.mcgill.ca/~godfried/publications/banff.pdf)
> The [greatest common divisor](https://en.wikipedia.org/wiki/Greatest_common_divisor)
> of two numbers is used [rhythmically](https://en.wikipedia.org/wiki/Rhythm)
> giving the number of [beats](https://en.wikipedia.org/wiki/Beat_(music)) and
> silences, generating almost all of the most important
> [World Music](https://en.wikipedia.org/wiki/World_Music) rhythms,[[2]](http://cgm.cs.mcgill.ca/~godfried/rhythm-and-mathematics.html)
> (except [Indian](https://en.wikipedia.org/wiki/India#Performing_arts)).[[3]](http://cgm.cs.mcgill.ca/~godfried/publications/banff-extended.pdf)
> The beats in the resulting rhythms are as equidistant as possible; the same
> results can be obtained from the [Bresenham](https://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm) algorithm.—[Wikipedia, *Euclidean rhythm*](https://en.wikipedia.org/wiki/Euclidean_rhythm)
## Usage
```js
> var euclideanRhythm = require('euclidean-rhythm');
undefined
> euclideanRhythm(3, 8);
[ 1, 0, 0, 1, 0, 0, 1, 0 ]
```