1.5.2 • Published 7 years ago

node-keyboard-shapes v1.5.2

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

node-keyboard-shapes

npm version

Object shape mapper for node-keyboard - coverts objects into chords!

npm.io

Installation

As Global

If you installed node-keyboard globally, then install this plugin via npm i -g node-keyboard-shapes

Then start node keyboard via node-keyboard, and import this plugin via const shapes = requireg('node-keyboard-shapes')

As Local

If instead you cloned node-keyboard, then install locally in that folder via npm i node-keyboard-shapes

Then start node keyboard via node keyboard and import this plugin via const shapes = require('node-keyboard-shapes')

API

shapes.objToChord(key = 'C3', intervalMap = (key, value, object) => ['1P', '3m'])(inputObject)
// returns { intervals: [...], notes: [...], chords: [...] }

intervalMap takes the key, value and object and must return intervals. intervals may be a string or an array of strings. Should map to a string representation of a musical interval. See tonal docs.

Provided maps:

  • shapes.map.byType.standard (Default)
shapes.createObjectListener(handler = (key, value) => {}, obj = {})
// returns new object that will invoke the handler every time a property is set

Examples

1.5.2

7 years ago

1.5.1

7 years ago

1.5.0

7 years ago

1.4.0

7 years ago

1.3.0

7 years ago

1.2.0

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago