
echo(wave, f, amp, delay, plot = FALSE,
listen = FALSE, output = "matrix", ...)
wave
(in Hz). Does not need to be specified if embedded in wave
.wave
(in s.)TRUE
returns an oscillographic plot of the wave
modified (by default FALSE
).TRUE
the new sound is played back."matrix"
, "Wave"
, "Sample"
, "audioSample"
or "ts"
.oscillo
graphical parameters.plot
is FALSE
, a new wave is returned. The class
of the returned object is set with the argument output
.amp
and delay
should strictly have the same length corresponding
to the number of desired echoes.synth
# generation of the input wave
a <- synth(f=11025,d=1,cf=2000,shape="tria",am=c(50,10),fm=c(1000,10,1000))
# generation of three echoes
# with respectively a relative amplitude of 0.8, 0.4, and 0.2
# and with a delay of 1s, 2s, and 3s from the beginning of the input wave
aecho <- echo(a,f=11025,amp=c(0.8,0.4,0.2),delay=c(1,2,3))
# another echo with time delays overlapping with the input wave
aecho <- echo(a,f=11025,amp=c(0.4,0.2,0.4),delay=c(0.6,0.8,1.5))
Run the code above in your browser using DataLab