1.2.4 • Published 9 years ago

musicjson-toolbox v1.2.4

Weekly downloads
1
License
MIT
Repository
github
Last release
9 years ago

musicjson-toolbox

Build Status Test Coverage Code Climate

The project is still under construction.

The plan is to create a node toolbox for comparing musicJSON objects.

Installation

The module is preferably installed as node package via npm:

$ npm install --save musicjson-toolbox

Or install via bower:

$ bower install --save musicjson-toolbox

Example

For usage in browser, have a look at tools demo page or similarity demo page.

For use as node module refer to the following:

var MusicJsonToolbox = require('musicjson-toolbox');

var musicjson = {
  "attributes": {
    "divisions": 4,
    "clef": {"line": 2, "sign": "G"},
    "key": {"fifths": -1},
    "time": {"beats": "3", "beat-type": "4"}
  },
  measures: [
    {
      "attributes": {
        "repeat": {"left": false, "right": false}
      },
      "notes": [
        {
          "pitch": {
            "step": "C",
            "accidental": "flat",
            "octave": 4,
            "alter": -1
          },
          "rest": false,
          "duration": 2,
          "type": "eighth"
        },
        {
          "pitch": {
            "step": "F",
            "octave": 4,
            "alter": 0
          },
          "rest": false,
          "duration": 2,
          "type": "eighth"
        }
      ]
    }
  ]
}

var notes = MusicJsonToolbox.notes(musicjson, false, true); // outputs array of notes (cleared measure "lines")
var intervals = MusicJsonToolbox.intervals(notes); // outputs array of intervals
var parsons = MusicJsonToolbox.parsons(notes); // outputs array of parsons code
var ngrams = MusicJsonToolbox.ngrams(notes, 4); // generates ngrams of defined length from an array

API Documentation

For full API documentation have a look at API.md.

License

Licensed under the MIT License. See LICENSE for further information.

1.2.4

9 years ago

1.2.3

10 years ago

1.2.2

10 years ago

1.2.1

10 years ago

1.2.0

10 years ago

1.1.0

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago

0.0.8

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago