Music::Chord::Progression::NRO - Generate Neo-Riemann chord progressions
version 0.0308
use MIDI::Util qw(setup_score midi_format); use Music::Chord::Progression::NRO (); my $nro = Music::Chord::Progression::NRO->new; my $chords = $nro->generate; $chords = $nro->circular; # render a midi file my $score = setup_score(); $score->n('wn', midi_format(@$_)) for @$chords; $score->write_score('nro.mid');
The Music::Chord::Progression::NRO module generates Neo-Riemann chord progressions.
Music::Chord::Progression::NRO
$base_note = $nro->base_note;
The initial isobase, capitalized note on which the progression starts.
isobase
Default: C
C
$base_octave = $nro->base_octave;
The initial note octave on which the progression starts.
Default: 4
4
$base_scale = $nro->base_scale;
The major or minor quality of the initial chord.
Default: major
major
$base_chord = $nro->base_chord;
The chord given by the base_note, base_octave, and the base_scale.
$format = $nro->format;
The format of the returned results, as either named ISO notes or midinum integers.
ISO
midinum
Default: ISO
$max = $nro->max;
The maximum number of circular transformations to make.
$transform = $nro->transform;
The array-reference of Neo-Riemann transformations that define the chord progression.
Please see the Music::NeoRiemannianTonnetz module for the allowed transformations.
This can also be given as an integer, which defines the number of random transformations to perform.
Additionally the "non-transformation", X is allowed to return the the initial chord.
X
$verbose = $nro->verbose;
Show progress.
Default: 0
0
$nrt = $nro->nrt;
The Music::NeoRiemannianTonnetz object.
$nro = Music::Chord::Progression::NRO->new; # use defaults $nro = Music::Chord::Progression::NRO->new( # override defaults base_note => 'Bb', base_octave => 5, base_scale => 'minor', format => 'midinum', max => 12, transform => [qw(X PRL R L R L R)], );
Create a new Music::Chord::Progression::NRO object.
$chords = $nro->generate;
Generate a *linear* series of transformed chords.
$chords = $nro->circular;
Generate a series of transformed chords based on a circular list of transformations.
The eg/nro-chain program puts it this way:
"Use a circular list ("necklace") of Neo-Riemannian transformations, plus "X" meaning "make no transformation." Starting at position zero, move forward or backward along the necklace, transforming the current chord..."
The t/01-methods.t and eg/* files
Carp
Data::Dumper::Compact
Moo
Music::NeoRiemannianTonnetz
Music::Chord::Note
Music::Chord::Namer
https://viva.pressbooks.pub/openmusictheory/chapter/neo-riemannian-triadic-progressions/
Gene Boggs <gene@cpan.org>
This software is Copyright (c) 2023 by Gene Boggs.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
To install Music::Chord::Progression::NRO, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Music::Chord::Progression::NRO
CPAN shell
perl -MCPAN -e shell install Music::Chord::Progression::NRO
For more information on module installation, please visit the detailed CPAN module installation guide.