Here is how to clock a midi device, like a drum machine with #Perl and @leonerd 's IO::Async::Timer::Periodic and @fuzzix ' MIDI::RtMidi::FFI::Device: https://github.com/ology/Music/blob/master/clock-gen-async.pl