This is a version in development of the eaR package, an open-source R tool for perception-based auditory analysis. eaR provides user-friendly and flexible tool oriented to facilitate the workflow of researchers interested in content analysis and automatic extraction of auditory and musical features. Routines are mainly designed according to the auditory short term memory (ASTM) model developed by Marc Leman and previously implemented in IPEM Toolbox.
Before downloading eaR, you should have installed devtools and load it:
install.packages("devtools")
library("devtools")
After that, to download eaR, you can type in the R prompt:
install_github("m-vidal/eaR")
The eaR package contains an adapted version of the auditory periphery model proposed by Van Immerseel and Martens (1992). The model simulates the cochlear mechanical filtering using an array of overlapping band-pass filters yielding to a set of harmonic oscillators distributed in pitch-related frequency bands. An audio signal can be represented as a primary image or auditory nerve image (ANI), which is k-dimensional vector of rate-code of neural discharges in k-frequency bands.
To calculate the ANI of the SchumannKurioseGeschichte dataset, type:
library(eaR)
data(SchumannKurioseGeschichte)
ANIs <- CalcANI(SchumannKurioseGeschichte, 22050) #auditory nerve image
PPs <- PeriodicityPitch(ANIs)
PlotImage(PPs)
After running the code, you will get an image as follows,
which is a transformation of the auditory nerve image into a more coherent pitch representation.The package was designed through the object class ANI
, which at least must contain an image, the sample frequency of the image and a set of frequencies or periods used in their transformations. Unlike in IPEM Toolbox, the formulation of the class ANI
facilitates interaction in the use of the functions and prevent disorderly data. This version includes the functions detailed in the following table. In addition, you can check whether the functions and documentation are available.
Function | Status | Documentation | Migrated |
---|---|---|---|
AdaptLevel |
✔️ | ✔️ | Yes |
as.Wave |
-- | -- | No |
BellShape |
✔️ | -- | Yes |
CalcANI |
✔️ | ✔️ | Yes |
CalcNoteFrequency |
✔️ | ✔️ | No |
CalcOnsetsFromANI |
✔️ | -- | Yes |
CalcProfile |
-- | -- | No |
CalcRMS |
✔️ | -- | Yes |
Clip |
✔️ | -- | Yes |
ContextualityIndex |
✔️ | ✔️ | Yes |
CreateMask |
✔️ | -- | Yes |
FindAllPeaks |
✔️ | -- | Yes |
FindNearestMinima |
✔️ | -- | Yes |
InstallAuditoryModel |
✔️ | ✔️ | No |
LeakyIntegration |
✔️ | ✔️ | Yes |
OnsetPattern |
✔️ | -- | Yes |
OnsetPatternFilter |
✔️ | -- | Yes |
OnsetPeakDetection |
✔️ | -- | Yes |
OnsetPeakDetection1Channel |
✔️ | ✔️ | Yes |
PeriodicityPitch |
✔️ | ✔️ | Yes |
PlotImage |
✔️ | ✔️ | No |
RoughnessFFT |
✔️ | ✔️ | Yes |
ShepardTone |
✔️ | ✔️ | Yes |
ShepardToneComplex |
✔️ | ✔️ | Yes |
eaR uses a core application written in c-code which is fully executable in R environments. Both the eaR Package code and the auditory model c-code are released under the GPL.
eaR
Package was build on R 4.0.3 (2020-10-10) -- "Bunny-Wunnies Freak Out".