Skip to content

erikronstrom/accidental-value

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

accidental-value

usage

var accval = require('accidental-value');

accval(accidental)

Returns the value of the accidental from the table below. This is useful for manipulating notes and intervals.

  • 'x' = 2
  • '#' = 1
  • '' = 0
  • 'b' = -1
  • 'bb' = -2

accval.interval(accidental)

Returns the relative interval (given in [steps, semitones] format) of the accidental. E.g.:

accval.interval('#') // [0, 1]
accval.interval('bb') // [0, -2]

About

The values of accidentals in music

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%