Reverb
Hi everyone,
I am currently using the EVAL-ADAU144xEBZ Evaluation board with Sigma Studio version 3.12. My main goal is to have two independent reverb channels with independent reverb time controls (external like a potentiometer or an encoder).
The only reverb module available in the toolbox is ADI Algorithms >Effects>Reverb. It has a total of three controls: "Reverb Time", "HF Damping", and "Bass Reverb Gain". I would like to leave the hf damping and the bass reverb gain fixed fixed in the software, while allowing the user to adjust the reverb time using an external control (potentiometer or encoder).
1) I am only able to use one of these modules in my schematic. If I add any more than one, I get the error message: "RAM Address exceeds: 8192". It seems there is not enough RAM to run two of these reverb modules. Am I correct? Is there a way around this?
2) Is there a way I to know exactly how much memory an individual module requires? For example, how much of the available memory does one reverb module take? I am having difficulty taking memory into consideration for this design when I don't know how much memory each module costs.
3) I am looking to control the reverb time with an external controller. At first glance, it does not seem like that is a parameter you can adjust outside of software. Is there a way to make this parameter controllable externally (pot or encoder)? I have the Sigma Studio GPIO control board to experiment with.
Thanks for all of your help.
-Justin
It looks like the reverb module is hardcoded to reserve over 5K of RAM, so you couldn't add two to a schematic. I would just code your own reverb, which solves all of your issues. Google "Freeverb" and you will find an algorithm that can be implemented in SigmaStudio with delay lines (which you can reserve the exact amount of memory you need), low- and all-pass filters, and feedback (and no math!). You would then have the ability to include external control wherever you want it.
Also, if you want very long reverb times, see this thread for KJBob's implementation of my downsampling suggestion:
ADAU1701: ADC_RES value, Synchronous Multiplexer
Awesome, Jon!
Combining the Freeverb algorithm with down-sampling might be just the ticket. Down-sampling takes a few extra instructions but saves lots of data memory. And for really long delays at 5 KHz, use ADI's Synchronous Multiplexer implementation (if available for the -144x as it is for the -1701), as shown at https://ez.analog.com/message/121453#121453. I just wish there were a companion "Synchronous Demultiplexer," as most of the complexity in this project as shown relates to recovering the audio thus multiplexed. One could of course also implement a 4x multiplexer discreetly, with a counter and an index multiplexer.
Best regards,
Bob
Also when coding a stereo reverb the "main" delay doesn't have to be in stereo. Usually you want about a 40msec delay for the first reflection, that can be mono, then you use different series of smaller unique prime numbers for left and right delay for the stereo image. And you can vary the filters a bit between channels.
If you want two completely independent reverbs with different inputs you will need two main delay lines, which will use at least half of -144x's RAM (without downsampling).
Hi Jon71 and KJBob,
Thank you very much for your help! I will try the strategies you suggested and let you know how it goes.
I do have one question: is there a way to tell how much memory is hard-coded into a module? For example Jon71, you mentioned that the reverb module is hard coded to take up 5K of RAM. How did you find this information?
I created a project that had nothing but the reverb module, the input block, and a pair of outputs. Then I compiled and reviewed the compiler_output.txt file, that listed RAM usage as a bit over 5K. I also could not add a second reverb without the same error you got on compilation.
I think KJBob published a spreadsheet with the instruction usage of each module, but I don't recall if that had memory usage as well. Most modules have a modest memory requirement, the exceptions being modules that need latency such as FIR or delays. So you will probably find that you aren't concerned with memory except for those situations.
When you code your own reverb memory usage will be easy to estimate, as you get to select the maximum delay for each delay module. You will probably want up to 4K for the main delay, and maybe another 1-2K total for the shorter delays.
Please log in to reply.