check_chords: Check chords

View source: R/check_chords.R

check_chordsR Documentation

Check chords

Description

Check the sequence of musical notes for chords.

Usage

check_chords(x, window = 3, try_perm = FALSE)

Arguments

x

A vector containing a sequence of musical notes.

window

Size of window of notes to be checked. Default: 3.

try_perm

Logical. Must try all notes permutations of notes? Default: FALSE.

Examples

## Not run: 
library(voice)
check_chords(c('C','E','G'), window = 3, try_perm = FALSE)
check_chords(c('C','E','G'), window = 3, try_perm = TRUE)
path2wav <- list.files(system.file('extdata', package = 'wrassp'),
pattern = glob2rx('*.wav'), full.names = TRUE)
M <- extract_features(path2wav)
M$gain[is.na(M$f0)] <- NA
# assigning notes
f0_spn <- assign_notes(M, fmt = 0)
check_chords(f0_spn, window = 3, try_perm = FALSE)
check_chords(f0_spn, window = 3, try_perm = TRUE)
check_chords(f0_spn, window = 4, try_perm = TRUE)

## End(Not run)

voice documentation built on Aug. 8, 2025, 6:41 p.m.