silenceSegments: Silence sound segments

View source: R/soundgen_utilities.R

silenceSegmentsR Documentation

Silence sound segments

Description

Internal soundgen function

Usage

silenceSegments(x, samplingRate, na_seg, attackLen = 50)

Arguments

x

sound as a numeric vector

samplingRate

sampling rate, Hz

na_seg

dataframe containing columns "start_prop" and "end_prop"

attackLen

attack length, ms

Details

Fills specified segments with silence (0) and fades in-out the ends of the silenced segment.

Examples

s = runif(4000) * 2 - 1
s1 = soundgen:::silenceSegments(s, 16000,
       na_seg = data.frame(prop_start = c(.1, .5), prop_end = c(.2, .85)),
       attackLen = c(5, 15))
osc(s1)

soundgen documentation built on Sept. 12, 2024, 6:29 a.m.