NAME

Music::Chord::Progression - Create network transition chord progressions

VERSION

version 0.0004

SYNOPSIS

use Music::Chord::Progression;

my $prog = Music::Chord::Progression->new;

my $notes = $prog->generate;

my $chord = $prog->substitution('m'); # m7

DESCRIPTION

Music::Chord::Progression creates network transition chord progressions.

ATTRIBUTES

max

The maximum number of chords to generate.

Default: 8

net

The network transitions between chords of the progression.

Default:

{ 1 => [qw( 1 2 3 4 5 6 )],
  2 => [qw( 3 4 5 )],
  3 => [qw( 1 2 4 6 )],
  4 => [qw( 1 3 5 6 )],
  5 => [qw( 1 4 6 )],
  6 => [qw( 1 2 4 5 )] }

Alternative example:

{ 1 => [qw( 1 2 3 4 5 6 )],
  2 => [qw( 3 5 )],
  3 => [qw( 2 4 6 )],
  4 => [qw( 1 2 3 5 )],
  5 => [qw( 1 )],
  6 => [qw( 2 4 )] }

chords

The chord name parts of each scale position.

The number of items in this list must be equal and correspond to the number of keys in the net.

Default: [ '', 'm', 'm', '', '', 'm' ]

Alternative example:

[ 'M7', 'm7', 'm7', 'M7', '7', 'm7' ]

scale_name

The name of the scale.

Default: major

scale_note

The name of the scale starting note.

Default: C

octave

The octave number of the scale.

Default: 4

tonic

Whether to start the progression with the tonic chord or not.

Default: 1

resolve

Whether to end the progression with the tonic chord or not.

Default: 1

substitute

Whether to perform jazz chord substitution.

Default: 0

flat

Whether to use flats instead of sharps in the chords or not.

Default: 0

graph

The network transition graph.

Default: Graph::Directed

verbose

Show the progress of the generate method.

METHODS

new

$prog = Music::Chord::Progression->new;
$prog = Music::Chord::Progression->new(
  net        => { 1 => [...], ... },
  chords     => ['m','','m','m','',''],
  scale_name => 'minor',
  scale_note => 'A',
  octave     => 5,
);

Create a new Music::Chord::Progression object.

generate

Generate a new chord progression.

substitution

Perform a jazz substitution on the given chord.

Rules:

* Any chord can be changed to a dominant

* Any dominant chord can be changed to a 9, 11, or 13

* Any chord can be changed to a chord a tritone away (not implemented)

SEE ALSO

Data::Dumper::Compact

Graph::Directed

Moo

Music::Chord::Note

Music::Scales

AUTHOR

Gene Boggs <gene@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2020 by Gene Boggs.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.