
Internal soundgen function.
getIntegerRandomWalk(rw, nonlinBalance = 50, minLength = 50, plot = FALSE)
a random walk generated by getRandomWalk
(expected
range 0 to 100)
a number between 0 to 100: 0 = returns all zeros; 100 = returns all twos
the mimimum length of each epoch
if TRUE, plots the random walk underlying nonlinear regimes
Returns a vector of integers (0/1/2) of the same length as rw.
Takes a continuous random walk and converts it to continuous epochs of repeated values 0/1/2, each at least minLength points long. 0/1/2 correspond to different noise regimes: 0 = no noise, 1 = subharmonics, 2 = subharmonics and jitter/shimmer.
# NOT RUN {
rw = soundgen:::getRandomWalk(len = 100, rw_range = 100, rw_smoothing = .2)
r = soundgen:::getIntegerRandomWalk(rw, nonlinBalance = 75,
minLength = 10, plot = TRUE)
r = soundgen:::getIntegerRandomWalk(rw, nonlinBalance = 15,
minLength = 10, plot = TRUE)
# }
Run the code above in your browser using DataLab