soundgen (version 1.5.0)

divideIntoSyllables: Syllable structure of a bout

Description

Internal soundgen function.

Usage

divideIntoSyllables(nSyl, sylLen, pauseLen, sylDur_min = 20,
  sylDur_max = 10000, pauseDur_min = 20, pauseDur_max = 1000,
  temperature = 0.025, plot = FALSE)

Arguments

nSyl

the desired number of syllables

sylLen

the desired mean syllable duration, in ms (vectorized)

pauseLen

the desired mean pause between syllables, in ms (vectorized)

sylDur_min, sylDur_max

the lower and upper bounds on possible syllable duration, in ms

pauseDur_min, pauseDur_max

the lower and upper bounds on possible pause duration, in ms

temperature

a non-negative float regulating the stochasticity of syllable segmentation; 0 = no stochasticity; 1 = sd of proposals is equal to sylLen (very strong stochasticity)

plot

produce a plot of syllable structure?

Value

Returns a matrix with a list of start-end points for syllables

Details

Stochastic generation of syllable structure of a bout. Calls rnorm_truncated 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.

Examples

Run this code
# NOT RUN {
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