R: acfana

acfana {wrassp} | R Documentation

## acfana

### Description

acfana function adapted from libassp

### Usage

    acfana(listOfFiles = NULL, optLogFilePath = NULL, beginTime = 0,
      centerTime = FALSE, endTime = 0, windowShift = 5, windowSize = 20,
      effectiveLength = TRUE, window = "BLACKMAN", analysisOrder = 0,
      energyNormalization = FALSE, lengthNormalization = FALSE, toFile = TRUE,
      explicitExt = NULL, outputDirectory = NULL,
      forceToLog = useWrasspLogger, verbose = TRUE)

### Arguments

`listOfFiles` | vector of file paths to be processed by function
`optLogFilePath` | path to option log file
`beginTime` | = <time>: set begin of analysis interval to <time> seconds (default: 0 = beginning of file)
`centerTime` | = <time>: set single-frame analysis with the analysis window centred at <time> seconds; overrules BeginTime, EndTime and WindowShift options
`endTime` | = <time>: set end of analysis interval to <time> seconds (default: 0 = end of file)
`windowShift` | = <dur>: set analysis window shift to <dur> ms (default: 5.0)
`windowSize` | = <dur>: set analysis window size to <dur> ms; overrules EffectiveLength parameter
`effectiveLength` | make window size effective rather than exact
`window` | = <type>: set analysis window function to <type> (default: BLACKMAN)
`analysisOrder` | = <num>: set analysis order to <num> (default: 0 = sample rate in kHz + 3)
`energyNormalization` | calculate energy-normalized autocorrelation
`lengthNormalization` | calculate length-normalized autocorrelation
`toFile` | write results to file (default extension is .acf)
`explicitExt` | set if you wish to overwride the default extension
`outputDirectory` | directory in which output files are stored. Defaults to NULL, i.e. the directory of the input files
`forceToLog` | is set by the global package variable useWrasspLogger. This is set to FALSE by default and should be set to TRUE is logging is desired.
`verbose` | display infos & show progress bar

### Details

Analysis of short-term autocorrelation function of the signals in <listOFFiles>. Analysis results will be written to a file with the base name of the input file and extension '.acf'. Default output is in SSFF binary format (track 'acf').

### Value

nrOfProcessedFiles or if only one file to process return AsspDataObj of that file

### Author(s)

Raphael Winkelmann

Lasse Bombien

### Examples

    # get path to audio file
    path2wav <- list.files(system.file("extdata", package = "wrassp"),
                           pattern = glob2rx("*.wav"),
                           full.names = TRUE)[1]

    # calculate short-term autocorrelation
    res <- acfana(path2wav, toFile=FALSE)

    # plot short-term autocorrelation values
    matplot(seq(0,numRecs.AsspDataObj(res) - 1) / rate.AsspDataObj(res) +
            attr(res, 'startTime'),
            res$acf,
            type='l',
            xlab='time (s)',
            ylab='short-term autocorrelation values')

[Package wrassp version 0.1.4 Index]