Skip to content

fheyen/musicvis-lib

Repository files navigation

musicvis-lib ♫

alpha version   npm   GitHub package.json version GitHub issues Contributors JavaScript Style Guide

Goal: Provide data structures and algorithms for music analysis and visualization in JavaScript.

This library is still in early and active development.

Breaking changes might happen.

  1. musicvis-lib ♫
    1. Setup
    2. Documentation
    3. How to use
    4. Examples
    5. Contributing
    6. Credits

Setup

npm install --save musicvis-lib

Or download dist/musicvislib.js (development) or dist/musicvislib.min.js (minified).

Documentation

See Observable for examples.

See api.md and here for the full documentation.

How to use

With modules

import {Note} from 'musicvis-lib'

const note = Note.from({
  pitch: 65,
  start: 2.0,
  end: 3.0,
  velocity: 127,
  channel: 0
})

With require

const musicvislib = require('musicvis-lib')
const {Note} = musicvislib

const note = Note.from({
  pitch: 65,
  start: 2.0,
  end: 3.0,
  velocity: 127,
  channel: 0
})

In HTML

<!-- With unpkg... -->
<script src="https://unpkg.com/musicvis-lib"></script>
<!-- ... or with a downloaded file -->
<script src="./musicvislib.min.js"></script>
<script>
  console.log(musicvislib)
  console.log(musicvislib.Midi)
  console.log(musicvislib.Midi.getMidiNoteByNr(0))
</script>

Examples

Here are some examples that show for what musicvis-lib can be used:

More dependents

Contributing

If you like to contribute, feel free to create pull requests or issues.

See CONTRIBUTING.md for more.

Credits

See CREDITS.md.