@tonaljs/roman-numeral
TypeScript icon, indicating that this package has built-in type declarations

4.9.1 • Public • Published

@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 tonality.

Usage

ES6:

import { RomanNumeral } from "tonal";

node:

const { RomanNumeral } = require("tonal");

API

RomanNumeral.get(src: string | Pitch): => RomanNumeral

Get the properties of a roman numeral:

Example:

RomanNumeral.get("bVIIMaj7");
// =>
// {
//   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, RomanNumeral } from "tonal";

RomanNumeral.get(Interval.get("3m")).name; // => "bIII"

Want more?

Take a look to @tonal/progression or @tonal/key

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
4.9.1272latest

Version History

VersionDownloads (Last 7 Days)Published
4.9.1272
4.9.0151
4.8.3128
4.8.228
4.8.10
4.8.0134
4.7.30
4.7.20
4.7.10
4.7.00
4.6.100
4.6.518
4.6.21
4.5.11
4.5.00
3.5.4307
3.5.31
3.5.20
3.5.10
3.5.00
3.3.20
3.3.10
3.3.01
3.2.30
3.2.20
3.2.10
3.2.00
3.1.00

Package Sidebar

Install

npm i @tonaljs/roman-numeral

Weekly Downloads

1,042

Version

4.9.1

License

MIT

Unpacked Size

20 kB

Total Files

9

Last publish

Collaborators

  • danigb