scaleNoiseAnchors: Scale noise anchors

View source: R/utilities_soundgen.R

scaleNoiseAnchorsR Documentation

Scale noise anchors

Description

Internal soundgen function.

Usage

scaleNoiseAnchors(noiseTime, sylLen_old, sylLen_new)

Arguments

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

Details

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.

Examples

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)

soundgen documentation built on Aug. 14, 2022, 5:05 p.m.