in

interval-notation

Parse and build musical intervals in shorthand notation

Showing:

Popularity

Downloads/wk

92

GitHub Stars

1

Maintenance

Last Commit

4yrs ago

Contributors

0

Package

Dependencies

0

Size (min+gzip)

0.7KB

License

MIT

Type Definitions

Tree-Shakeable

Yes?

Categories

Readme

interval-notation npm

Build Status Code Climate js-standard-style

Parse music intervals in shorthand notation (https://en.wikipedia.org/wiki/Interval_(music)#Shorthand_notation) with javascript. Given a string, obtain an object with interval properties (including interval size in semitones). It provides function to build string from its properties.

Install

yarn: yarn add interval-notation

npm: npm i --save interval-notation

Usage

ES6 modules:

import { parse, shorthand } from 'interval-notation'
parse('M3') // => { num: 3, q: 'M', dir: 1, simple: 3,
            //      type: 'M', alt: 0, oct: 0, size: 4 }
shorthand(3, 0, 0, 1) // => 'M3'

ES5 node import:

var interval = require('interval-notation')
interval.parse('M3') // => { num: 3, q: 'M', dir: 1, simple: 3,
                     //      type: 'M', alt: 0, oct: 0, size: 4 }
interval.shorthand(3, 0, 0, 1) // => 'M3'

Documentation

You can read the generated API documentation here

Test and development

To run the test clone this repo and:

npm i
npm test

License

MIT License

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100