knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
parn94
is an R package that implements Richard Parncutt's
psychoacoustic harmony algorithms,
as described in Parncutt & Strasburger (1994).
You can install the current version of parn94
from Github
by entering the following commands into R:
if (!require(devtools)) install.packages("devtools") devtools::install_github("pmcharrison/parn94")
This package provides a variety of methods for analysing chords in isolation and in combination.
Most functions can be used with numeric inputs,
which will be interpreted as MIDI note numbers.
Methods are also provided for various chord classes in the
hrep
package, such as pi_chord
, sparse_pi_spectrum
, and so on.
These inputs are internally coerced to sparse_pi_spectrum
before continuing the analysis.
Key functions include:
pure_sonor()
- returns the pure sonorousness of a sonority the amount of pitch content in a sonority,
corresponding to the audibility of its pure tone components
after accounting for auditory masking.complex_sonor()
- returns the complex sonorousness of a sonority,
the extent to which a sonority resembles a harmonic series.multiplicity()
- estimates multiplicity,
how many tones are perceived in a sonority.pitch_commonality()
- estimates the pitch commonality
of a pair of sonorities.pitch_distance()
- estimates the pitch distance
between a pair of sonorities.library(parn94) c_maj <- c(60, 64, 67) # C major triad c_dim <- c(60, 63, 66) # C diminished triad g_maj <- c(59, 62, 67) # G major triad # Pure sonorousness pure_sonor(c_maj) pure_sonor(c_dim) # Complex sonorousness complex_sonor(c_maj) complex_sonor(c_dim) # Multiplicity multiplicity(c_maj) multiplicity(c_dim) # Pitch commonality pitch_commonality(c_maj, g_maj) pitch_commonality(c_maj, c_dim) # Pitch distance pitch_distance(c_maj, g_maj) pitch_distance(c_maj, c_dim)
Parncutt, R., & Strasburger, H. (1994). Applying psychoacoustics in composition: “Harmonic” progressions of “nonharmonic” sonorities. Perspectives of New Music, 32(2), 88–129.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.