onsets: Calculate (Physical) Onset Times from an Object containing...

Description Usage Arguments Details

Description

This function calculates onset times for any kind of object containing time series data. The onsets are calculated by comparing the overall energy of each part of the time series with the rest of the time series. Positions where the energy is above a portion of limit, compared to the overal energy, are assumed to contain actual data.

Usage

1
2
onsets(ts, limit = c(0.1, 0.01), limit.type = c("absolute", "relative"),
  min.duration = 0.1, ...)

Arguments

ts

The object containing the time series data.

limit

Parameters used for detecting onsets. See 'Details'

limit.type

Type of limit, which is used to detect on- and offsets. If set to absolute (default) then the limit value is used directly. If set to relative then the limit is determined as the energy in the i-th percentile, where i is given by the limit parameter.

min.duration

Minimum duration of onsets to be detected. Onsets that have less duration than this value (in seconds) will be assumed to be false positives and be discarded. Set to NULL or 0 to disable filtering of short onsets.

...

Object specific parameters

Details

The onset detection mechanism used a hysteresis filter by default. If energy goes above a level defined by the first element of the limit parameter, this is detected as a start of a signal block (i.e. an onset). For the signal block to end, the energy has to go below the level of the second element of the limit parameter. This way the energy limit for offset detection can be much lower than the energy for onset detection, giving much more reliable onset and offset values.

If no hysteresis is desired, simply pass one single value as limit parameter (or the same value twice).


LiKao/VoiceExperiment documentation built on May 7, 2019, 1:19 p.m.