Music::PitchNum::ASPN - note name and pitch number roles for ASPN notation
my $x = MyCleverMod->new;
$x->pitchname(69); # A4
$x->pitchname(70); # A#4
$x->pitchnum('A'); # 69
$x->pitchnum('A#'); # 70
$x->pitchname(69, ignore_octave => 1); # A
A Music::PitchNum implementation specifically for the American Standard Pitch Notation (ASPN), also known as the scientific notation.
This module is expected to be used as a Role from some other module; Moo::Role may be informative.
Returns the pitch name for the given integer, though will throw an exception if passed something that is not a number.
This method accepts an optional ignore_octave parameter that if true will strip the octave information from the pitch name.
Returns the pitch number for the given ASPN note name, or undef if the note could not be parsed. Only the note names A-G (and not the lower case forms), optional # for sharp, and the octave number are parsed by this module; other forms will (or should) not match.
Please report any bugs or feature requests to bug-music-pitchnum at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Music-PitchNum.
bug-music-pitchnum at rt.cpan.org
Patches might best be applied towards:
None known for the ASPN notation support, though this is a very limited format with only one accidental style (a single # for sharp) and a mandatory octave number.
Young, R. W. (1939). "Terminology for Logarithmic Frequency Units". The Journal of the Acoustical Society of America 11 (1): 134-000. Bibcode:1939ASAJ...11..134Y. doi:10.1121/1.1916017.
thrig - Jeremy Mates (cpan:JMATES) <jmates at cpan.org>
<jmates at cpan.org>
Copyright (C) 2014-2016 by Jeremy Mates
This module is free software; you can redistribute it and/or modify it under the Artistic License (2.0).
To install Music::PitchNum, 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.