Music::Intervals::Numeric - Breakdown of numeric musical intervals
version 0.0705
use Music::Intervals::Numeric; my $m = Music::Intervals::Numeric->new( notes => [qw( 1/1 5/4 3/2 15/8 )], size => 3, freq => 1, interval => 1, cent => 1, prime => 1, ); print Dumper( $m->frequencies, $m->intervals, $m->cent_vals, $m->prime_factor, );
A Music::Intervals object shows the mathematical break-down of musical intervals and chords.
Music::Intervals
This module reveals the "guts" of chords within a given tonality. By guts I mean, the measurements of the notes and the intervals between them, in just intonation.
Show divisions of the octave
Default: 0
Show frequencies
Show note intervals
Show prime factorization
Chord size
Default: 3
Number of notes in the scale
Default: 12
Physical distance between notes
Default: semitones * 100 / log(2)
The actual notes to use in the computation
Default: [ 1/1 5/4 3/2 ] (C E G)
The list of notes may be any of the keys in the Music::Intervals::Ratio ratio hashref. This is very very long and contains useful intervals such as those of the common scale and even the Pythagorean intervals, too.
ratio
Computed hashref
$x = Music::Intervals->new(%arguments);
Create a new Music::Intervals object.
Return pairs of the given combinations with fractional and pitch ratio parts.
Return the dyadic fraction as a prime factored expression.
For the time being, you will need to look at the source of Music::Intervals::Ratio for the note and interval names.
Music::Intervals::Ratio
https://github.com/ology/Music/blob/master/intervals
http://en.wikipedia.org/wiki/List_of_musical_intervals
http://en.wikipedia.org/wiki/Equal_temperament
http://en.wikipedia.org/wiki/Just_intonation
Gene Boggs <gene@cpan.org>
This software is copyright (c) 2022 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.
To install Music::Intervals, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Music::Intervals
CPAN shell
perl -MCPAN -e shell install Music::Intervals
For more information on module installation, please visit the detailed CPAN module installation guide.