Gene Boggs > Music-Duration-0.03 > Music::Duration

Download:
Music-Duration-0.03.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.03   Source  

NAME ^

Music::Duration - Add useful note lengths to MIDI-Perl

VERSION ^

version 0.03

SYNOPSIS ^

  # Compare:
  > perl -MMIDI::Simple -MData::Dumper -e'print Dumper \%MIDI::Simple::Length'
  > perl -MMusic::Duration -MData::Dumper -e'print Dumper \%MIDI::Simple::Length'

  # In a program:
  use MIDI::Simple;
  use Music::Duration;
  Music::Duration::fractional('z', 5);
  new_score();
  patch_change(1, 33);          # Jazz kit
  n('zsn', 'n38') for 1 .. 5;   # Snare sixteenth quintuplet
  n('qn', 'n38');

DESCRIPTION ^

This module adds thirtysecond and sixtyfourth note divisions to MIDI::Simple. These are 32nd: y, dy, ddy, ty and 64th: x, dx, ddx, tx.

NAME ^

Music::Duration - Add useful note lengths to MIDI-Perl

FUNCTIONS ^

fractional()

  $z = Music::Duration::fractional('z', 5)

Add a fractional duration-division for each note, to the MIDI::Simple Length hash.

In the example above, we add z-notes, or 5th quarter note divisions

TO DO ^

Decouple from MIDI and provide a subroutine of lengths.

Allow addition of any literal or coderef entry to the Length hash.

Only require MIDI::Simple and set the Length hash if present.

SEE ALSO ^

MIDI and MIDI::Simple

The code in the t/ directory

AUTHOR ^

Gene Boggs <gene@cpan.org>

COPYRIGHT AND LICENSE ^

This software is copyright (c) 2013 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.

syntax highlighting: