NAME
Music::ABC::Song - Handle songs in ABC music archives
VERSION
0.01
SYNOPSIS
$abcfile = "Some_ABC_file.abc" ;
$songnum = 6 ;
$abc_obj = Music::ABC::Song->new(archivename=>$abcfile, number=>$songnum) ;
some other text here...
DESCRIPTION
ABC music archives (http://www.gre.ac.uk/~walshaw/abc/index.html) contain songs in the ABC format. They are a very quick way for entering music in a text format, and there are numerous publishable quality renderers for ABC music. This module encapsulates an individual song from an ABC archive, so they may more easily be managed by perl front-ends.
ABSTRACT
ABC music archives (http://www.gre.ac.uk/~walshaw/abc/index.html) contain songs in the ABC format. They are a very quick way for entering music in a text format, and there are numerous publishable quality renderers for ABC music. This module encapsulates an individual song from an ABC archive, so they may more easily be managed by perl front-ends.
CONSTRUCTOR
- new()
-
optional arguments: archivename=>$, number=>$, filepos=>$, key=>$, meter=>$
archivename is the name of the ABC archive number is the song number in the archive filepos is the file position pointer (as in tell) of the start of the song in the archive key is the musical key of the song type is the song type, i.e. reel, jig, waltz, ... meter is the song meter, i.e. 4/4, 3/8, C, etc.
METHODS
- archivename([s])
-
Specify the name of the archive file, if s is given. Returns the current archive file name.
- displayname([s])
-
Specify a name for display to the user of the song, if s is given. Returns the current displayname.
- filepos([s])
-
Specify the position of the song in the archive (as in ftell), if s is given. Returns the current position.
- number([s])
-
Specify the song number in the archive, if s is given. Returns the current song number.
- key([s])
-
Specify the musical key of the song, if s is given. Returns the current key.
- meter([s])
-
Specify the meter of the song, if s is given. Returns the current meter.
- type([s])
-
Specify the type (jig, waltz, ...) of the song, if s is given. Returns the current type.
- titles([s])
-
Specify titles for the song (via an array reference), if s is given. Returns the array reference of current titles.
- add_title([s])
-
Add a single title for the song, if s is given. Returns the list of current titles.
- notes([s])
-
Specify notes for the song (via an array reference), if s is given. Returns the array reference of current notes.
- add_note([s])
-
Add a single note for the song, if s is given. Returns the list of current notes.
- text([s])
-
Add a single line of text for the song, if s is given. Returns the list of current text lines.
- header(h,[text])
-
Returns the scalar value of the header h, or an array reference if a multiline header. If text is given add a single header with type h for the song.
- get_song_summary(<s>,[<f>])
-
return an array reference with text summarizing the song. Optionally use html markup, if f is given and set to a value Perl condsiders to be TRUE.
AUTHOR
Jeff Welty (jeff@redhawk.org)
BUGS
None known, but you'll be sure to tell me if you find one, won't you?
SEE ALSO
Music::ABS::Archive.pm
COPYRIGHT
This program is free software. You may copy or redistribute it under the same terms as Perl itself.