View source: R/soundgen_utilities.R
scaleNoiseAnchors | R Documentation |
Internal soundgen function.
scaleNoiseAnchors(noiseTime, sylLen_old, sylLen_new)
noiseTime |
vector of time points at which noise anchors are defined |
sylLen_old |
syllable length relative to which the timing of noise anchors is specified |
sylLen_new |
the new syllable length |
Scales a dataframe containing noise anchors so as to preserve the timing of positive anchors relative to the new syllable duration. Negative time anchors are not changed: the pre-aspiration length is constant, regardless of the actual syllable duration. Time anchors from 0 to sylLen are proportional to the actual syllable duration re the average expected duration (which the user sees in the UI when choosing time anchors). Time anchors beyond sylLen are scaled to preserve post-aspiration duration.
noiseTime = c(-20, 50, 120)
soundgen:::scaleNoiseAnchors(noiseTime, sylLen_old = 100, sylLen_new = 200)
soundgen:::scaleNoiseAnchors(noiseTime, sylLen_old = 100, sylLen_new = 50)
soundgen:::scaleNoiseAnchors(noiseTime, sylLen_old = 200, sylLen_new = 300)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.