JSPM

helmholtz

2.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3593
  • Score
    100M100P100Q142880F
  • License MIT

Parses note names in Helmholtz format

Package Exports

  • helmholtz

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (helmholtz) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

helmholtz

Parsing notes written in Helmholtz pitch notation returning intervals in octaves and fifths relative to A4 (or a')

var helmholtz = require('helmholtz');

helmholtz('a\'') // -> [ 0, 0 ]
helmholtz(',,C') //  -> [ -3, -3 ]
helmholtz('d#\'') // -> [ -4, 6 ]
helmholtz('a\'\'') // -> [ 1, 0 ]

usage

var helmholtz = require('helmholtz');

helmholtz(note)

Takes a note string in the Helmholtz notation and returns an array describing the interval of that note relative to A4. The returned interval is in the format [octaves, fifths] - that is, an array consisting of two numbers, the first the number of octaves to jump, the second the number of fifths to jump from A4 to land at the desired note.