New technical article published on how to make a drum machine app in #Perl: https://www.perl.com/article/making-an-asynchronous-clocking-drum-machine-in-perl/ - Woo!
Thanks @oalders@fosstodon.org :D
Epistemologist-at-large
New technical article published on how to make a drum machine app in #Perl: https://www.perl.com/article/making-an-asynchronous-clocking-drum-machine-in-perl/ - Woo!
Thanks @oalders@fosstodon.org :D
Just felt the urge to say that #Perl has a fabulous #MIDI and musical ecosystem. It follows the adage, "Easy things should be easy, and hard things should be possible." Low-level hacking and high-level musical coding are equally easy. Ha. `$perl++;`
A client texted me all stressed and asked me to give her access to her company website so she could update it. :eyeroll:
I explained that either I could do the job in 15 minutes OR I could transfer the website to her and train her on how to build websites...
She asked me to do it, of course.
Trying to asynchronously send a MIDI clock message, but the interval is always a bit longer than what I tell it to loop over. I tell it 120 beats per minute, but my MIDI device tells me it's clocking at 114 BPM.
Why is the loop interval not being honored with my code?
For the record, I am trying to wrap my head around asyncio but am obviously not using it correctly. Here is some code I cobbled together from brain/web:
https://gist.github.com/ology/2dc2532617e1ef9149d6620edb78572a
Help? :)
Here is how to clock a midi device, like a drum machine with #Perl and @leonerd@fosstodon.org 's IO::Async::Timer::Periodic and @fuzzix@mastodon.ie ' MIDI::RtMidi::FFI::Device: https://github.com/ology/Music/blob/master/clock-gen-async.pl
Fresh article on Python musical creativity:
https://ology.github.io/2026/02/24/musical-rhythms-with-math-in-python/
Released https://metacpan.org/dist/Music-Drummer 0.7000 now with a growing collection of common grooves and of course an example program and test to exercise the new features. Woo!