The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

 Tempo - various conversions to and from BPM

SYNOPSIS

    use Music::Tempo;

    my $marking = bpm_to_italian(50);          # 'Largo'
    my $bpm = italian_to_bpm('Allegro');       # 120
    my $ms = bpm_to_ms(100);                       # 600
    my $bpm = ms_to_bpm(200,8);                            # 120

DESCRIPTION

 Includes two main functions, converting BPM (Beats Per Minute) to and from ms (milliseconds) and Italian metonome markings.

METHODS

bpm_to_italian($bpm)

Takes a BPM marking, and returns an appropriate Italian metronome marking (Lento, Allegro etc. - see below for full list).

italian_to_bpm($marking)

Takes an Italian metronome marking (Lento, Allegro, Presto etc.) and returns an *average* BPM.

bpm_to_ms($bpm,$beat)

Converts from BPM to ms. The 'beat' parameter (which defaults to 4) acts as an extra divisor. For instance, 120 BPM would normally mean 1 crotchet (or 1/4 note) =500ms. Passing a beat of '16' would return 125ms, referring to semiquavers (or 1/16 notes).

ms_to_bpm($ms,$beat)

The reverse of bpm_to_ms.

TEMPI

The italian tempi are of course approximations. The ranges below have been greatly reduced, and are presented only as a 'last resort' for automatic machine translation etc. They're roughly based on an average between Maetzel and Quantz, tweaked for 'standard modern' usage (Allegro=120 etc.).

 Largo       40-59
 Larghetto   60-66
 Adagio      67-72
 Lento       73-78
 Andante     79-88
 Moderato    89-109
 Allegro     110-129
 Vivace      130-149
 Presto      150-190
 Prestissimo 190-220

TODO

AUTHOR

 Ben Daglish (bdaglish@surfnet-ds.co.uk)

BUGS

 None known
 All feedback most welcome.

COPYRIGHT

 Copyright (c) 2003, Ben Daglish. All Rights Reserved.
 This program is free software; you can redistribute
 it and/or modify it under the same terms as Perl itself.

 The full text of the license can be found in the
 LICENSE file included with this module.

SEE ALSO

 perl(1).