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 Data::Dumper::Compact qw(ddc); | |
use MIDI::RtMidi::FFI::Device (); | |
my $midi_in = RtMidiIn->new; | |
$midi_in->open_port_by_name(qr/tempopad/i); |
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
cpanm (App::cpanminus) 1.7047 on perl 5.040000 built for x86_64-linux | |
Work directory is /home/gene/.cpanm/work/1737741557.397385 | |
You have make /usr/bin/make | |
You have LWP 6.77 | |
You have /usr/bin/tar: tar (GNU tar) 1.35 | |
Copyright (C) 2023 Free Software Foundation, Inc. | |
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>. | |
This is free software: you are free to change and redistribute it. | |
There is NO WARRANTY, to the extent permitted by law. |
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
# $d->metronome44($d->bars, $d->ride2, $d->quarter, 67) | |
sub metronome44 { | |
my $self = shift; | |
my $bars = shift || $self->bars; | |
my $cymbal = shift || $self->ride1; | |
my $tempo = shift || $self->quarter; | |
my $swing = shift || 50; # percent | |
my $x = dura_size($tempo) * TICKS; | |
my $y = sprintf '%0.f', ($swing / 100) * $x; | |
my $z = $x - $y; |
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
Use of uninitialized value $file in concatenation (.) or string at .../upload.pl line 96. | |
Mojo::Server::Sandbox::d51d682e78b961e143b7ed5b80fccaf5 L96 | |
[2025-01-18 09:45:41.85818] [31751] [error] [TA0Dg0GidrV3] Can't call method "size" on an undefined value at .../upload.pl line 102. |
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
> perl primes/date-primes.pl 2024 | |
Prime dates: { | |
'2024' => { | |
'01' => [ 20240107 ], | |
'02' => [ 20240219 ], | |
'03' => [ 20240323, 20240327 ], | |
'04' => [ 20240411, 20240419 ], | |
'05' => [ 20240531 ], | |
'06' => [ 20240603, 20240611 ], |
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 Getopt::Long qw(GetOptions); | |
use MIDI::RtMidi::FFI::Device (); | |
use Time::HiRes qw(usleep); | |
my %opt = ( | |
virtual => 'foo', |
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 Getopt::Long qw(GetOptions); | |
use MIDI::RtMidi::FFI::Device (); | |
use Time::HiRes qw(usleep); | |
my %opt = ( | |
virtual => 'foo', #'perl-rtmidi', |
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 mido | |
import time | |
# https://github.com/ology/Music/blob/master/clock-it.py | |
def send_clock(outport, bpm=120): | |
# Calculate the time between clock messages (24 PPQN per beat) | |
interval = 60 / (bpm * 24) | |
try: | |
while True: |
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 mido | |
import time | |
def send_clock_messages(outport, bpm=120, num_beats=4): | |
# Calculate the time between clock messages (24 PPQN per beat) | |
interval = 60 / (bpm * 24) | |
for _ in range(num_beats * 24): | |
outport.send(mido.Message('clock')) | |
time.sleep(interval) |
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
(Python) gene@zappa:~/sandbox/dev/Python> pip install -i https://test.pypi.org/simple/ chess-coverage==0.1.1 | |
Looking in indexes: https://test.pypi.org/simple/ | |
Collecting chess-coverage==0.1.1 | |
Using cached https://test-files.pythonhosted.org/packages/44/73/23e180406c9f065a76a81594b70cf8d1f17503f31b742c695b2ca7224fd0/chess_coverage-0.1.1-py3-none-any.whl.metadata (42 kB) | |
INFO: pip is looking at multiple versions of chess-coverage to determine which version is compatible with other requirements. This could take a while. | |
ERROR: Could not find a version that satisfies the requirement chess (from chess-coverage) (from versions: none) | |
ERROR: No matching distribution found for chess |