The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Music::ChordBot::Opus::Section - ChordBot song section.

SYNOPSIS

    use Music::ChordBot::Opus::Section;
    my $sect = Music::ChordBot::Opus::Section->new;
    $sect->name("First movement");
    $sect->set_style("Kubiac");
    $sect->add_chord(...);
    $sect->add_chord(...);

METHODS

new [ args ]

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

Initial attributes may be passed as a hash.

Attributes:

name

The name of the section.

chords

An arrayref containing Music::ChordBot::Opus::Section::Chord objects, more commonly known as 'chords',

style

A hashref representing the attributes of a style. See Music::ChordBot::Opus::Section::Style.

name [ value ]

Sets or gets the name of the section.

add_chord chord

Adds a chord to the section.

chord must be a Music::ChordBot::Opus::Section::Chord object, or a string denoting a chord, e.g. "C Maj 4". For convenience, the three elements may also be passed separately, e.g., add_chord("C", "Maj", 4).

A bass note can be specified by adding the note to the key, separated by a slash, e.g., "C/B".

no_style

A newly created Music::ChordBot::Opus::Section object has a default style associated. Calling this method removes the style from the section.

set_style [ style ]

Sets the style for the section.

style must be a Music::ChordBot::Opus::Section::Style object, or the name of a predefined (preset) style.

If style is omitted, the current style is removed from the section.

AUTHOR, COPYRIGHT & LICENSE

See Music::ChordBot.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 76:

You forgot a '=back' before '=head2'