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

bowl18: Implementation of Bowling et al.'s (2018) Vocal Similarity Algorithms

lifecycle Travis build status AppVeyor build status Coverage status DOI

The bowl18 R package implements Bowling et al.'s (2018) vocal similarity algorithms.

Installation

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

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

Usage

Bowling et al. (2018) formalise two aspects of a musical chord's 'vocal similarity':

a) Its similarity to the harmonic series, assessed with the gill09_harmonicity() function; b) The absence of small frequency intervals, assessed with the bowl18_min_freq_dist() function.

gill09_harmonicity

gill09_harmonicity() measures a chord's similarity to a harmonic series, after Gill & Purves (2009). It assumes that chord pitches are precisely aligned with the just-tuned scale provided by Bowling et al. (2018).

By default, gill09_harmonicity assumes that the input is a vector of MIDI pitch numbers. We recommend using the hrep package to clarify this input format, as follows:

library(bowl18)
library(hrep)

# Constructing chords with pi_chord()
pi_chord(c(60, 64, 67)) # C major chord

# Major chord
gill09_harmonicity(pi_chord(c(60, 64, 67)))

# Diminished chord
gill09_harmonicity(pi_chord(c(60, 63, 66)))

# Augmented chord
gill09_harmonicity(pi_chord(c(60, 64, 68)))

bowl18_min_freq_dist

bowl18_min_freq_dist() returns the minimum frequency distance between the fundamental frequencies of a chord. It makes no assumptions about the chord's tuning.

By default, bowl18_min_freq_dist() assumes that the input is a vector of frequencies. We recommend using the hrep package to clarify this input format, as follows:

library(bowl18)
library(hrep)

# Constructing chords with pi_chord() and fr_chord()
x <- pi_chord(c(60, 64, 67)) # C major chord
fr_chord(x) 

# Major chord
bowl18_min_freq_dist(fr_chord(pi_chord(c(60, 64, 67))))

# Cluster chord
bowl18_min_freq_dist(fr_chord(pi_chord(c(60, 61, 62))))

Bowling et al. (2018) argue that, in particular, frequency differences smaller than 50 Hz contribute negatively to consonance.

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), 1–9. https://doi.org/10.1371/journal.pone.0008144



pmcharrison/bowl18 documentation built on May 25, 2019, 4:03 a.m.