Tempo - various conversions to and from BPM
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
Includes two main functions, converting BPM (Beats Per Minute) to and from ms (milliseconds) and Italian metonome markings.
Takes a BPM marking, and returns an appropriate Italian metronome marking (Lento, Allegro etc. - see below for full list).
Takes an Italian metronome marking (Lento, Allegro, Presto etc.) and returns an *average* BPM.
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).
The reverse of bpm_to_ms.
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.).
Ben Daglish (firstname.lastname@example.org)
All feedback most welcome.
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.
To install Music::Tempo, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.