Stephan van Hulst wrote:Actually, you shouldn't be using Thread.sleep() at all. If you want to block the current thread until the track has finished playing, you should use locks and conditions and add a meta event listener to the sequencer.
Stephan, can you tell me where I can go to find out how to "use locks and conditions" and adding "a meta event listener to the sequencer"? Are those things new to Java 8 or Java 9? I'm mostly familiar with Java 6 and 7, and I don't remember anything about locks, conditions, or meta event listeners.