export const STANDARD_MIDI_INSTRUMENT: { [key: number]: string } = {
    1: "Acoustic Grand Piano",
    2: "Bright Acoustic Piano",
    3: "Electric Grand Piano",
    4: "Honky-tonk Piano",
    5: "Electric Piano 1",
    6: "Electric Piano 2",
    7: "Harpsichord",
    8: "Clavinet",
    9: "Celesta",
    10: "Glockenspiel",
    11: "Music Box",
    12: "Vibraphone",
    13: "Marimba",
    14: "Xylophone",
    15: "Tubular Bells",
    16: "Dulcimer",
    17: "Drawbar Organ",
    18: "Percussive Organ",
    19: "Rock Organ",
    20: "Church Organ",
    21: "Reed Organ",
    22: "Accordion",
    23: "Harmonica",
    24: "Bandoneon",
    25: "Acoustic Guitar (nylon)",
    26: "Acoustic Guitar (steel)",
    27: "Electric Guitar (jazz)",
    28: "Electric Guitar (clean)",
    29: "Electric Guitar (muted)",
    30: "Electric Guitar (overdrive)",
    31: "Electric Guitar (distortion)",
    32: "Electric Guitar (harmonics)",
    33: "Acoustic Bass",
    34: "Electric Bass (finger)",
    35: "Electric Bass (picked)",
    36: "Electric Bass (fretless)",
    37: "Slap Bass 1",
    38: "Slap Bass 2",
    39: "Synth Bass 1",
    40: "Synth Bass 2",
    41: "Violin",
    42: "Viola",
    43: "Cello",
    44: "Contrabass",
    45: "Tremolo Strings",
    46: "Pizzicato Strings",
    47: "Orchestral Harp",
    48: "Timpani",
    49: "String Ensemble 1",
    50: "String Ensemble 2",
    51: "Synth Strings 1",
    52: "Synth Strings 2",
    53: "Choir Aahs",
    54: "Voice Oohs",
    55: "Synth Voice",
    56: "Orchestra Hit",
    57: "Trumpet",
    58: "Trombone",
    59: "Tuba",
    60: "Muted Trumpet",
    61: "French Horn",
    62: "Brass Section",
    63: "Synth Brass 1",
    64: "Synth Brass 2",
    65: "Soprano Sax",
    66: "Alto Sax",
    67: "Tenor Sax",
    68: "Baritone Sax",
    69: "Oboe",
    70: "English Horn",
    71: "Bassoon",
    72: "Clarinet",
    73: "Piccolo",
    74: "Flute",
    75: "Recorder",
    76: "Pan Flute",
    77: "Blown Bottle",
    78: "Shakuhachi",
    79: "Whistle",
    80: "Ocarina",
    81: "Lead 1 (square)",
    82: "Lead 2 (sawtooth)",
    83: "Lead 3 (calliope)",
    84: "Lead 4 (chiff)",
    85: "Lead 5 (charang)",
    86: "Lead 6 (voice)",
    87: "Lead 7 (fifths)",
    88: "Lead 8 (bass + lead)",
    89: "Pad 1 (new age)",
    90: "Pad 2 (warm)",
    91: "Pad 3 (polysynth)",
    92: "Pad 4 (choir)",
    93: "Pad 5 (bowed glass)",
    94: "Pad 6 (metallic)",
    95: "Pad 7 (halo)",
    96: "Pad 8 (sweep)",
    97: "FX 1 (rain)",
    98: "FX 2 (soundtrack)",
    99: "FX 3 (crystal)",
    100: "FX 4 (atmosphere)",
    101: "FX 5 (brightness)",
    102: "FX 6 (goblins)",
    103: "FX 7 (echoes)",
    104: "FX 8 (sci-fi)",
    105: "Sitar",
    106: "Banjo",
    107: "Shamisen",
    108: "Koto",
    109: "Kalimba",
    110: "Bagpipe",
    111: "Fiddle",
    112: "Shanai",
    113: "Tinkle Bell",
    114: "Agogo",
    115: "Steel Drums",
    116: "Woodblock",
    117: "Taiko Drum",
    118: "Melodic Tom",
    119: "Synth Drum",
    120: "Reverse Cymbal",
    121: "Guitar Fret Noise",
    122: "Breath Noise",
    123: "Seashore",
    124: "Bird Tweet",
    125: "Telephone Ring",
    126: "Helicopter",
    127: "Applause",
    128: "Gunshot"
};

