-
-
03 Apr 2020 15:38:28 UTC
- Distribution: Music-Interval-Barycentric
- Module version: 0.0400
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues
- Testers (123 / 0 / 0)
- Kwalitee
Bus factor: 1- 97.33% Coverage
- License: perl_5
- Perl: v5.6.0
- Activity
24 month- Tools
- Download (12.95KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
NAME
Music::Interval::Barycentric - Compute barycentric musical interval space
VERSION
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
From the book (linked below):
"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 forchord2
.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 forchord2
.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.
SEE ALSO
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>
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.
Module Install Instructions
To install Music::Interval::Barycentric, copy and paste the appropriate command in to your terminal.
cpanm Music::Interval::Barycentric
perl -MCPAN -e shell install Music::Interval::Barycentric
For more information on module installation, please visit the detailed CPAN module installation guide.