Germanyricardomatias/playa
A framework for musical composition. It allows creating custom music algorithms, musical phrases, percussion rhythms, harmonic sequences and more.
Featured achievements
The project's latest awards
#1 Repository of the month
#1 Repository of the month
#2 Repository of the month
PLAYA (pronounced ˈpleɪə) is a framework for musical composition. It allows creating custom music algorithms, musical phrases, percussion rhythms, harmonic sequences and more.
Install
npm install --save playa
Usage
ES6 Modules
import { Chord, Key, Rhythm } from 'playa';
// or everything
import * as 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 }
]
*/
Guides
Interactive guide here which uses Tone.js for the sound.
An example of using PLAYA with P5 and Tone.js - PLAYA meets P5
Documentation
Can be found here.
Templates
License
Similar Projects
Discover other similar projects and AI models.
Reverse engineer anything with agents, from app behavior down to native binaries.
freeCodeCamp.org's open-source codebase and curriculum. Learn math, programming, and computer science for free.
This is the repo for Vue 2. For Vue 3, go to https://github.com/vuejs/core
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings