wave-roll
Version:
JavaScript Library for Comparative MIDI Piano-Roll Visualization
27 lines • 780 B
TypeScript
/**
* Converts MIDI note number to scientific pitch notation
* @param midi - MIDI note number (0-127, where 60 = C4)
* @returns Scientific pitch notation (e.g., "C4", "A#3")
*
* @example
* ```typescript
* midiToNoteName(60); // "C4"
* midiToNoteName(69); // "A4"
* midiToNoteName(61); // "C#4"
* ```
*/
export declare function midiToNoteName(midi: number): string;
/**
* Converts scientific pitch notation to MIDI note number
* @param noteName - Scientific pitch notation (e.g., "C4", "A#3")
* @returns MIDI note number (0-127)
*
* @example
* ```typescript
* noteNameToMidi("C4"); // 60
* noteNameToMidi("A4"); // 69
* noteNameToMidi("C#4"); // 61
* ```
*/
export declare function noteNameToMidi(noteName: string): number;
//# sourceMappingURL=pitch.d.ts.map