Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adriano-di-giovanni/bjorklund-js
A Javascript Universal Module implementation of the Bjorklund algorithm
https://github.com/adriano-di-giovanni/bjorklund-js
Last synced: 1 day ago
JSON representation
A Javascript Universal Module implementation of the Bjorklund algorithm
- Host: GitHub
- URL: https://github.com/adriano-di-giovanni/bjorklund-js
- Owner: adriano-di-giovanni
- Created: 2015-06-29T11:04:42.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-12-27T09:42:24.000Z (almost 6 years ago)
- Last Synced: 2024-11-01T18:05:01.388Z (12 days ago)
- Language: JavaScript
- Size: 29.3 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Bjorklund
A Javascript Universal Module implementation of the Bjorklund algorithm.
## Installation
### npm
```
$ npm install bjorklund-js
```### bower
```
$ bower install bjorklund-js
```## Usage
```javascript
var
steps = 5,
pulses = 2;console.log(bjorklund(steps, pulses)); // [ 0, 1, 0, 1, 0 ]
```## License
This project is licensed under the MIT license.
## Resources
* E. Bjorklund, [The Theory of Rep-Rate Pattern Generation in the SNS Timing System](https://ics-web.sns.ornl.gov/timing/Rep-Rate%20Tech%20Note.pdf)
* G. T. Toussaint, [The Euclidean algorithm generates traditional musical rhythms](http://cgm.cs.mcgill.ca/~godfried/publications/banff.pdf), Proceedings of BRIDGES: Mathematical Connections in Art, Music, and Science, Banff, Alberta, Canada, July 31 to August 3, 2005, pp. 47–56.## Changelog
### 0.1.0
First release
### 0.1.1
Add minified version
## 0.1.2
Fixed algorithm for N==k, n % k == 0, k == 0. Thanks [@colinsullivan](https://github.com/colinsullivan)