- SEE ALSO
- AUTHOR, COPYRIGHT & LICENSE
Music::ChordBot::Opus - API for generating ChordBot songs.
use Music::ChordBot::Opus; my $song = Music::ChordBot::Opus->new; $song->name("Perl Song"); $song->tempo(120); $song->add_section(...); print $song->json, "\n";
Creates a new Music::ChordBot::Opus object.
Initial attributes may be passed as a hash.
The name of the song.
Zero if the song has a single style, one if some sections have their own styles.
The tempo in beats per minute.
This must be the literal string 'chordbot-song'.
Sets or gets the name of the song.
Sets or gets the tempo of the song.
Sets or gets attribute editMode. This is not normally necessary since it is dealt with automatically.
Adds a new section to the song. See Music::ChordBot::Opus::Section for details on sections.
Produces a string representing the song, in Data::Dumper format.
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.
Music::ChordBot for general information.
Music::ChordBot::Song for an easy to use API.
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.