NAME
Music::PitchNum::ASPN - note name and pitch number roles for ASPN notation
SYNOPSIS
package MyCleverMod;
use Moo;
with('Music::PitchNum::ASPN');
...
Then elsewhere:
use MyCleverMod;
my $x = MyCleverMod->new;
$x->pitchname(69); # A
$x->pitchname(70); # A#
$x->pitchnum('A'); # 69
$x->pitchnum('A#'); # 70
DESCRIPTION
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.
METHODS
- pitchname pitchnumber
-
Returns the pitch name for the given integer, though will throw an exception if passed something that is not a number.
- pitchnum pitchname
-
Returns the pitch number for the given ASPN note name, or
undef
if the note could not be parsed. Only the note namesA-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.
BUGS
Reporting Bugs
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.
Patches might best be applied towards:
https://github.com/thrig/Music-PitchNum
Known Issues
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.
SEE ALSO
REFERENCES
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.
AUTHOR
thrig - Jeremy Mates (cpan:JMATES) <jmates at cpan.org>
COPYRIGHT AND LICENSE
Copyright (C) 2014,2015 by Jeremy Mates
This module is free software; you can redistribute it and/or modify it under the Artistic License (2.0).