Giter Site home page Giter Site logo

chord.dictionary's Introduction

chord.dictionary

Build Status Climate js-standard-style npm version license tonal

A dictionary of music chords. This contains a json file with chord definitions (currently 106), and a javascript function to access them:

var chord = require('chord.dictionary')
chord('Maj7') // => { name: 'Maj7', aliases: ['M7', 'maj7']
               //      intervals:  [ '1', '3', '5', '7' ],
               //      steps: [ ... ]
               //      binary: '100010010001', decimal: 2193 }

This is part of tonal

Installation

Install via npm: npm install --save chord.dictionary. For browsers use the browserify or similar tool or get tonal.chord

Usage

You can get or require json data file directly:

var data = require('chord.dictionary/chords.json')

Or use the function:

var chord = require('chord.dictionary')
chord('Maj7') // => { name: 'Maj7', ... }

The function returns a data object with the following properties:

  • name: the name of the chord
  • aliases: an array with the alternative names of the chord
  • intervals: an array with the intervals
  • steps: an array with the intervals in array notation
  • binary: a binary representation of the chord set
  • decimal: the decimal representation of the chord set

You can get an array of available names:

var chord = require('chord.dictionary')
chord.names // => ['Maj7', 'm7', ...]
chord.names.length // => 107

License

MIT License

chord.dictionary's People

Contributors

danigb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.