chord-generator

1.0.2 • Public • Published

Example

$ npm install chord-generator --save
const { thing } = require('')

// ES2015

import { thing  } from 'package-name'

const { thing } = require('package-name')

const {
  getRandomProgression,
  getAllChords,
  chordNotes
} = chordGenerator;
getRandomProgression(
  { key: 'A#', mode: 'mixolydian' }
))

returns

{
  id: "30d2c8e4-aa54-49ae-b2a6-e02e878f330f",
  chordNames: ["Bm7", "GMaj7", "D7", "Am7", "D7"]
  chordNotes: [
    ["B4", "D4", "F#4", "A4"],
    ["G4", "B4", "D4", "F#4"],
    ["D4", "F#4", "A4", "C4"],
    ["A4", "C4", "E4", "G4"],
    ["D4", "F#4", "A4", "C4"]
  ],
  theoryAttrs: {key: "D", mode: "mixolydian"}
}
  getChordNotes(
    { key: 'A', mode: 'mixolydian' }
  ))

returns

  ["D4", "F#4", "A4", "C4"]
  getAllChords(
    { key: 'A', mode: 'mixolydian' }
  ))

returns:

  ["D7", "Em7", "F#m7b5", "GMaj7", "Am7", "Bm7", "CMaj7"]

Readme

Keywords

none

Package Sidebar

Install

npm i chord-generator

Weekly Downloads

2

Version

1.0.2

License

ISC

Unpacked Size

9.25 kB

Total Files

8

Last publish

Collaborators

  • augievt