Skip to content

Latest commit

 

History

History
 
 

roman-numeral

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

@tonaljs/roman-numeral tonal npm version

Functions to parse roman numeral strings (like the ones used for chord analysis)

A roman numeral symbol is a string like "bVIImaj7" that can be used to represent chords in an abstract tonallity.

API

roman-numeral(src: string | Pitch): => RomanNumeral

Get the properties of a roman numeral:

Example:

romanNumeral("bVII7");
// =>
// {
//   empty: false,
//   name: "bVIIMaj7",
//   roman: "VII",
//   acc: "b",
//   chordType: "Maj7",
//   alt: -1,
//   step: 6,
//   major: true,
//   oct: 0
// }

FAQ

How do I get a roman numeral from an interval

romanNumeral function accepts a Pitch as argument:

import { interval } from "@tonaljs/note";
import { roman-numeral } from "@tonaljs/roman-numeral";

romanNumeral(interval("3m")).name; // => "bIII"

Want more?

Take a look to @tonal/chord-progressions or @tonal/key