Skip to content
incon - An R package for modelling the simultaneous consonance of musical chords
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

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.


Harrison, P. M. C., & Pearce, M. T. (2019). Instantaneous consonance in the perception and composition of Western music. PsyArXiv.


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

if (!require(devtools)) install.packages("devtools")


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


chord <- c(60, 64, 67) # major triad, MIDI note numbers
#> 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", 
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.


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.


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

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


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.

Gill, K. Z., & Purves, D. (2009). A biological rationale for musical scales. PLoS ONE, 4(12).

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.

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

Hutchinson, W., & Knopoff, L. (1978). The acoustic component of Western consonance. Journal of New Music Research, 7(1), 1–29.

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.

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.

You can’t perform that action at this time.