Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

noSilence

Cut off silence from a Wave or WaveMC object


Description

Generic function to cut off silence or low noise at the beginning and/or at the end of an object of class Wave or class WaveMC.

Usage

noSilence(object, zero = 0, level = 0, where = c("both", "start", "end"))

Arguments

object

Object of class Wave or class WaveMC.

zero

The zero level (default: 0) at which ideal cut points are determined (see Details). A typical alternative would be 127 for 8 bit Wave or WaveMC objects. If zero = NA, the mean of the left Wave channel (for Wave, resp. the mean of the first channel for WaveMC) is taken as zero level.

level

Values in the interval between zero and zero - level/zero + level are considered as silence.

where

One of "both" (default), "start", or "end" indicating at where to prepare the Wave or WaveMC object for concatenation.

Details

Silcence is removed at the locations given by where of the Wave or WaveMC object, where silence is defined such that (in both channels if stereo, in all channels if multichannel for WaveMC) all values are in the interval between zero - level and zero + level. All values before (or after, respectively) the first non-silent value are removed from the object.

Value

An object of class Wave or WaveMC.

Author(s)

Uwe Ligges ligges@statistik.tu-dortmund.de, Sarah Schnackenberg, based on code from Matthias Heymann's former package ‘sound’.

See Also


tuneR

Analysis of Music and Speech

v1.3.3
GPL-2 | GPL-3
Authors
Uwe Ligges <ligges@statistik.tu-dortmund.de> with contributions from Sebastian Krey, Olaf Mersmann, Sarah Schnackenberg, Guillaume Guenard, Andrea Preusser, Anita Thieler, Johanna Mielke and Claus Weihs, as well as code fragments and ideas from the former package 'sound' by Matthias Heymann and functions from 'rastamat' by Daniel P. W. Ellis. The included parts of the libmad MPEG audio decoder library are authored by Underbit Technologies.
Initial release
2018-07-03

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.