Skip to content

Instantly share code, notes, and snippets.

@ology
Last active April 21, 2026 21:31
Show Gist options
  • Select an option

  • Save ology/9687be7a34916f2a2c17b31ac5ffb148 to your computer and use it in GitHub Desktop.

Select an option

Save ology/9687be7a34916f2a2c17b31ac5ffb148 to your computer and use it in GitHub Desktop.
No fills
#!/usr/bin/env perl
use 5.012;
use strict;
use warnings;
use Music::SimpleDrumMachine;
my $groove = {
closed => [qw(1 1 0 1 1 1 1 1 1 1 1 0)],
open => [qw(0 0 1 0 0 0 0 0 0 0 0 1)],
kick => [qw(1 0 0 0 0 0 0 0 1 0 1 0)],
snare => [qw(0 0 0 0 1 0 0 0 0 0 0 0)],
};
my $dm = Music::SimpleDrumMachine->new(
port_name => 'fluid',
bpm => 120,
chan => 9,
parts => {
Part_A => sub { return 'Part_A', $groove },
},
next_part => 'Part_A',
filling => 0,
verbose => 1,
);
my $dm = Music::SimpleDrumMachine->new(
port_name => 'through',
bpm => $bpm,
chan => $chan,
parts => {
Part_A => sub {
return 'Part_A', $groove{groove};
},
},
next_part => 'Part_A',
filling => 0,
verbose => 1,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment