# tonal-dictionary

> Tonal key/value utilities

Latest version **2.2.2** (published 2019-04-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install tonal-dictionary
pnpm add tonal-dictionary
yarn add tonal-dictionary
bun add tonal-dictionary
```

## Health

**Score 35/100 (D)** — status: abandoned.

Positive: esm support; no vulnerabilities; high maintenance score.

Warnings: low downloads; no types.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 2.2.2 |
| Published | 2019-04-03 |
| First published | 2016-05-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 40.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4282 |
| Author | danigb@gmail.com |
| Maintainers | danigb |
| Keywords | music, theory, dictionary, tonal |

## Links

- npm: https://www.npmjs.com/package/tonal-dictionary
- Repository: https://github.com/danigb/tonal/packages/dictionary
- npm.io page: https://npm.io/package/tonal-dictionary

## Dependencies (3)

- [tonal-note](https://npm.io/package/tonal-note.md) ^2.2.2
- [tonal-array](https://npm.io/package/tonal-array.md) ^2.2.2
- [tonal-pcset](https://npm.io/package/tonal-pcset.md) ^2.2.2

## Recent versions

- 2.2.2 (latest) — 2019-04-03
- 0.60.0 (alpha-1) — 2016-11-15
- 2.2.1 — 2019-02-15
- 2.2.0 — 2019-02-14
- 2.1.2 — 2018-11-15
- 2.1.0 — 2018-11-04
- 2.0.0 — 2018-09-11
- 1.1.2 — 2018-01-04
- 1.1.0 — 2017-10-24
- 1.0.0 — 2017-10-04
- 1.0.0-pre6 — 2017-10-03
- 1.0.0-pre5 — 2017-10-01
- 1.0.0-pre4 — 2017-10-01
- 1.0.0-pre3 — 2017-09-29
- 1.0.0-pre2 — 2017-09-29
- … 17 more at https://npm.io/package/tonal-dictionary/versions

## README

<a name="module_Dictionary"></a>

# Dictionary
[![npm version](https://img.shields.io/npm/v/tonal-dictionary.svg)](https://www.npmjs.com/package/tonal-dictionary)

`tonal-dictionary` contains a dictionary of musical scales and chords

This is part of [tonal](https://www.npmjs.com/package/tonal) music theory library.

**Example**  
```js
// es6
import * as Dictionary from "tonal-dictionary"
// es5
const Dictionary = require("tonal-dictionary")
```
**Example**  
```js
Dictionary.chord("Maj7") // => ["1P", "3M", "5P", "7M"]
```

* [Dictionary](#module_Dictionary)
    * [`.scale(name)`](#module_Dictionary.scale) ⇒ <code>Array</code>
    * [`.chord(type)`](#module_Dictionary.chord) ⇒ <code>Array</code>

<a name="module_Dictionary.scale"></a>

## `Dictionary.scale(name)` ⇒ <code>Array</code>
A dictionary of scales: a function that given a scale name (without tonic)
returns an array of intervals

**Kind**: static method of [<code>Dictionary</code>](#module_Dictionary)  
**Returns**: <code>Array</code> - intervals  

| Param | Type |
| --- | --- |
| name | <code>string</code> | 

**Example**  
```js
import { scale } from "tonal-dictionary"
scale("major") // => ["1P", "2M", ...]
scale.names(); // => ["major", ...]
```
<a name="module_Dictionary.chord"></a>

## `Dictionary.chord(type)` ⇒ <code>Array</code>
A dictionary of chords: a function that given a chord type
returns an array of intervals

**Kind**: static method of [<code>Dictionary</code>](#module_Dictionary)  
**Returns**: <code>Array</code> - intervals  

| Param | Type |
| --- | --- |
| type | <code>string</code> | 

**Example**  
```js
import { chord } from "tonal-dictionary"
chord("Maj7") // => ["1P", "3M", ...]
chord.names(); // => ["Maj3", ...]
```

---
_Source: https://npm.io/package/tonal-dictionary · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
