# NOT RUN {
a = rnorm(500) * seq(1, 0, length.out = 500)
b = flatEnv(a, plot = TRUE, killDC = TRUE,
windowLength_points = 5) # too short
c = flatEnv(a, plot = TRUE, killDC = TRUE,
windowLength_points = 250) # too long
d = flatEnv(a, plot = TRUE, killDC = TRUE,
windowLength_points = 50) # about right
# }
# NOT RUN {
s = soundgen(sylLen = 1000, ampl = c(0, -40, 0), plot = TRUE, osc = TRUE)
# playme(s)
s_flat = flatEnv(s, plot = TRUE, windowLength = 50)
# playme(s_flat)
# }
Run the code above in your browser using DataLab