knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

jl12: Johnson-Laird's (2012) Tonal Dissonance Model

lifecycle Travis build status AppVeyor build status Coverage status DOI

The jl12 R package implements Johnson-Laird's (2012) tonal dissonance model.

Installation

Within R, you can install the current version of jl12 from Github as follows:

if (!require(devtools)) install.packages("devtools")
devtools::install_github("jl12")

Usage

Higher scores correspond to greater dissonance. These scores correspond to each of the distinguishable categories in the cultural component of Johnson-Laird et al.'s (2012) algorithm.

Major chord:

library(jl12)
jl_tonal_dissonance(c(0, 4, 7))

Minor chord:

jl_tonal_dissonance(c(0, 3, 7))

Cluster chord:

jl_tonal_dissonance(c(0, 1, 2))

The model comprises several rules. It is possible to call these rules individually, for example:

jl_rule_1(c(0, 3, 7))
jl_rule_2(c(0, 3, 7))
jl_rule_3(c(0, 3, 7))

References

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



pmcharrison/jl12 documentation built on July 6, 2019, 10:27 a.m.