export const INSTRUMENT_GROUPS = {
    PIANO_AND_KEYBOARDS: "Piano and Keyboards",
    GUITAR: "Guitar",
    BASS: "Bass",
    STRINGS: "Strings",
    BRASS: "Brass",
    WOODWIND: "Woodwind",
    PERCUSSION_KIT: "Percussion Kit",
    SYNTH: "Synthesizer",
};

export const FLUIDR3_INSTRUMENT_MAP: {
    [key: string]: { displayName: string; midiInstrument: number; image: string; group: string; pitchRange: [number, number] }
} = {
    // group: piano and keyboards
    acoustic_grand_piano: { displayName: "Acoustic Grand Piano", midiInstrument: 1, image: "piano.png", group: "PIANO_AND_KEYBOARDS", pitchRange: [21, 108] },
    bright_acoustic_piano: { displayName: "Bright Acoustic Piano", midiInstrument: 2, image: "piano.png", group: "PIANO_AND_KEYBOARDS", pitchRange: [21, 108] },
    electric_grand_piano: { displayName: "Electric Grand Piano", midiInstrument: 3, image: "electric_piano.png", group: "PIANO_AND_KEYBOARDS", pitchRange: [21, 108] },
    electric_piano_1: { displayName: "Electric Piano 1", midiInstrument: 5, image: "electric_piano.png", group: "PIANO_AND_KEYBOARDS", pitchRange: [21, 108] },
    electric_piano_2: { displayName: "Electric Piano 2", midiInstrument: 6, image: "electric_piano.png", group: "PIANO_AND_KEYBOARDS", pitchRange: [21, 108] },
    drawbar_organ: { displayName: "Drawbar Organ", midiInstrument: 17, image: "drawbar_organ.png", group: "PIANO_AND_KEYBOARDS", pitchRange: [21, 108] },
    clavinet: { displayName: "Clavinet", midiInstrument: 8, image: "drawbar_organ.png", group: "PIANO_AND_KEYBOARDS", pitchRange: [21, 108] },
    harpsichord: { displayName: "Harpsichord", midiInstrument: 7, image: "drawbar_organ.png", group: "PIANO_AND_KEYBOARDS", pitchRange: [21, 108] },
    accordion: { displayName: "Accordion", midiInstrument: 22, image: "accordian.png", group: "PIANO_AND_KEYBOARDS", pitchRange: [21, 108] },
    
    // group: guitar
    acoustic_guitar_nylon: { displayName: "Acoustic Guitar (nylon)", midiInstrument: 25, image: "guitar.png", group: "GUITAR", pitchRange: [21, 108] },
    acoustic_guitar_steel: { displayName: "Acoustic Guitar (steel)", midiInstrument: 26, image: "guitar.png", group: "GUITAR", pitchRange: [21, 108] },
    electric_guitar_clean: { displayName: "Electric Guitar (clean)", midiInstrument: 28, image: "electric_guitar.png", group: "GUITAR", pitchRange: [21, 108] },
    overdriven_guitar: { displayName: "Electric Guitar (overdrive)", midiInstrument: 30, image: "electric_guitar.png", group: "GUITAR", pitchRange: [21, 108] },
    distortion_guitar: { displayName: "Electric Guitar (distortion)", midiInstrument: 31, image: "electric_guitar.png", group: "GUITAR", pitchRange: [21, 108] },
    
    // group: bass
    acoustic_bass: { displayName: "Acoustic Bass", midiInstrument: 33, image: "bass.png", group: "BASS", pitchRange: [21, 108] },
    electric_bass_finger: { displayName: "Electric Bass (finger)", midiInstrument: 34, image: "bass.png", group: "BASS", pitchRange: [21, 108] },
    electric_bass_pick: { displayName: "Electric Bass (picked)", midiInstrument: 35, image: "bass.png", group: "BASS", pitchRange: [21, 108] },
    slap_bass_1: { displayName: "Slap Bass", midiInstrument: 37, image: "bass.png", group: "BASS", pitchRange: [21, 108] },
    synth_bass_1: { displayName: "Synth Bass 1", midiInstrument: 39, image: "synth.png", group: "BASS", pitchRange: [21, 108] },
    
    // group: strings
    violin: { displayName: "Violin", midiInstrument: 41, image: "violin.png", group: "STRINGS", pitchRange: [21, 108] },
    viola: { displayName: "Viola", midiInstrument: 42, image: "viola.png", group: "STRINGS", pitchRange: [21, 108] },
    cello: { displayName: "Cello", midiInstrument: 43, image: "cello.png", group: "STRINGS", pitchRange: [21, 108] },
    contrabass: { displayName: "Contrabass", midiInstrument: 44, image: "contrabass.png", group: "STRINGS", pitchRange: [21, 108] },
    string_ensemble_1: { displayName: "String Ensemble", midiInstrument: 49, image: "string_ensemble.png", group: "STRINGS", pitchRange: [21, 108] },
    string_ensemble_2: { displayName: "String Ensemble 2", midiInstrument: 50, image: "string_ensemble.png", group: "STRINGS", pitchRange: [21, 108] },
    pizzicato_strings: { displayName: "Pizzicato Strings", midiInstrument: 46, image: "string_ensemble.png", group: "STRINGS", pitchRange: [21, 108] },
    tremolo_strings: { displayName: "Tremolo Strings", midiInstrument: 45, image: "string_ensemble.png", group: "STRINGS", pitchRange: [21, 108] },
    orchestral_harp: { displayName: "Orchestral Harp", midiInstrument: 47, image: "harp.png", group: "STRINGS", pitchRange: [21, 108] },
    
    // group: brass
    trumpet: { displayName: "Trumpet", midiInstrument: 57, image: "trumpet.png", group: "BRASS", pitchRange: [21, 108] },
    trombone: { displayName: "Trombone", midiInstrument: 58, image: "trombone.png", group: "BRASS", pitchRange: [21, 108] },
    tuba: { displayName: "Tuba", midiInstrument: 59, image: "tuba.png", group: "BRASS", pitchRange: [21, 108] },
    french_horn: { displayName: "French Horn", midiInstrument: 61, image: "french_horn.png", group: "BRASS", pitchRange: [21, 108] },
    brass_section: { displayName: "Brass Section", midiInstrument: 62, image: "brass_ensemble.png", group: "BRASS", pitchRange: [21, 108] },
    
    // group: woodwind
    soprano_sax: { displayName: "Soprano Sax", midiInstrument: 65, image: "soprano_sax.png", group: "WOODWIND", pitchRange: [21, 108] },
    alto_sax: { displayName: "Alto Sax", midiInstrument: 66, image: "sax.png", group: "WOODWIND", pitchRange: [21, 108] },
    tenor_sax: { displayName: "Tenor Sax", midiInstrument: 67, image: "sax.png", group: "WOODWIND", pitchRange: [21, 108] },
    baritone_sax: { displayName: "Baritone Sax", midiInstrument: 68, image: "baritone_sax.png", group: "WOODWIND", pitchRange: [21, 108] },
    oboe: { displayName: "Oboe", midiInstrument: 69, image: "oboe.png", group: "WOODWIND", pitchRange: [21, 108] },
    english_horn: { displayName: "English Horn", midiInstrument: 70, image: "english_horn.png", group: "WOODWIND", pitchRange: [21, 108] },
    bassoon: { displayName: "Bassoon", midiInstrument: 71, image: "bassoon.png", group: "WOODWIND", pitchRange: [21, 108] },
    clarinet: { displayName: "Clarinet", midiInstrument: 72, image: "clarinet.png", group: "WOODWIND", pitchRange: [21, 108] },
    piccolo: { displayName: "Piccolo", midiInstrument: 73, image: "piccolo.png", group: "WOODWIND", pitchRange: [21, 108] },
    flute: { displayName: "Flute", midiInstrument: 74, image: "flute.png", group: "WOODWIND", pitchRange: [21, 108] },
    shakuhachi: { displayName: "Shakuhachi", midiInstrument: 78, image: "shakuhachi.png", group: "WOODWIND", pitchRange: [21, 108] },
    harmonica: { displayName: "Harmonica", midiInstrument: 23, image: "harmonica.png", group: "WOODWIND", pitchRange: [21, 108] },
    
    // group: percussion_kit
    // Note: Drum kits are selected by channel 10 in GM; program numbers are typically ignored
    standard: { displayName: "Standard Drum Kit", midiInstrument: 0, image: "drums.png", group: "PERCUSSION_KIT", pitchRange: [27, 87] },
    orchestra_kit: { displayName: "Orchestra Drum Kit", midiInstrument: 0, image: "orchestra_percussion_kit.png", group: "PERCUSSION_KIT", pitchRange: [27, 88] },
    marimba: { displayName: "Marimba", midiInstrument: 13, image: "marimba.png", group: "PERCUSSION_KIT", pitchRange: [21, 108] },
    timpani: { displayName: "Timpani", midiInstrument: 48, image: "orchestra_percussion_kit.png", group: "PERCUSSION_KIT", pitchRange: [21, 108] },
    taiko_drum: { displayName: "Taiko Drum", midiInstrument: 117, image: "orchestra_percussion_kit.png", group: "PERCUSSION_KIT", pitchRange: [21, 108] },
    woodblock: { displayName: "Woodblock", midiInstrument: 116, image: "orchestra_percussion_kit.png", group: "PERCUSSION_KIT", pitchRange: [21, 108] },
    
    // group: synth
    lead_1_square: { displayName: "Lead 1 (square)", midiInstrument: 81, image: "synth.png", group: "SYNTH", pitchRange: [21, 108] },
    lead_2_sawtooth: { displayName: "Lead 2 (sawtooth)", midiInstrument: 82, image: "synth.png", group: "SYNTH", pitchRange: [21, 108] },
    pad_1_new_age: { displayName: "Pad 1 (new age)", midiInstrument: 89, image: "synth.png", group: "SYNTH", pitchRange: [21, 108] },
    pad_2_warm: { displayName: "Pad 2 (warm)", midiInstrument: 90, image: "synth.png", group: "SYNTH", pitchRange: [21, 108] },
    pad_3_polysynth: { displayName: "Pad 3 (polysynth)", midiInstrument: 91, image: "synth.png", group: "SYNTH", pitchRange: [21, 108] },
    pad_4_choir: { displayName: "Pad 4 (choir)", midiInstrument: 92, image: "synth.png", group: "SYNTH", pitchRange: [21, 108] },
    pad_5_bowed: { displayName: "Pad 5 (bowed glass)", midiInstrument: 93, image: "synth.png", group: "SYNTH", pitchRange: [21, 108] },
    pad_6_metallic: { displayName: "Pad 6 (metallic)", midiInstrument: 94, image: "synth.png", group: "SYNTH", pitchRange: [21, 108] },
    pad_7_halo: { displayName: "Pad 7 (halo)", midiInstrument: 95, image: "synth.png", group: "SYNTH", pitchRange: [21, 108] },
    pad_8_sweep: { displayName: "Pad 8 (sweep)", midiInstrument: 96, image: "synth.png", group: "SYNTH", pitchRange: [21, 108] },
    fx_1_rain: { displayName: "FX 1 (rain)", midiInstrument: 97, image: "synth.png", group: "SYNTH", pitchRange: [21, 108] },
    fx_2_soundtrack: { displayName: "FX 2 (soundtrack)", midiInstrument: 98, image: "synth.png", group: "SYNTH", pitchRange: [21, 108] },
    fx_3_crystal: { displayName: "FX 3 (crystal)", midiInstrument: 99, image: "synth.png", group: "SYNTH", pitchRange: [21, 108] },
    fx_4_atmosphere: { displayName: "FX 4 (atmosphere)", midiInstrument: 100, image: "synth.png", group: "SYNTH", pitchRange: [21, 108] },
    fx_5_brightness: { displayName: "FX 5 (brightness)", midiInstrument: 101, image: "synth.png", group: "SYNTH", pitchRange: [21, 108] },
    fx_6_goblins: { displayName: "FX 6 (goblins)", midiInstrument: 102, image: "synth.png", group: "SYNTH", pitchRange: [21, 108] },
    fx_7_echoes: { displayName: "FX 7 (echoes)", midiInstrument: 103, image: "synth.png", group: "SYNTH", pitchRange: [21, 108] },
    fx_8_scifi: { displayName: "FX 8 (sci-fi)", midiInstrument: 104, image: "synth.png", group: "SYNTH", pitchRange: [21, 108] },
};

