fixed midi polyphony

needs much more refactoring