int_vec: Interval vector

View source: R/int-vec.R

int_vecR Documentation

Interval vector

Description

Computes a chord's interval vector, after \insertCiteParncutt2018;textualhrep.

Usage

int_vec(x)

## S3 method for class 'pc_set'
int_vec(x)

## Default S3 method:
int_vec(x)

## S3 method for class 'int_vec'
as.numeric(x, ...)

## S3 method for class 'int_vec'
as.character(x, ...)

Arguments

x

Object to analyse.

...

Further arguments passed to other methods.

Details

An interval vector of class "int_vec", describing how often each pitch-class interval appears in a chord. There are six possible interval classes: 1, 2, 3, 4, 5, and 6 semitones. \insertCiteParncutt2018;textualhrep cite \insertCiteForte1977;textualhrep for this technique.

Value

An integer vector of length 6, where the ith element indicates the number of times that the pitch-class interval i is found in the chord.

References

\insertAllCited

Examples

int_vec(c(60, 64, 67)) # major triad
int_vec(c(60, 63, 66)) # diminished triad

pmcharrison/hrep documentation built on Feb. 18, 2024, 2:33 a.m.