Skip to content
incon - An R package for modelling the simultaneous consonance of musical chords
R TeX
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
R
inst
man
tests
.Rbuildignore
.gitignore
.travis.yml
DESCRIPTION
LICENSE
LICENSE.md
NAMESPACE
NEWS.md
README.Rmd
README.md
appveyor.yml
incon.Rproj

README.md

incon - Computational Models of Simultaneous Consonance

lifecycle Travis build status AppVeyor build status DOI

incon is an R package that implements various computational models of simultaneous consonance perception.

Citation

Harrison, P. M. C., & Pearce, M. T. (2019). Instantaneous consonance in the perception and composition of Western music. PsyArXiv. https://doi.org/10.31234/osf.io/6jsug

Installation

You can install the current version of incon from Github by entering the following commands into R:

if (!require(devtools)) install.packages("devtools")
devtools::install_github("pmcharrison/incon")

Usage

The primary function is incon, which applies consonance models to an input chord. The default model is that of Hutchinson & Knopoff (1978):

library(incon)

chord <- c(60, 64, 67) # major triad, MIDI note numbers
incon(chord)
#> hutch_78_roughness 
#>          0.1202426

You can specify a vector of models and these will applied in turn.

chord <- c(60, 63, 67) # minor triad
models <- c("hutch_78_roughness", 
            "parn_94_pure",
            "huron_94_dyadic")
incon(c(60, 63, 67), models)
#> hutch_78_roughness       parn_94_pure    huron_94_dyadic 
#>          0.1300830          0.6368813          2.2200000

See Models for a list of available models. See the package’s inbuilt documentation, ?incon, for further details.

Models

Currently the following models are implemented:

Label Citation Class Package
gill_09_harmonicity Gill & Purves (2009) Periodicity/harmonicity bowl18
har_18_harmonicity Harrison & Pearce (2018) Periodicity/harmonicity har18
milne_13_harmonicity Milne (2013) Periodicity/harmonicity har18
parn_88_root_ambig Parncutt (1988) Periodicity/harmonicity parn88
parn_94_complex Parncutt & Strasburger (1994) Periodicity/harmonicity parn94
stolz_15_periodicity Stolzenburg (2015) Periodicity/harmonicity stolz15
bowl_18_min_freq_dist Bowling et al. (2018) Interference bowl18
huron_94_dyadic Huron (1994) Interference incon
hutch_78_roughness Hutchinson & Knopoff (1978) Interference dycon
parn_94_pure Parncutt & Strasburger (1994) Interference parn94
seth_93_roughness Sethares (1993) Interference dycon
vass_01_roughness Vassilakis (2001) Interference dycon
wang_13_roughness Wang et al. (2013) Interference wang13
jl_12_tonal Johnson-Laird et al. (2012) Culture jl12
har_19_corpus Harrison & Pearce (2019) Culture corpdiss
parn_94_mult Parncutt & Strasburger (1994) Numerosity parn94
har_19_composite Harrison & Pearce (in prep.) Composite incon

See ?incon for more details.

Packages

The functionality of incon is split between several low-level R packages, listed below.

Package DOI GitHub
bowl18 10.5281/zenodo.2545741 https://github.com/pmcharrison/bowl18
corpdiss 10.5281/zenodo.2545748 https://github.com/pmcharrison/corpdiss
dycon 10.5281/zenodo.2545750 https://github.com/pmcharrison/dycon
har18 10.5281/zenodo.2545752 https://github.com/pmcharrison/har18
hcorp 10.5281/zenodo.2545754 https://github.com/pmcharrison/hcorp
hrep 10.5281/zenodo.2545770 https://github.com/pmcharrison/hrep
jl12 10.5281/zenodo.2545756 https://github.com/pmcharrison/jl12
parn88 10.5281/zenodo.1491909 https://github.com/pmcharrison/parn88
parn94 10.5281/zenodo.2545759 https://github.com/pmcharrison/parn94
stolz15 10.5281/zenodo.2545762 https://github.com/pmcharrison/stolz15
wang13 10.5281/zenodo.2545764 https://github.com/pmcharrison/wang13

References

Bowling, D. L., Purves, D., & Gill, K. Z. (2018). Vocal similarity predicts the relative attraction of musical chords. Proceedings of the National Academy of Sciences, 115(1), 216–221. https://doi.org/10.1073/pnas.1713206115

Gill, K. Z., & Purves, D. (2009). A biological rationale for musical scales. PLoS ONE, 4(12). https://doi.org/10.1371/journal.pone.0008144

Harrison, P. M. C., & Pearce, M. T. (2018). An energy-based generative sequence model for testing sensory theories of Western harmony. In Proceedings of the 19th International Society for Music Information Retrieval Conference (pp. 160–167). Paris, France.

Harrison, P. M. C., & Pearce, M. T. (2019). Instantaneous consonance in the perception and composition of Western music. PsyArxiv. https://doi.org/10.31234/osf.io/6jsug

Huron, D. (1994). Interval-class content in equally tempered pitch-class sets: Common scales exhibit optimum tonal consonance. Music Perception, 11(3), 289–305. https://doi.org/10.2307/40285624

Hutchinson, W., & Knopoff, L. (1978). The acoustic component of Western consonance. Journal of New Music Research, 7(1), 1–29. https://doi.org/10.1080/09298217808570246

Johnson-Laird, P. N., Kang, O. E., & Leong, Y. C. (2012). On musical dissonance. Music Perception, 30(1), 19–35.

Milne, A. J. (2013). A computational model of the cognition of tonality. The Open University, Milton Keynes, England.

Parncutt, R. (1988). Revision of Terhardt’s psychoacoustical model of the root(s) of a musical chord. Music Perception, 6(1), 65–93.

Parncutt, R., & Strasburger, H. (1994). Applying psychoacoustics in composition: “Harmonic” progressions of “nonharmonic” sonorities. Perspectives of New Music, 32(2), 88–129.

Sethares, W. A. (1993). Local consonance and the relationship between timbre and scale. The Journal of the Acoustical Society of America, 94(3), 1218–1228.

Stolzenburg, F. (2015). Harmony perception by periodicity detection. Journal of Mathematics and Music, 9(3), 215–238. https://doi.org/10.1080/17459737.2015.1033024

Vassilakis, P. N. (2001). Perceptual and physical properties of amplitude fluctuation and their musical significance. University of California, Los Angeles, CA.

Wang, Y. S., Shen, G. Q., Guo, H., Tang, X. L., & Hamade, T. (2013). Roughness modelling based on human auditory perception for sound quality evaluation of vehicle interior noise. Journal of Sound and Vibration, 332(16), 3893–3904. https://doi.org/10.1016/j.jsv.2013.02.030

You can’t perform that action at this time.