// In case if we need to do sanity check:
// for (const key in FLUIDR3_INSTRUMENT_MAP) {
//     const value = FLUIDR3_INSTRUMENT_MAP[key];
//     // value.midiInstrument is 1-based, STANDARD_MIDI_INSTRUMENT is 1-based
//     console.log(`${key}: ${STANDARD_MIDI_INSTRUMENT[value.midiInstrument]}`);
// }

export const STANDARD_MIDI_INSTRUMENT_MAP: {
    [program: number]: {
        midiInstrumentName: string;
        fluidR3InstrumentName: keyof typeof FLUIDR3_INSTRUMENT_MAP;
        exactMap: boolean;
    };
} = {
    1: { midiInstrumentName: "Acoustic Grand Piano", fluidR3InstrumentName: "acoustic_grand_piano", exactMap: true },
    2: { midiInstrumentName: "Bright Acoustic Piano", fluidR3InstrumentName: "bright_acoustic_piano", exactMap: true },
    3: { midiInstrumentName: "Electric Grand Piano", fluidR3InstrumentName: "electric_grand_piano", exactMap: true },
    4: { midiInstrumentName: "Honky-tonk Piano", fluidR3InstrumentName: "electric_piano_1", exactMap: false },
    5: { midiInstrumentName: "Electric Piano 1", fluidR3InstrumentName: "electric_piano_1", exactMap: true },
    6: { midiInstrumentName: "Electric Piano 2", fluidR3InstrumentName: "electric_piano_2", exactMap: true },
    7: { midiInstrumentName: "Harpsichord", fluidR3InstrumentName: "harpsichord", exactMap: true },
    8: { midiInstrumentName: "Clavinet", fluidR3InstrumentName: "clavinet", exactMap: true },
    9: { midiInstrumentName: "Celesta", fluidR3InstrumentName: "electric_piano_1", exactMap: false },
    10: { midiInstrumentName: "Glockenspiel", fluidR3InstrumentName: "electric_piano_1", exactMap: false },
    11: { midiInstrumentName: "Music Box", fluidR3InstrumentName: "electric_piano_1", exactMap: false },
    12: { midiInstrumentName: "Vibraphone", fluidR3InstrumentName: "electric_piano_2", exactMap: false },
    13: { midiInstrumentName: "Marimba", fluidR3InstrumentName: "marimba", exactMap: true },
    14: { midiInstrumentName: "Xylophone", fluidR3InstrumentName: "electric_piano_1", exactMap: false },
    15: { midiInstrumentName: "Tubular Bells", fluidR3InstrumentName: "electric_piano_2", exactMap: false },
    16: { midiInstrumentName: "Dulcimer", fluidR3InstrumentName: "harpsichord", exactMap: false },
    17: { midiInstrumentName: "Drawbar Organ", fluidR3InstrumentName: "drawbar_organ", exactMap: true },
    18: { midiInstrumentName: "Percussive Organ", fluidR3InstrumentName: "drawbar_organ", exactMap: false },
    19: { midiInstrumentName: "Rock Organ", fluidR3InstrumentName: "drawbar_organ", exactMap: false },
    20: { midiInstrumentName: "Church Organ", fluidR3InstrumentName: "drawbar_organ", exactMap: false },
    21: { midiInstrumentName: "Reed Organ", fluidR3InstrumentName: "drawbar_organ", exactMap: false },
    22: { midiInstrumentName: "Accordion", fluidR3InstrumentName: "accordion", exactMap: true },
    23: { midiInstrumentName: "Harmonica", fluidR3InstrumentName: "harmonica", exactMap: true },
    24: { midiInstrumentName: "Bandoneon", fluidR3InstrumentName: "drawbar_organ", exactMap: false },
    25: { midiInstrumentName: "Acoustic Guitar (nylon)", fluidR3InstrumentName: "acoustic_guitar_nylon", exactMap: true },
    26: { midiInstrumentName: "Acoustic Guitar (steel)", fluidR3InstrumentName: "acoustic_guitar_steel", exactMap: true },
    27: { midiInstrumentName: "Electric Guitar (jazz)", fluidR3InstrumentName: "electric_guitar_clean", exactMap: false },
    28: { midiInstrumentName: "Electric Guitar (clean)", fluidR3InstrumentName: "electric_guitar_clean", exactMap: true },
    29: { midiInstrumentName: "Electric Guitar (muted)", fluidR3InstrumentName: "electric_guitar_clean", exactMap: false },
    30: { midiInstrumentName: "Electric Guitar (overdrive)", fluidR3InstrumentName: "overdriven_guitar", exactMap: true },
    31: { midiInstrumentName: "Electric Guitar (distortion)", fluidR3InstrumentName: "distortion_guitar", exactMap: true },
    32: { midiInstrumentName: "Electric Guitar (harmonics)", fluidR3InstrumentName: "electric_guitar_clean", exactMap: false },
    33: { midiInstrumentName: "Acoustic Bass", fluidR3InstrumentName: "acoustic_bass", exactMap: true },
    34: { midiInstrumentName: "Electric Bass (finger)", fluidR3InstrumentName: "electric_bass_finger", exactMap: true },
    35: { midiInstrumentName: "Electric Bass (picked)", fluidR3InstrumentName: "electric_bass_pick", exactMap: true },
    36: { midiInstrumentName: "Electric Bass (fretless)", fluidR3InstrumentName: "electric_bass_finger", exactMap: false },
    37: { midiInstrumentName: "Slap Bass 1", fluidR3InstrumentName: "slap_bass_1", exactMap: true },
    38: { midiInstrumentName: "Slap Bass 2", fluidR3InstrumentName: "slap_bass_1", exactMap: false },
    39: { midiInstrumentName: "Synth Bass 1", fluidR3InstrumentName: "synth_bass_1", exactMap: true },
    40: { midiInstrumentName: "Synth Bass 2", fluidR3InstrumentName: "lead_1_square", exactMap: false },
    41: { midiInstrumentName: "Violin", fluidR3InstrumentName: "violin", exactMap: true },
    42: { midiInstrumentName: "Viola", fluidR3InstrumentName: "viola", exactMap: true },
    43: { midiInstrumentName: "Cello", fluidR3InstrumentName: "cello", exactMap: true },
    44: { midiInstrumentName: "Contrabass", fluidR3InstrumentName: "contrabass", exactMap: true },
    45: { midiInstrumentName: "Tremolo Strings", fluidR3InstrumentName: "tremolo_strings", exactMap: true },
    46: { midiInstrumentName: "Pizzicato Strings", fluidR3InstrumentName: "pizzicato_strings", exactMap: true },
    47: { midiInstrumentName: "Orchestral Harp", fluidR3InstrumentName: "orchestral_harp", exactMap: true },
    48: { midiInstrumentName: "Timpani", fluidR3InstrumentName: "timpani", exactMap: true },
    49: { midiInstrumentName: "String Ensemble 1", fluidR3InstrumentName: "string_ensemble_1", exactMap: true },
    50: { midiInstrumentName: "String Ensemble 2", fluidR3InstrumentName: "string_ensemble_2", exactMap: true },
    51: { midiInstrumentName: "Synth Strings 1", fluidR3InstrumentName: "pad_3_polysynth", exactMap: false },
    52: { midiInstrumentName: "Synth Strings 2", fluidR3InstrumentName: "pad_2_warm", exactMap: false },
    53: { midiInstrumentName: "Choir Aahs", fluidR3InstrumentName: "pad_2_warm", exactMap: false },
    54: { midiInstrumentName: "Voice Oohs", fluidR3InstrumentName: "pad_1_new_age", exactMap: false },
    55: { midiInstrumentName: "Synth Voice", fluidR3InstrumentName: "pad_1_new_age", exactMap: false },
    56: { midiInstrumentName: "Orchestra Hit", fluidR3InstrumentName: "brass_section", exactMap: false },
    57: { midiInstrumentName: "Trumpet", fluidR3InstrumentName: "trumpet", exactMap: true },
    58: { midiInstrumentName: "Trombone", fluidR3InstrumentName: "trombone", exactMap: true },
    59: { midiInstrumentName: "Tuba", fluidR3InstrumentName: "tuba", exactMap: true },
    60: { midiInstrumentName: "Muted Trumpet", fluidR3InstrumentName: "trumpet", exactMap: false },
    61: { midiInstrumentName: "French Horn", fluidR3InstrumentName: "french_horn", exactMap: true },
    62: { midiInstrumentName: "Brass Section", fluidR3InstrumentName: "brass_section", exactMap: true },
    63: { midiInstrumentName: "Synth Brass 1", fluidR3InstrumentName: "brass_section", exactMap: false },
    64: { midiInstrumentName: "Synth Brass 2", fluidR3InstrumentName: "brass_section", exactMap: false },
    65: { midiInstrumentName: "Soprano Sax", fluidR3InstrumentName: "soprano_sax", exactMap: true },
    66: { midiInstrumentName: "Alto Sax", fluidR3InstrumentName: "alto_sax", exactMap: true },
    67: { midiInstrumentName: "Tenor Sax", fluidR3InstrumentName: "tenor_sax", exactMap: true },
    68: { midiInstrumentName: "Baritone Sax", fluidR3InstrumentName: "baritone_sax", exactMap: true },
    69: { midiInstrumentName: "Oboe", fluidR3InstrumentName: "oboe", exactMap: true },
    70: { midiInstrumentName: "English Horn", fluidR3InstrumentName: "english_horn", exactMap: true },
    71: { midiInstrumentName: "Bassoon", fluidR3InstrumentName: "bassoon", exactMap: true },
    72: { midiInstrumentName: "Clarinet", fluidR3InstrumentName: "clarinet", exactMap: true },
    73: { midiInstrumentName: "Piccolo", fluidR3InstrumentName: "piccolo", exactMap: true },
    74: { midiInstrumentName: "Flute", fluidR3InstrumentName: "flute", exactMap: true },
    75: { midiInstrumentName: "Recorder", fluidR3InstrumentName: "flute", exactMap: false },
    76: { midiInstrumentName: "Pan Flute", fluidR3InstrumentName: "flute", exactMap: false },
    77: { midiInstrumentName: "Blown Bottle", fluidR3InstrumentName: "flute", exactMap: false },
    78: { midiInstrumentName: "Shakuhachi", fluidR3InstrumentName: "shakuhachi", exactMap: true },
    79: { midiInstrumentName: "Whistle", fluidR3InstrumentName: "flute", exactMap: false },
    80: { midiInstrumentName: "Ocarina", fluidR3InstrumentName: "flute", exactMap: false },
    81: { midiInstrumentName: "Lead 1 (square)", fluidR3InstrumentName: "lead_1_square", exactMap: true },
    82: { midiInstrumentName: "Lead 2 (sawtooth)", fluidR3InstrumentName: "lead_2_sawtooth", exactMap: true },
    83: { midiInstrumentName: "Lead 3 (calliope)", fluidR3InstrumentName: "lead_1_square", exactMap: false },
    84: { midiInstrumentName: "Lead 4 (chiff)", fluidR3InstrumentName: "lead_2_sawtooth", exactMap: false },
    85: { midiInstrumentName: "Lead 5 (charang)", fluidR3InstrumentName: "lead_2_sawtooth", exactMap: false },
    86: { midiInstrumentName: "Lead 6 (voice)", fluidR3InstrumentName: "pad_1_new_age", exactMap: false },
    87: { midiInstrumentName: "Lead 7 (fifths)", fluidR3InstrumentName: "lead_2_sawtooth", exactMap: false },
    88: { midiInstrumentName: "Lead 8 (bass + lead)", fluidR3InstrumentName: "lead_2_sawtooth", exactMap: false },
    89: { midiInstrumentName: "Pad 1 (new age)", fluidR3InstrumentName: "pad_1_new_age", exactMap: true },
    90: { midiInstrumentName: "Pad 2 (warm)", fluidR3InstrumentName: "pad_2_warm", exactMap: true },
    91: { midiInstrumentName: "Pad 3 (polysynth)", fluidR3InstrumentName: "pad_3_polysynth", exactMap: true },
    92: { midiInstrumentName: "Pad 4 (choir)", fluidR3InstrumentName: "pad_4_choir", exactMap: true },
    93: { midiInstrumentName: "Pad 5 (bowed glass)", fluidR3InstrumentName: "pad_5_bowed", exactMap: true },
    94: { midiInstrumentName: "Pad 6 (metallic)", fluidR3InstrumentName: "pad_6_metallic", exactMap: true },
    95: { midiInstrumentName: "Pad 7 (halo)", fluidR3InstrumentName: "pad_7_halo", exactMap: true },
    96: { midiInstrumentName: "Pad 8 (sweep)", fluidR3InstrumentName: "pad_8_sweep", exactMap: true },
    97: { midiInstrumentName: "FX 1 (rain)", fluidR3InstrumentName: "fx_1_rain", exactMap: true },
    98: { midiInstrumentName: "FX 2 (soundtrack)", fluidR3InstrumentName: "fx_2_soundtrack", exactMap: true },
    99: { midiInstrumentName: "FX 3 (crystal)", fluidR3InstrumentName: "fx_3_crystal", exactMap: true },
    100: { midiInstrumentName: "FX 4 (atmosphere)", fluidR3InstrumentName: "fx_4_atmosphere", exactMap: true },
    101: { midiInstrumentName: "FX 5 (brightness)", fluidR3InstrumentName: "fx_5_brightness", exactMap: true },
    102: { midiInstrumentName: "FX 6 (goblins)", fluidR3InstrumentName: "fx_6_goblins", exactMap: true },
    103: { midiInstrumentName: "FX 7 (echoes)", fluidR3InstrumentName: "fx_7_echoes", exactMap: true },
    104: { midiInstrumentName: "FX 8 (sci-fi)", fluidR3InstrumentName: "fx_8_scifi", exactMap: true },
    105: { midiInstrumentName: "Sitar", fluidR3InstrumentName: "harpsichord", exactMap: false },
    106: { midiInstrumentName: "Banjo", fluidR3InstrumentName: "acoustic_guitar_steel", exactMap: false },
    107: { midiInstrumentName: "Shamisen", fluidR3InstrumentName: "acoustic_guitar_nylon", exactMap: false },
    108: { midiInstrumentName: "Koto", fluidR3InstrumentName: "acoustic_guitar_nylon", exactMap: false },
    109: { midiInstrumentName: "Kalimba", fluidR3InstrumentName: "electric_piano_1", exactMap: false },
    110: { midiInstrumentName: "Bagpipe", fluidR3InstrumentName: "clarinet", exactMap: false },
    111: { midiInstrumentName: "Fiddle", fluidR3InstrumentName: "violin", exactMap: false },
    112: { midiInstrumentName: "Shanai", fluidR3InstrumentName: "clarinet", exactMap: false },
    113: { midiInstrumentName: "Tinkle Bell", fluidR3InstrumentName: "electric_piano_2", exactMap: false },
    114: { midiInstrumentName: "Agogo", fluidR3InstrumentName: "woodblock", exactMap: false },
    115: { midiInstrumentName: "Steel Drums", fluidR3InstrumentName: "electric_piano_2", exactMap: false },
    116: { midiInstrumentName: "Woodblock", fluidR3InstrumentName: "woodblock", exactMap: true },
    117: { midiInstrumentName: "Taiko Drum", fluidR3InstrumentName: "taiko_drum", exactMap: true },
    118: { midiInstrumentName: "Melodic Tom", fluidR3InstrumentName: "taiko_drum", exactMap: false },
    119: { midiInstrumentName: "Synth Drum", fluidR3InstrumentName: "fx_4_atmosphere", exactMap: false },
    120: { midiInstrumentName: "Reverse Cymbal", fluidR3InstrumentName: "fx_4_atmosphere", exactMap: false },
    121: { midiInstrumentName: "Guitar Fret Noise", fluidR3InstrumentName: "electric_guitar_clean", exactMap: false },
    122: { midiInstrumentName: "Breath Noise", fluidR3InstrumentName: "flute", exactMap: false },
    123: { midiInstrumentName: "Seashore", fluidR3InstrumentName: "fx_4_atmosphere", exactMap: false },
    124: { midiInstrumentName: "Bird Tweet", fluidR3InstrumentName: "fx_4_atmosphere", exactMap: false },
    125: { midiInstrumentName: "Telephone Ring", fluidR3InstrumentName: "fx_4_atmosphere", exactMap: false },
    126: { midiInstrumentName: "Helicopter", fluidR3InstrumentName: "fx_4_atmosphere", exactMap: false },
    127: { midiInstrumentName: "Applause", fluidR3InstrumentName: "fx_4_atmosphere", exactMap: false },
    128: { midiInstrumentName: "Gunshot", fluidR3InstrumentName: "fx_4_atmosphere", exactMap: false },
};
