ContextualityIndex: Tone Contextuality Index

Description Usage Arguments Details Value Note Author(s) Examples

View source: R/ContextualityIndex.R

Description

This function calculates the contextuality index. Two methods are used:

Usage

1
ContextualityIndex(inPeriodicityPitch, inSampleFreq, inPeriods,...)

Arguments

inANI

an object of class ANI. It must contain the output of the PeriodicityPitch function: a periodicity pitch image, its sample frequency (in Hz) and the periods of periodicity analysis (in s).

inSnapShot

time where the snapshot should be taken (in s) if negative, the time is taken at abs(inSnapShot) from the end of the sample if empty or not specified, the time of the last sample is used by default

inHalfDecayChords

half decay time for leaky integration into chord image if empty or not specified, 0.1 is used by default.

inHalfDecayToneCenters

half decay time for leaky integration into tone center image if empty or not specified, 1.5 is used by default.

inEnlargement

time by which the input signal is enlarged (in s) if -1, 2*inHalfDecayToneCenters is used if empty or not specified, 0 is used by default.

inPlotFlag

if non-zero, plots are generated if empty or not specified, 0 is used by default

Details

Sample frequency of output signals is the same as inSampleFreq.

Value

An object of class "ANI", which is a list with the following elements:

ChordsImage

local integration of inPeriodicityPitch into chord image.

ToneCentersImage

global integration of inPeriodicityPitch into tone center image

LocalInspection

correspondence between chord taken at snapshot position and running chord image.

GlobalInspection

correspondence between chord taken at snapshot position and running tone center image

Comparison

correspondence between running chord image and running tone center image

Note

Sample frequency of output signals is the same as inSampleFreq.

Author(s)

Marc Vidal (R version). Based on the original code from Marc Leman.

Examples

1
2
3
4
5
probe <- ShepardTone(293.66, 1, indBLevel = -20)
s <- c(SchumannKurioseGeschichte, numeric(2205), probe)
ANIs <- CalcANI(s, 22050)
PPs <- PeriodicityPitch(ANIs)
CIs <- ContextualityIndex(PPs)

m-vidal/pv01 documentation built on Dec. 2, 2020, 1:24 a.m.