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.
npm install --save musicvis-lib
Or download dist/musicvislib.js (development) or dist/musicvislib.min.js (minified).
See Observable for examples.
See api.md and here for the full documentation.
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>
Here are some examples that show for what musicvis-lib
can be used:
- fheyen.github.io/midi-live-vis (code)
- fheyen.github.io/midi-pianoroll (code)
- fheyen.github.io/webmidi-logger (code)
- fheyen.github.io/midi-chords (code)
- fheyen.github.io/midi-recorder (code)
- fheyen.github.io/kalimba (code)
If you like to contribute, feel free to create pull requests or issues.
See CONTRIBUTING.md for more.
See CREDITS.md.