Skip to content

Latest commit

 

History

History
 
 

scale-dictionary

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

@tonaljs/scale-dictionary npm version

tonal

@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);