RomanNumeral
tonal-roman-numeral
is a collection of functions to query about tonal keys.
This is part of tonal music theory library.
Example
import * as RomanNumeral from "tonal-roman-numeral";
const RomanNumeral = require("tonal-roman-numeral");
Example
RomanNumeral.names();
RomanNumeral.props("ii7");
RomanNumeral.degree(2);
RomanNumeral.degree(2, false);
RomanNumeral.props()
⇒ Object
Get properties of a roman numeral string
Kind: static method of RomanNumeral
Returns: Object
- - the roman numeral properties
Type | Description |
---|
String | the roman numeral string (can have type, like: Imaj7) |
Example
props("VIIb5");
RomanNumeral.names([isMajor])
⇒ Array.<String>
Get roman numeral names
Kind: static method of RomanNumeral
Param | Type | Default |
---|
[isMajor] | boolean | true |
Example
names();
names(false);
RomanNumeral.name(name)
⇒ String
Get roman numeral name of a string or null if not valid roman numeral
Kind: static method of RomanNumeral
Example
name("IIb7");
name("iii");
name("Ii");
RomanNumeral.type(name)
⇒ String
Get type of a roman numeral
Kind: static method of RomanNumeral
Example
type("Imaj7");
RomanNumeral.decimal(name)
⇒ number
Get roman numeral number in decimal integer (it accepts numbers from 1 to 7)
Kind: static method of RomanNumeral
Param | Type | Description |
---|
name | string | number | roman numeral name (with optional type) |
Example
decimal("IVmaj7");
decimal(4);
decimal(10);
RomanNumeral.fromDegree(degree, [isMajor])
⇒ String
Get a roman numeral from a degree number
Kind: static method of RomanNumeral
Returns: String
- the roman numeral
Param | Type | Default |
---|
degree | number | |
[isMajor] | boolean | true |
Example
fromDegree(2);
fromDegree(2, false);