TuningFork.Pattern.Voicing (TuningFork v0.1.11)

Copy Markdown View Source

Chord symbols to voicings, as Strudel renders them.

iex> TuningFork.Pattern.Voicing.render("Cm7")
[58, 63, 67, 70, 72]

Summary

Functions

The dictionary names render/2 takes.

Whether symbol is a chord symbol render/2 knows in dictionary.

The MIDI notes of chord voiced from a dictionary, or :error for a symbol it lacks.

Types

mode()

@type mode() :: :below | :above | :root | :duck

Functions

dictionaries()

@spec dictionaries() :: [atom()]

The dictionary names render/2 takes.

known?(chord, dictionary \\ :ireal)

@spec known?(String.t(), atom()) :: boolean()

Whether symbol is a chord symbol render/2 knows in dictionary.

render(chord, opts \\ [])

@spec render(String.t(), keyword()) :: [integer()] | :error

The MIDI notes of chord voiced from a dictionary, or :error for a symbol it lacks.

Options

  • :dictionary — one of dictionaries/0, default :ireal
  • :anchor — a note name or MIDI number the voicing is placed against; default the dictionary's, c5 for :ireal
  • :mode:below (top note at or under the anchor), :above (bottom note at or over it), :root (the root at or under it), or :duck (below, dropping a note that lands on the anchor); default the dictionary's
  • :offset — how many voicings along the dictionary's list to move, default 0
  • :n — one tone of the voicing instead of all of it, counting from 0 and wrapping into the octaves above and below
  • :octaves — how far :n moves per wrap, default 1