Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ricardomatias/playa
A framework for musical composition. It allows creating custom music algorithms, musical phrases, percussion rhythms, harmonic sequences and more.
https://github.com/ricardomatias/playa
algorave javascript midi music music-composition music-theory playa webaudio
Last synced: 8 days ago
JSON representation
A framework for musical composition. It allows creating custom music algorithms, musical phrases, percussion rhythms, harmonic sequences and more.
- Host: GitHub
- URL: https://github.com/ricardomatias/playa
- Owner: ricardomatias
- License: osl-3.0
- Created: 2020-02-24T13:07:27.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-03-24T06:24:36.000Z (over 1 year ago)
- Last Synced: 2024-04-26T01:31:53.766Z (7 months ago)
- Topics: algorave, javascript, midi, music, music-composition, music-theory, playa, webaudio
- Language: TypeScript
- Homepage: https://ricardomatias.net/playa
- Size: 4.83 MB
- Stars: 75
- Watchers: 7
- Forks: 3
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
PLAYA *(pronounced `ˈpleɪə`)* is a framework for musical composition. It allows creating custom music algorithms, musical phrases, percussion rhythms, harmonic sequences and more.
## Install
```bash
npm install --save playa
```## Usage
### ES6 Modules
```js
import { Chord, Key, Rhythm } from 'playa';// or everything
import * as Playa from 'playa';
```### Common JS (Node)
```js
const { Chord, Key, Rhythm } = require('playa');// or everything
const Playa = require('playa');
```## Example
```js
import { Scale, createMotif } from 'playa';const scale = new Scale('A', Scale.Major);
createMotif(scale.notes, ['4n', '2n', '8nt']);
/* =>
[
{ time: 0, dur: 480, next: 480, midi: 73, note: 'C#4', isRest: false },
{ time: 480, dur: 960, next: 1440, midi: 80, note: 'G#4', isRest: false },
{ time: 1440, dur: 160, next: 1600, midi: 74, note: 'D4', isRest: false }
]
*/
```## Guides
Interactive guide [here](https://observablehq.com/@ricardomatias/playa) which uses [Tone.js](https://tonejs.github.io/) for the sound.
An example of using PLAYA with P5 and Tone.js - [PLAYA meets P5](https://observablehq.com/@ricardomatias/playa-meets-p5)
## Documentation
Can be found [here](https://ricardomatias.net/playa/?api).
## Templates
* [Starter template for PLAYA with Tone.js ](https://github.com/ricardomatias/playa-starter)
## License
[Open Software License 3.0](LICENSE)