View source: R/PeriodicityPitch.R
PeriodicityPitch | R Documentation |
This function calculates the periodicity pitch image (PPI) from the ANI matrix obtained with the function CalcANI
. The periodicity pitch is defined as the summed autocorrelation over bandpass filtered fluctuations on the auditory channels. Since the output of the auditory model gives the envelopes of the neural firing probabilities (< 1250Hz), it suffices to apply a low-pass filter to obtain the pitch in a reliable frequency range (80-1250 Hz).
Let F_{j} denote a second-order Butterworth filter with a cutoff frequency of 80 Hz. Then, the filtered channels are
\tilde{A}_{j}=F_{j}[A_j], where A_j\ (j=1,…,m) denote the channels of the ANI matrix.
The lower limit of 80 Hz accounts for the fact that for smaller frequencies, the pitch becomes more a sensation of textural properties. The higher limit of 1250 Hz is related to the limits of neural synchronization. Beyond about 1250 Hz, the neurons are no longer able to follow the exact period of the signal very accurately, and periodicity pitch becomes unreliable. Only the lowest frequency can be changed by inLowFrequency
. Secondly, a frame-based convolution analysis and a coincidence mechanism is conducted by the summation of the convolution results over all channels.
PeriodicityPitch(inANIObj, inLowFrequency = 80, inFrameWidth = 0.064, inFrameStepSize = 0.010)
inANIObj |
an object of class "
|
inLowFrequency |
cutoff frequency (in Hz) of a first order lowpass filter applied before calculating the autocorrelation. If empty or not specified, 80 is used by default. |
inFrameWidth |
width of the frame used for the accumulation of the autocorrelation (in s). If empty or not specified, 0.064 is used by default. |
inFrameStepSize |
stepsize or time interval between two |
As for any frame-based function, the first value of the output signal is the value calculated for the first complete frame in the input signal. Thus, if you have an input signal of length 1 s at a sampling frequency of 1000 Hz, a frame width of 0.050 s and a frame step size of 0.010 s, then there will be ceiling(((1 - 0.050)*1000 + 1)/(0.010*1000)) = 96
values in the output signal. The first value corresponds to the first complete frame (the interval 0 to 0.050 s).
An object of class "AI
", which is a list with the following elements:
PeriodicityPitchImage |
periodicity pitch: a matrix of size |
SampleFreq |
sampling rate, equal to inSampleFreq/inFrameStepSize (in Hz). |
Periods |
analyzed periods (in s). |
BPANI |
bandpass filtered auditory nerve images (at the original sample frequency). |
Marc Vidal (R
version). Based on the original code from IPEM Toolbox.
## Not run: probe <- ShepardTone(293.66, 1, indBLevel = -20) s <- c(SchumannKurioseGeschichte, numeric(2205), probe) ANIs <- CalcANI(s, 22050) PPs <- PeriodicityPitch(ANIs) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.