Closed vanceism7 closed 2 years ago
That block of code mainly processes things that need to happen before the prompt shows again in midi shell mode as well as the shell itself. So that involves finishing pending commands and arpeggios, as well as allowing looping. Maybe I should go through and comment that more and we can figure out the best way to break it up. Maybe we could break it into 2 functions, process_pending() and show_prompt()?
Beginning of refactoring player.py. It's not a very impressive refactor, we just pull a big try statement out and stick it in it's own function. This PR is WIP - if the refactor is correct, the function should still be given a more appropriate name, and we should add a doc string as well before merging. We could also continue to add more refactorings in this branch before merging if we'd prefer to not have a ton of PRs; just wanted to start small so its easy to review changes
Let me know what you think! Maybe you can enlighten me on what exactly we're doing here. Seems like it has something to do with when playback hits the end of the loop/file or something of that sort.