2 ms·
How do you run two runnables at the same time? Like, chords for the left hand, and then the melody for the right?
by mcphage 6y ago
How do you run two runnables at the same time? Like, chords for the left hand, and then the melody for the right?
- ddj231 6y agoOn a basic level the program below would accomplish that (can't promise this sounds pleasing to the ear ;) - start chunk lefthand play C3, Eb3, G3 for 2b rest for 2b endchunk chunk righthand play C3 for 1b play Gb3 for 1b play Eb3 for 1b play Db3 for 1b endchunk run lefthand with loop for 100 run righthand with loop for 100 finish
- mcphage 6y agoWhich part of "run lefthand with loop for 100" makes it non-blocking? It it "run" instead of "play"?
- ddj231 6y agoCurrently all run chunks play at the same time. So 'run somechunk' will create a run of a chunk that begins at the same time as all other run chunks. Your question does bring up an interesting idea, which would be to have a 'play somechunk' command that is blocking. But that does not exist at the moment