package MIDI::Drummer::Tiny::Tutorial::Quickstart;

__END__

=pod

=encoding UTF-8

=head1 NAME

MIDI::Drummer::Tiny::Tutorial::Quickstart

=head1 VERSION

version 0.7019

=head1 Import the Module

  use MIDI::Drummer::Tiny ();

=head1 Object Instantiation

=head2 Use the defaults

  my $d = MIDI::Drummer::Tiny->new;

=head2 Attribute configuration

  my $d = MIDI::Drummer::Tiny->new(
      file       => 'drums.mid',
      bpm        => 120,
      volume     => 120,
      signature  => '5/4', # OR:
      #beats     => 5,
      #divisions => 4,  # the default
      bars       => 8,
      reverb     => 0,  # very dry!
      kick       => 36, # Override default patch
      snare      => 40, # "
      verbose    => 1,
  );

=head1 Drum Set Components

=head2 Kick and snare-like things

Bass drums ("kicks"):

  acoustic_bass & electric_bass (Generic: kick)

Snare-like things:

  acoustic_snare & electric_snare (Generic: snare),
  side_stick, clap

=head2 Cymbals

  open_hh, closed_hh, pedal_hh
  crash1, crash2, splash, china
  ride1, ride2, ride_bell

=head2 Toms

  hi_tom, hi_mid_tom, low_mid_tom,
  low_tom, hi_floor_tom, low_floor_tom

=head2 Miscellaneous

  click & bell (i.e. the metronome sounds),
  tambourine, cowbell, vibraslap, etc.

=head1 Handy Duration Aliases

  whole, triplet_whole, dotted_whole, double_dotted_whole
  half, triplet_half, dotted_half, double_dotted_half
  quarter, triplet_quarter, dotted_quarter, double_dotted_quarter
  eighth, triplet_eighth, dotted_eighth, double_dotted_eighth, ...

etc. down to double-dotted 128th notes!

=head1 Basic Beats

=head2 Rock

  $d->metronome3;
  $d->metronome4;
  $d->metronome5;
  $d->metronome6;
  $d->metronome7;
  # OR
  $d->metronome44($d->bars, 1); # 1 flag for alternating 1/8th-note kicks

=head2 Swing

  $d->metronome4($d->bars, $d->ride2, $d->eighth, 67);

=head2 Viennese Waltz

  for my $n (1 .. $d->bars) {
      $d->note($d->quarter, $d->ride1, $d->kick);
      $d->note($d->quarter, $d->ride1, $d->snare);
      $d->note($d->quarter, $d->ride1, $d->snare);
  }

=head2 Disco

  for my $n (0 .. $d->bars - 1 ) {
      $d->note($d->sixteenth, $d->closed_hh, $d->kick);
      $d->note($d->sixteenth, $d->closed_hh);
      $d->note($d->sixteenth, $d->closed_hh);
      $d->note($d->sixteenth, $d->open_hh);
      $d->note($d->sixteenth, $d->pedal_hh, $d->kick, $d->snare);
      $d->note($d->sixteenth, $d->closed_hh);
      $d->note($d->sixteenth, $d->closed_hh);
      $d->note($d->sixteenth, $d->closed_hh);
  }

This beat is extra-cheesy.

=head1 And Finally...

Write-out the score to a MIDI file:

  my $d = MIDI::Drummer::Tiny->new(
    # ...,
    file => 'drums.mid',
  );
  # ...
  $d->write;

Then play the score with timidity (where the C<cfg> file specifies
the soundfont to be used):

  > timidity -c ~/timidity.cfg -Od drums.mid

You can also use the excellent fludisynth or
L<VLC|https://www.videolan.org/vlc/|> programs.

  > fluidsynth -i ~/Music/soundfont/FluidR3_GM.sf2 drums.mid

=head1 AUTHOR

Gene Boggs <gene.boggs@gmail.com>

=head1 COPYRIGHT AND LICENSE

This software is copyright (c) 2014-2026 by Gene Boggs.

This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.

=cut
