Skip to content

A framework for musical composition. It allows creating custom music algorithms, musical phrases, percussion rhythms, harmonic sequences and more.

License

Notifications You must be signed in to change notification settings

ricardomatias/playa

Repository files navigation

Playa

npm license build Coverage Status Bundlephobia min + gzip Bundlephobia tree-shaking

PLAYA (pronounced ˈpleɪə) is a musical theory framework aimed at creating musical phrases.

Disclaimer

PLAYA is in active development, currently going through an alpha stage. Semver versioning will eventually come, but for the moment declare a specific version or your code might be broken.

Install

npm install --save playa

Usage

ES6 Modules

import { Chord, Key, Rhythm } from 'playa';

// or everything
import Playa from 'playa';

Common JS (Node)

const { Chord, Key, Rhythm } = require('playa');

// or everything
const Playa = require('playa');

Example

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 }
]
*/

Documentation

Can be found here.

License

Open Software License 3.0

About

A framework for musical composition. It allows creating custom music algorithms, musical phrases, percussion rhythms, harmonic sequences and more.

Topics

Resources

License

Stars

Watchers

Forks

Languages