Johan Vromans > App-Music-PlayTab-2.025 > App::Music::PlayTab::NoteMap

Download:
App-Music-PlayTab-2.025.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 1.005   Source  

NAME ^

App::Music::PlayTab::NoteMap - Common data and routines.

SYNOPSIS ^

  use App::Music::PlayTab::NoteMap;
  print $App::Music::PlayTab::NoteMap::SNotes[2];   # prints 'D'

DESCRIPTION ^

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.

syntax highlighting: