#!/usr/bin/env perl
use strict;
use warnings;

use MIDI::Drummer::Tiny;

my $d = MIDI::Drummer::Tiny->new(
    file   => "$0.mid",
    bpm    => 120,
    volume => 100,
);

my $accent = 30;

for my $n (1 .. $d->bars) {
    $d->note($d->eighth, $d->closed_hh, $d->kick);
    $d->note($d->eighth, $d->closed_hh);

    $d->note($d->eighth, $d->closed_hh, $d->snare);
    $d->note($d->sixteenth, $d->closed_hh);
    $d->accent_note($accent, $d->sixteenth, $d->snare);

    $d->note($d->sixteenth, $d->closed_hh);
    $d->accent_note($accent, $d->sixteenth, $d->snare);
    $d->note($d->eighth, $d->open_hh, $d->kick);

    $d->note($d->eighth, $d->closed_hh);
    $d->note($d->eighth, $d->closed_hh, $d->snare);

    #

    $d->note($d->sixteenth, $d->closed_hh);
    $d->accent_note($accent, $d->sixteenth, $d->snare);
    $d->note($d->eighth, $d->closed_hh, $d->kick);

    $d->note($d->eighth, $d->closed_hh, $d->snare);
    $d->note($d->sixteenth, $d->closed_hh);
    $d->accent_note($accent, $d->sixteenth, $d->snare);

    $d->note($d->sixteenth, $d->closed_hh);
    $d->accent_note($accent, $d->sixteenth, $d->snare);
    $d->note($d->eighth, $d->closed_hh, $d->kick);

    $d->note($d->eighth, $d->closed_hh, $d->snare);
    $d->note($d->eighth, $d->closed_hh);
}

$d->write;
