a function used in midiInfo()