note-midi

1.0.2 • Public • Published

note-midi npm version

tonal

note-midi is a tiny function (1kb minified) to get the midi number from a note name:

var midi = require('note-midi')
midi('A4') // => 69
midi('c2') // => 36

This is part of tonal

Installation

Install via npm: npm install --save note-midi or use add the dist file to the html page.

API

midi

Get the midi number of a note

The note can be an string in scientific notation or array pitch notation

Parameters

  • note String or Array the note in string or array notation

Examples

midi('A4') // => 69
midi('a3') // => 57
midi([0, 2]) // => 36 (C2 in array notation)

Returns Integer the midi number Generated documentation here

License

MIT License

Package Sidebar

Install

npm i note-midi

Weekly Downloads

0

Version

1.0.2

License

MIT

Last publish

Collaborators

  • danigb