close() Close the input device and free its resources. midiin.close() Also clears every event handler set with the on… methods.