A midi tool in cpp