ECHOES
To achieve and echo, we need to delay the original signal, then play it alongside the original track. A Z-Transform based filter is used to achieved this, with the delay property following the notation shown below. For the example below, the track is delayed by 30ms to create a "livelier" sound.
[1] Image courtesy of EECS 351 Course at the University of Michigan
[2]
Z-Transform Filter
The filter takes the form of the equation on the right. The 'alpha' value is the attenuation factor, giving the user the ability to control the echo volume.
When a delay time is specified in seconds (delaysec), it is multiplied by the sample frequency (fs) to get the total delay needed for the Z-domain (D).
This delay is applied to the original signal (X(z)), before this product is added to the original signal directly, creating the final edited audio track (Y(z)).
The signal is transformed back into the time domain, creating the new track.
Image (c) David Pulido
CONCLUSIONS
The echo algorithm works perfectly. While a simple implementation, it does its job well given that the only thing happening is a time shift. However, this filter approach is very versatile for different audio files.
Citations
1. Image courtesy of https://umich.instructure.com/courses/488640/files/folder/Exams?preview=24835817
​
2. Jackson, Michael. “PYT.” https://www.youtube.com/watch?v=1ZZQuj6htF4
​
​
Images not cited are from the Wix template images