seperate midi play logic from the view