Package Exports
- @tonaljs/scale-dictionary
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 (@tonaljs/scale-dictionary) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@tonaljs/scale-dictionary 
@tonaljs/scale-dictionary is a dictionary of musical scales.
API
scaleType(type: string) => ScaleType
Given a scale type name, return a ScaleType object with the following properties:
- name: the scale type name
- aliases: a list of alternative names
- quality: Major | Minor | Augmented | Diminished | Unknown
- num: the pcset number
- chroma: the pcset chroma
- length: the number of notes
- intervals: the interval list
Example:
scaleType("major"); // =>
// {
// name: "major",
// aliases: ["ionian"],
// num: 2773,
// chroma: "101011010101",
// length: 7
// intervals: ["1P", "2M", "3M", "4P", "5P", "6M", "7M"],
// });entries() => Scale[]
Return a list of all available scale types
FAQ
How do I get all pentatonics names?
entries()
.filter(type => type.intervals.length === 5)
.map(n => name);