Description Usage Arguments Details Examples
View source: R/utilities_math.R
Internal soundgen function
1 | downsample(s, srNew = 10, srOld = 120, minLen = 3)
|
s |
a numeric vector |
srNew |
the new, required sampling rate |
srOld |
the original sampling rate |
minLen |
the minimum length of returned vector |
Takes a numeric vector and downsamples it to the required sampling rate by simply throwing away some of the original points. If the new sampling rate is higher than the original, does nothing.
1 2 3 | s = sort(rnorm(20))
soundgen:::downsample(s, srNew = 5, srOld = 18)
soundgen:::downsample(s, srNew = 5, srOld = 40)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.