Tempo - various conversions to and from BPM
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
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.).
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
Ben Daglish (email@example.com)
None known 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.