This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import asyncio | |
| import mido | |
| from mido import Message | |
| import sys | |
| def periodic_task(loop, interval, task_func): | |
| task_func() | |
| # Schedule the next call recursively | |
| loop.call_later(interval, periodic_task, loop, interval, task_func) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| gene@zappa:~/repos/perldotcom master> hugo server --buildDrafts --buildFuture | |
| Watching for changes in /Users/gene/repos/perldotcom/content/{article,json,legacy}, /Users/gene/repos/perldotcom/data/author, /Users/gene/repos/perldotcom/layouts/{_default,about,latest_articles,partials,shortcodes,...}, /Users/gene/repos/perldotcom/package.json, /Users/gene/repos/perldotcom/static/{css,fonts,images,media,widget} | |
| Watching for config changes in /Users/gene/repos/perldotcom/hugo.toml | |
| Start building sites … | |
| hugo v0.159.1+extended+withdeploy darwin/arm64 BuildDate=2026-03-26T09:54:15Z VendorInfo=Homebrew | |
| WARN deprecated: .Site.Data was deprecated in Hugo v0.156.0 and will be removed in a future release. Use hugo.Data instead. | |
| Built in 2238 ms | |
| ERROR error building site: render: [en v1.0.0 guest] failed to render pages: render of "/authors/adam-kennedy" failed: "/Users/gene/repos/perldotcom/layouts/_default/rss.xml:8:50": execute of template failed: template: rss.xml:8:50: executing "rss.xml" at <.Site.Author.email>: ca |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env perl | |
| # Clock an external MIDI device, like a drum machine or sequencer. | |
| # Example: perl clock-gen-async.pl usb 90 | |
| use v5.36; | |
| use IO::Async::Loop (); | |
| use IO::Async::Timer::Periodic (); | |
| use MIDI::RtMidi::FFI::Device (); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env perl | |
| use v5.36; | |
| use IO::Async::Loop (); | |
| use IO::Async::Process (); | |
| use IO::Async::Timer::Periodic (); | |
| my $loop = IO::Async::Loop->new; | |
| my $timer = IO::Async::Timer::Periodic->new( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env perl | |
| use v5.36; | |
| use MIDI::RtMidi::FFI::Device (); | |
| use Time::HiRes qw(sleep); | |
| my $name = shift || 'SE-02'; # MIDI sequencer device | |
| my $bpm = shift || 120; | |
| my $interval = 60 / $bpm / 24; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env perl | |
| use strict; | |
| use warnings; | |
| use Test::More; | |
| use_ok 'MIDI::RtController'; | |
| # SKIP: { | |
| # skip 'live test', 7; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| gene@zappa:~/Downloads/MIDI-RtMidi-FFI-0.09_001> make | |
| cp FFI/rtmidi-ffi.fbx blib/lib/MIDI/RtMidi/FFI/rtmidi-ffi.fbx | |
| cp FFI/pipefd.cpp blib/lib/MIDI/RtMidi/FFI/pipefd.cpp | |
| cp lib/MIDI/RtMidi/FFI/Device/Out.pm blib/lib/MIDI/RtMidi/FFI/Device/Out.pm | |
| cp lib/MIDI/RtMidi/FFI/AbstractDevice.pm blib/lib/MIDI/RtMidi/FFI/AbstractDevice.pm | |
| cp lib/MIDI/RtMidi/FFI/Device/In.pm blib/lib/MIDI/RtMidi/FFI/Device/In.pm | |
| cp lib/MIDI/RtMidi/FFI/Device.pm blib/lib/MIDI/RtMidi/FFI/Device.pm | |
| cp lib/MIDI/RtMidi/FFI.pm blib/lib/MIDI/RtMidi/FFI.pm | |
| "/Users/gene/perl5/perlbrew/perls/perl-5.38.0/bin/perl" -MFFI::Build::MM=cmd -e fbx_build | |
| +c++ -I/Users/gene/perl5/perlbrew/perls/perl-5.38.0/lib/site_perl/5.38.0/darwin-2level/auto/share/dist/Alien-RtMidi/include/rtmidi -fno-common -DPERL_DARWIN -mmacosx-version-min=13.4 -DNO_POSIX_2008_LOCALE -fno-strict-aliasing -pipe -fstack-protector-strong -O3 -I/Users/gene/perl5/perlbrew/perls/perl-5.38.0/lib/site_perl/5.38.0/darwin-2level/auto/share/dist/FFI-Platypus/include -pthread -D__MACOSX_CORE__ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| gene@zappa:~> cpanm MIDI::RtMidi::FFI --dev | |
| cpanm (App::cpanminus) 1.7047 on perl 5.038000 built for darwin-2level | |
| Work directory is /Users/gene/.cpanm/work/1771528590.31893 | |
| You have make /usr/bin/make | |
| You have LWP 6.72 | |
| You have /usr/bin/tar: bsdtar 3.5.3 - libarchive 3.7.4 zlib/1.2.12 liblzma/5.4.3 bz2lib/1.0.8 | |
| You have /usr/bin/unzip | |
| --> Working on MIDI::RtMidi::FFI | |
| Fetching http://cpan.metacpan.org/authors/id/J/JB/JBARRETT/MIDI-RtMidi-FFI-0.09-TRIAL.tar.gz ... OK | |
| Unpacking MIDI-RtMidi-FFI-0.09-TRIAL.tar.gz |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| gene@zappa:~/sandbox/Music master> perl pso-music.pl | |
| 1. Optimized Chord: C4-A4-E5 | |
| Final Dissonance Score: 12 (Lower is more consonant) | |
| 2. Optimized Chord: C4-G4-E5 | |
| Final Dissonance Score: 12 (Lower is more consonant) | |
| 3. Optimized Chord: G4-C5-E5 | |
| Final Dissonance Score: 13 (Lower is more consonant) | |
| 4. Optimized Chord: F4-D5-A5 | |
| Final Dissonance Score: 12 (Lower is more consonant) | |
| 5. Optimized Chord: F4-D5-A5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ | |
| [ | |
| 'tag', 'p', { id => 'a' }, [ | |
| 'tag', 'div', {}, [ 'root', $_->[0][3] ], $_->[0], [ | |
| 'tag', 'p', { id => 'b' }, $_->[0][3], | |
| [ 'text', 123, $_->[0][3][5] ], | |
| ], | |
| ], [ 'text', 'Test', $_->[0] ], | |
| ], $_->[0][3][5], | |
| ] |
NewerOlder