
Internal soundgen function.
divideIntoSyllables(
nSyl,
sylLen,
pauseLen,
sylDur_min = 20,
sylDur_max = 10000,
pauseDur_min = 20,
pauseDur_max = 1000,
temperature = 0.025,
invalidArgAction = c("adjust", "abort", "ignore")[1],
plot = FALSE
)
Returns a matrix with a list of start-end points for syllables
the desired number of syllables
the desired mean syllable duration, in ms (vectorized)
the desired mean pause between syllables, in ms (vectorized)
the lower and upper bounds on possible syllable duration, in ms
the lower and upper bounds on possible pause duration, in ms
a non-negative float regulating the stochasticity of syllable segmentation; 0 = no stochasticity; 1 = sd of proposals is equal to sylLen (very strong stochasticity)
what to do if an argument is invalid or outside the
range in permittedValues
: 'adjust' = reset to default value, 'abort'
= stop execution, 'ignore' = throw a warning and continue (may crash)
produce a plot of syllable structure?
Stochastic generation of syllable structure of a bout. Calls
rnorm_truncated2
to vary the duration of each new syllable and of
pauses between syllables. Total bout duration will also vary, unless
temperature is zero. However, the output will always contain exactly
nSyl
syllables.
soundgen:::divideIntoSyllables(nSyl = 1, sylLen = 180)
soundgen:::divideIntoSyllables(nSyl = 5, sylLen = 180,
pauseLen = 55, temperature = 0.2, plot = TRUE)
soundgen:::divideIntoSyllables(nSyl = 5, sylLen = 180,
pauseLen = 55, temperature = 0)
soundgen:::divideIntoSyllables(nSyl = 3, sylLen = 100,
pauseLen = 25, temperature = 0.5)
# sylLen and pauseLen are vectorized:
soundgen:::divideIntoSyllables(nSyl = 15, sylLen = 100:200,
pauseLen = c(80, 25, 80), temperature = 0.05, plot = TRUE)
Run the code above in your browser using DataLab