Gene Boggs

# NAME

Music::Interval::Barycentric - Compute barycentric musical interval space

version 0.0400

# SYNOPSIS

`````` use Music::Interval::Barycentric;

my @chords = ([3,4,5], [0,4,7]); # Given in "pitch-class notation"

my \$dist = distance(@chords);
\$dist = orbit_distance(@chords);
\$dist = forte_distance(@chords);
my \$even = evenness_index(\$chords[0]);

my @cycles = cyclic_permutation(\$chords[0]);
# [3,4,5], [5,3,4], [4,5,3]

my @center = barycenter(scalar @{ \$chords[0] });
# [4,4,4]``````

# DESCRIPTION

Barycentric chord analysis

"An intervallic representation of the chord leads naturally to a discrete barycentric condition. This condition itself leads to a convenient geometric representation of the chordal space as a simplicial grid.

Chords appear as points in this grid and musical inversions of the chord would generate beautiful polyhedra inscribed in concentric spheres centered at the barycenter. The radii of these spheres would effectively quantify the evenness and thus the consonance of the chord."

# FUNCTIONS

## barycenter

`````` @point = barycenter;
@point = barycenter(\$chord_size);
@point = barycenter(\$chord_size, \$scale_notes);``````

Return the barycenter (the "central coordinate") given an optional integer representing the number of notes in a chord, and an optional number of notes in the scale.

Defaults:

``````  chord_size: 3
scale_notes: 12``````

## distance

`` \$d = distance(\$chord1, \$chord2);``

Common Euclidean space distance metric between chords (vectors).

This function takes two array references representing chords.

## orbit_distance

``  \$d = orbit_distance(\$chord1, \$chord2);``

Return the distance from `chord1` to the minimum of the cyclic permutations for `chord2`.

This function takes two array references representing chords.

## forte_distance

``  \$d = forte_distance(\$chord1, \$chord2);``

Return the distance from `chord1` to the minimum of the cyclic permutations and reverse cyclic permutations for `chord2`.

This function takes two array references representing chords.

## cyclic_permutation

`` @cycles = cyclic_permutation(@intervals);``

Return the list of cyclic permutations of the given intervals.

This function takes a list of array references representing chords.

## evenness_index

``  \$e = evenness_index(\$chord);``

Return a chord distance from the barycenter.

This function takes an array reference representing a chord.

## inversion

``  my \$inverted = inversion(\$chord);``

"The inversion of a chord is formed by displaying the "retrograde" representation of the original chord."

This function takes an array reference representing a chord.

The t/01-functions.t and eg/* programs in this distribution.

http://www.amazon.com/Geometry-Musical-Chords-Interval-Representation/dp/145022797X "A New Geometry of Musical Chords in Interval Representation: Dissonance, Enrichment, Degeneracy and Complementation"

# AUTHOR

Gene Boggs <gene@cpan.org>