public static string MIDI_GetErrorText(bool input, int errCode) { StringBuilder stringBuilder = new StringBuilder(128); if (input) { Midi.midiInGetErrorText(errCode, stringBuilder, stringBuilder.Capacity); } else { Midi.midiOutGetErrorText(errCode, stringBuilder, stringBuilder.Capacity); } return(stringBuilder.ToString()); }