Chapter 14Delay Effects and Circular Buffers

Before we can start looking at some FIR algorithms, we need to deal with the concept of long delay lines and circular buffers. Not only are they used for the delay effects, but also they are needed to make long FIR filters. In this chapter we’ll take a break from the DSP filter algorithms and develop some digital delays for our delay plugin. If you think back to the IIR filters you’ve worked on so far, you will remember that after implementing the difference equation you need to shuffle the z1 delay element values. You do this by overwriting the delays backwards in the Biquad object’s processAudioSample function: // --- update states stateArray[x_z2] = stateArray[x_z1]; stateArray[x_z1] = xn; stateArray[y_z2] ...

Get Designing Audio Effect Plugins in C++, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.