osmd-audio-player
osmd-audio-player copied to clipboard
instrument not detected coz method getSoundfontInstrumentName is wrong
Hi!
this method doesnt replace round brackets
private getSoundfontInstrumentName(midiName: string): string { return midiName.toLowerCase().replace(/\s+/g, "_"); }
midiinstruments: ... [24, "Acoustic Guitar (nylon)"], [25, "Acoustic Guitar (steel)"], [26, "Electric Guitar (jazz)"], [27, "Electric Guitar (clean)"], [28, "Electric Guitar (muted)"], ... so, after calling getSoundfontInstrumentName() this names we got "acoustic_guitar_(nylon)" but it should be "acoustic_guitar_nylon", because file musyngkiteInstruments.ts include this name.