Johan Vromans > Music-ChordBot > Music::ChordBot::Opus

Download:
Music-ChordBot-0.91.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.01   Source  

NAME ^

Music::ChordBot::Opus - API for generating ChordBot songs.

SYNOPSIS ^

    use Music::ChordBot::Opus;
    my $song = Music::ChordBot::Opus->new;
    $song->name("Perl Song");
    $song->tempo(120);
    $song->add_section(...);
    print $song->json, "\n";

METHODS ^

new [ args ]

Creates a new Music::ChordBot::Opus object.

Initial attributes may be passed as a hash.

Attributes:

name

The name of the song.

editMode

Zero if the song has a single style, one if some sections have their own styles.

tempo

The tempo in beats per minute.

fileType

This must be the literal string 'chordbot-song'.

name [ value ]

Sets or gets the name of the song.

tempo [ value ]

Sets or gets the tempo of the song.

editmode [ value ]

Sets or gets attribute editMode. This is not normally necessary since it is dealt with automatically.

add_section section

Adds a new section to the song. See Music::ChordBot::Opus::Section for details on sections.

export [ dumpname ]

Produces a string representing the song, in Data::Dumper format.

json [ pretty ]

Produces a string representing the song, in JSON format, suitable for import into the ChordBot app.

If argument is true, the JSON is pretty-printed for readability. ChordBot doesn't mind.

SEE ALSO ^

Music::ChordBot for general information.

Music::ChordBot::Song for an easy to use API.

DISCLAIMER ^

There is currently NO VALIDATION of argument values. Illegal values will result in program crashes and songs that cannot be imported, or played, by ChordBot.

AUTHOR, COPYRIGHT & LICENSE ^

See Music::ChordBot.

syntax highlighting: