wave-roll
Version:
JavaScript Library for Comparative MIDI Piano-Roll Visualization
38 lines • 1.57 kB
TypeScript
/**
* General MIDI Instrument Names (Program 0-127)
* Source: https://gleitz.github.io/midi-js-soundfonts/FluidR3_GM/names.json
*
* Array index corresponds to MIDI Program Number (0-127)
*/
export declare const GM_INSTRUMENT_NAMES: readonly string[];
/**
* SoundFont base URL for loading instrument samples
*/
export declare const SOUNDFONT_BASE_URL = "https://paulrosen.github.io/midi-js-soundfonts/FluidR3_GM/";
/**
* Get the GM instrument name for a given MIDI program number.
* Returns "acoustic_grand_piano" for invalid program numbers.
* @param program - MIDI Program Number (0-127)
* @returns GM instrument name string
*/
export declare function getGMInstrumentName(program: number): string;
/**
* Get a human-readable display name for a GM instrument.
* Converts underscore-separated names to Title Case.
* @param program - MIDI Program Number (0-127)
* @returns Human-readable instrument name (e.g., "Acoustic Grand Piano")
*/
export declare function getGMInstrumentDisplayName(program: number): string;
/**
* Get the SoundFont URL for a given MIDI program number.
* @param program - MIDI Program Number (0-127)
* @returns Full URL to the instrument's mp3 folder
*/
export declare function getGMInstrumentUrl(program: number): string;
/**
* Sample map for paulrosen's FluidR3_GM soundfonts.
* Uses flat notation (Eb, Gb) instead of sharp notation (Ds, Fs).
* This is different from Tone.js salamander which uses sharp notation.
*/
export declare const GM_SAMPLE_MAP: Record<string, string>;
//# sourceMappingURL=gm-instruments.d.ts.map