View source: R/soundgen_utilities.R
silenceSegments | R Documentation |
Internal soundgen function
silenceSegments(x, samplingRate, na_seg, attackLen = 50)
x |
sound as a numeric vector |
samplingRate |
sampling rate, Hz |
na_seg |
dataframe containing columns "start_prop" and "end_prop" |
attackLen |
attack length, ms |
Fills specified segments with silence (0) and fades in-out the ends of the silenced segment.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.