Description Usage Arguments Details Value Examples
View source: R/utilities_math.R
Internal soudgen function.
1 | getIntegerRandomWalk(rw, nonlinBalance = 50, minLength = 50, plot = FALSE)
|
rw |
a random walk generated by |
nonlinBalance |
a number between 0 to 100: 0 = returns all zeroes; 100 = returns all twos |
minLength |
the mimimum length of each epoch |
plot |
if TRUE, plots the random walk underlying nonlinear regimes |
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.
Returns a vector of integers (0/1/2) of the same length as rw.
1 2 3 4 5 | 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.