Conversion between midi numbers and note names

tonal-midi is a collection of functions to convert between midi numbers and note names.
This is part of tonal music theory library.
You can install via npm: npm i --save tonal-midi
BooleanTest if the given number is a valid midi note number
IntegerGet midi number for a pitch
StringGiven a midi number, returns a note name. The altered notes will have
flats.
StringGiven a midi number, returns a note name. The altered notes will have
sharps.
BooleanKind: global function
Returns: Boolean - true if it's a valid midi note number
| Param | Type | Description |
| --- | --- | --- |
| num | Object | the thing to be tested |
IntegerKind: global function
Returns: Integer - the midi number or null if not valid pitch
| Param | Type | Description |
| --- | --- | --- |
| pitch | Array | String | the pitch |
Example
``js`
midi('C4') // => 60
StringKind: global function
Returns: String - the note name
| Param | Type | Description |
| --- | --- | --- |
| midi | Integer | the midi note number |
Example
`js`
tonal.fromMidi(61) // => 'Db4'
StringKind: global function
Returns: String - the note name
| Param | Type | Description |
| --- | --- | --- |
| midi | Integer | the midi note number |
Example
`js``
tonal.fromMidiS(61) // => 'C#4'