App::Music::PlayTab::NoteMap - Common data and routines.
use App::Music::PlayTab::NoteMap; print $App::Music::PlayTab::NoteMap::SNotes[2]; # prints 'D'
This is an internal module for the App::Music::PlayTab application.
App::Music::PlayTab::NoteMap contains common data and routines, some of these are exported on demand.
@FNotes contains all the note names, using sharps. E.g., $FNotes[3] is 'D#'. @FNotes can be imported on demand.
@SNotes contains all the note names, using flats. E.g., $FNotes[3] is 'Eb'. @SNotes can be imported on demand.
Subroutine note_to_key returns the ordinal value (key) for a given plain note. It returns undef for an unrecognized argument. note_to_key can be imported on demand.
Subroutine key_to_note returns the note for a given key. The optional second argument can be used to select the use of sharps or flats. If the second argument is not used, the currently selected mode is applied. key_to_note can be imported on demand.
Subroutines set_flat and set_sharp can be used to select whether note names must be produced with flats or sharps.
To install App::Music::PlayTab, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::Music::PlayTab
CPAN shell
perl -MCPAN -e shell install App::Music::PlayTab
For more information on module installation, please visit the detailed CPAN module installation guide.