knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
Harmonicity is an important predictor of a chord's consonance. This package provides methods for estimating a chord's harmonicity, after Harrison & Pearce (2018) and Milne (2013).
You can install this package from GitHub:
if (!require(devtools)) install.packages("devtools") devtools::install_github("pmcharrison/har18")
A major chord is more harmonic than a diminished chord, as expected:
library(har18) pc_harmonicity("0 4 7") pc_harmonicity("0 3 6")
By default, the package implements the method of Harrison & Pearce (2018).
Setting the option method = "peak"
reproduces the method of Milne (2013).
pc_harmonicity("0 4 7", method = "peak") pc_harmonicity("0 3 6", method = "peak")
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. Paris, France. Retrieved from https://arxiv.org/abs/1807.00790
Milne, A. J. (2013). A computational model of the cognition of tonality. The Open University, Milton Keynes, England.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.