# chord-voicings

> Find musical chord voicings and transitions

Latest version **0.0.1** (published 2022-02-12) · ISC license · 0 weekly downloads

## Install

```sh
npm install chord-voicings
pnpm add chord-voicings
yarn add chord-voicings
bun add chord-voicings
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2022-02-12 |
| First published | 2022-02-12 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 29.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 12 |
| Author | Felix Roos |
| Maintainers | felixroos |
| Keywords | music, chords, voicings, jazz |

## Links

- npm: https://www.npmjs.com/package/chord-voicings
- Repository: https://github.com/felixroos/chord-voicings
- Homepage: https://github.com/felixroos/chord-voicings#readme
- Issues: https://github.com/felixroos/chord-voicings/issues
- npm.io page: https://npm.io/package/chord-voicings

## Dependencies (1)

- [@tonaljs/tonal](https://npm.io/package/@tonaljs/tonal.md) ^4.6.5

## Recent versions

- 0.0.1 (latest) — 2022-02-12

## README

# chord-voicings

This package contains logic to find chords voicings for a given chord symbol.

## Install

```sh
npm i chord-voicings --save
```

## Usage

```js
import { dictionaryVoicing, minTopNoteDiff, lefthand } from 'chord-voicings';

const getVoicing = (chord, lastVoicing) =>
  dictionaryVoicing({
    chord,
    dictionary: lefthand,
    range: ['F3', 'A4'],
    picker: minTopNoteDiff,
    lastVoicing,
  });

getVoicing('Dm7'); // ['F3', 'A3', 'C3', 'E3']
getVoicing('Dm7', ['F3', 'A3', 'C3', 'E3']); // ['C4', 'E4', 'F4', 'A4']
```

- `chord`: the chord (= note + chord symbol) we want to voice. The available symbols depend on your `dictionary`.
- `dictionary`: Maps chord symbols to possible interval structures. You can either use one of the [available voicing dictionaries](./src/dictionaryVoicing.ts), or create your own.
- `range`: The range inside which we are allowed to voice.
- `lastVoicing` (optional): voicing that came before. If given, the best voice leading will be chosen using `picker`.
- `picker`: Function that picks the best voicing after `lastVoicing`. Currently, there is only `minTopNoteDiff`, which picks the voicing with the smallest top note distance (or first if no `lastVoicing` given).

I made this lib after writing [this post](https://loophole-letters.vercel.app/rhythmical-chords).
I also started to integrate this idea directly into tonaljs, see [this issue](https://github.com/tonaljs/tonal/issues/230).
Currently, I just want some lib I can use directly without waiting for the tonal integration to fruit.

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