Help-Site Computer Manuals
Software
Hardware
Programming
Networking
  Algorithms & Data Structures   Programming Languages   Revision Control
  Protocols
  Cameras   Computers   Displays   Keyboards & Mice   Motherboards   Networking   Printers & Scanners   Storage
  Windows   Linux & Unix   Mac

Music::ABC::Archive
Parse ABC music archives

Music::ABC::Archive - Parse ABC music archives


NAME

Music::ABC::Archive - Parse ABC music archives


VERSION

0.01


SYNOPSIS


 use Music::ABC::Archive ;

 $abcfile = "Some_ABC_file.abc" ;

 $songnum = 6 ;

 $abc_obj = Music::ABC::Archive->new($abcfile) ;

 $abc_obj->openabc($abcfile) || die("failed to open $abcfile") ;

 print "-----------------------------\n" ;

 my @lines = $abc_obj->print_song_summary($songnum) ;

 

 foreach (@lines) {

     print "$_\n" ;

 }

 

 my @files = $abc_archive->list_by_title() ;

 

 foreach (@files) {

     my ($display_name, $sn, $type, $meter, $key, $titles_aref) = @{$_} ;

     my $name = "$display_name - $type - Key of $key" ;

     print "<option value=\"$sn\">$name</option>\n" ;

 }


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 the ABC archive, and individual songs 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 the ABC archive, and individual songs so they may

    more easily be managed by perl front-ends.


CONSTRUCTOR

new([s])
Creates the Music::ABC::Archive object. If s is given, specifies the name of the archive file.


METHODS

openabc([s])
Opens the abc archive file. Optional argument is the name of the archive file. Returns false on failure.

filename([s])
Specify the name of the archive file. Returns the current archive file name

list_by_title()
@song_numbers = list_by_title() ;

Returns list of array references for songs in the archive, sorted by title, which contain (in this order):

display_name - a song title for display to the user

song number - an integer

song type - Reel, Jig, Waltz, etc

key - Key of the song

titles - a reference to an array holding all titles for the song

get_song(n)
Returns all of the ABC text for song number n. There is no trailing ``\n'' ;

@lines = get_song($songnum) ;

print_song_summary(n,[f])
Returns a list of lines, giving a description of the song as found in the headers of the song text for song number n. if the second argument is false, or missing, then no html markup is included, otherwise the lines include basic html markup for displaying the song on a WWW browser. There is no trailing ``\n'' ;

@lines = print_song_summary($song_number) ; @lines = print_song_summary($song_number, $use_html_tags) ;

parse()
Force immediate parsing of the ABC archive file. This will be done automatically on any other calls.


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::ABC::SONG.pm


COPYRIGHT

This program is free software. You may copy or redistribute it under the same terms as Perl itself.

Programminig
Wy
Wy
yW
Wy
Programming
Wy
Wy
Wy
Wy