Music::Tension - music tension analysis
my $t = Music::Tension (); $t->pitch2freq(60); $t->freq2pitch(440); my $ct = Music::Tension::Cope (); $ct->... # see that module for details my $plt = Music::Tension::PlompLevelt (); $plt->... # see that module for details
Music tension (dissonance) analysis. This module merely provides pitch and frequency conversion routines. The other modules under this distribution provide various algorithms that produce a number for how consonant or dissonant a chord or other musical events are, presumably for use in musical analysis or composition.
The numbers produced by one module can only be used in comparison with other musical events calculated by the same module; no attempt has been made to correlate the output of any overlapping methods between the different modules. (Though comparisons may be interesting.)
If you have ideas for a new tension analysis module, please let me know, so it can be included in this distribution, or locate it outside of the
Any method may croak if something is awry with the input. These methods are inherited by the sub-modules.
Constructor. Accepts an optional parameter to change the reference frequency use by the frequency/pitch conversion calls (440 by default).
my $t = Music::Tension->new(reference_frequency => 442);
Given a frequency (Hz), returns the integer pitch number (which might also be a MIDI number, unless that range is exceeded somehow). Fractional pitch results are rounded to the nearest pitch number. (I'm not sure if the standard practice is to round or truncate the conversion, so I guessed to round.)
Given a pitch number (a positive integer, perhaps from the MIDI numbers range), returns the frequency (Hz).
thrig - Jeremy Mates (cpan:JMATES)
<jmates at cpan.org>
Copyright (C) 2012,2017,2018 by Jeremy Mates