Added provision for returning a flattened output in noteFromMidiPitch