added midi callback interface from c to python