refactored note-player loop and introduced key-dispatch for easier key-function mapping