# NOT RUN {
ampl = sin(1:1000)
plot(soundgen:::fadeInOut(ampl, length_fade = 100), type = 'l')
plot(soundgen:::fadeInOut(ampl, length_fade = 300,
do_fadeOut = FALSE), type = 'l')
# if the vector is shorter than twice the specified length_fade,
# fade-in/out regions overlap
plot(soundgen:::fadeInOut(ampl, length_fade = 700), type = 'l')
# }
Run the code above in your browser using DataLab