var noteoff = new Task(note_off,this);
No surprises there. So, before I embark on something ugly, I'm wondering what a nice, elegant way of doing this is. I've had the thought that I could create an array of Tasks, check to see if a task is busy, if it is, then try the next one in the array, and so on. This would probably work, but it seems a bit of a brute force method, and not very elegant.
Has anyone come up with a good solution for this? Do share!