This week I wish to build and finish the Reverb effect, to do so I had to have a working Delay. This is because Reverb in essence is a more pronounced Delay effect.
To create the delay effect I had to make use of a circular buffer which I was able to do by following this online guide: https://www.youtube.com/watch?v=2oCb3SXBcTI
Basically a circular buffer is used to store past samples in order to retrieve them back in the present. The size of this buffer determines the amount of time in the past (how long) the delay can be. This can be determined using the sample rate. we now we can get a sample at "f" sampling frequency that means that 1/f will give us the number of samples processed in a second. In this case I chose 5*Fs which should give 5s of maximum delay time. If this affects performance it can be reduced up to 2s delay time.
The circular buffer in a nutshell is an array that wraps around itself. This is needed as we can only process one input buffer at a time so if there is a condition in which the input buffer is bigger than the remaining space in the delay buffer, we need to write the remaining data of the input buffer into the beginning of the delay buffer.
This buffer is written on each event loop. we must also read this buffer to get the delay effect. The delayed time is dictated by how far back in the buffer the data is play back. In this case we can read back up to 5s in the past.
For the Reverb effect I made a quick demo using the info gathered from the delay. Although it requires more work the Reverb effect in a nutshell are several delay effects chained with a sort of randomness into their loudness.
I also built the Distortion effect vst and passed it over for testing. I also tested its sound in the RPi with good results. I'll bring it to the lab on monday to test its performance further.
Here is a demo of the reverb effect: https://static.wixstatic.com/mp3/f9d080_f20ee890f1f542038612aa8813087857.wav
Here is the sound without any effect for reference:
Comments