Multible compressor curves - saving MIPS
Hi
I need a compressor with gain output. The user shall be able to select between several different compression curves - and I'm running low on MIPS so I can't just run several of them in parallel.
Would something like this be possible?
Best regards
John Hammer
software
ADAU1787
4.7
Integrated/Special Purpose A/D Converters
Audio CODECs
Hello John,
We need a LOT more information.
The SigmaDSP core has compressors in the library that have gain outputs.
Have you tried that?
Then the compressor curve is exposed as a parameter. So you can update it if you have a system controller. Do you have a system controller?
There is also an RMS Index Selectable version but there is no help file on it and I would have to ask someone else in the company for some more details.
I will wait for your reply.
Dave T
Hi David.
Thanks.
Yes, I'm already using several compressors in my layout. Now I want to optimise wrt mips.
There are a lot of compressors to chose from. I counted something like 19! with gain out.
I might have missed some :-) I can't find clear documentation/overview on what's the difference. I did some test selecting between mono/stereo. The stereo ones seems to just sum the input for calulating the RMS value. So I can use mono ones as I'm only using the gain output - just sum the input in the flow. That could be the first optimization as I only have to do that once.
The is a MCU connected, and the software for that is being developed by another person. I want to interface to the MCU software via the export files. When you say the curve is exposed - is that part of the export files?
The MCU is handling the user interface and will do the selection of the compression curve - and a lot of other things...
Where do I find the "help file" you mention?
Please let me know if there is more detailed information than the wiki, sorry but it's not overwhelming.
Best regards
John Hammer.
Hi David,
I tried all the compressors to figure out which could work for me. The INDEX LUT version is not clear to me so I gave up on that on.
The "optimized" mono version has a very low number of cycles compared to the others. Are the anything I need to consider chosing that as my goto compressor in this project? It's seems like a no-brainer, but sometimes thing like this comes with a cost.
I have some questions to the compiler output. Please have a look at the highlighted here:
The Saveload and Beginning. I guess it's something that is basis for running the flow and can't be optimised, correct?
All the best
John Hammer
Hello John,
Sorry for the delay. I will respond to both f your last posts together here.
I am not sure where I mentioned a help file? However, we do have some documentation on a Wiki server which might be helpful for you. It is not as detailed as it could be and I think you probably have already gathered most of the info on your own. Here is the link:
Dynamics Processors [Analog Devices Wiki]
Yes, the stereo versions just sum the inputs into Mono and send that to the sidechain for processing. Then once the gain factor is calculated it is equally applied to the two channels for the compressor output. This is rather normal for stereo compressors because you do not want to have the phantom center in a stereo image to shift around as one channel is louder than the other. Like a tom-tom drum might be panned right and you would not want just the right to go down in level then the vocal image would shift to the left instead of center.
If someone really wanted separate gain then they would use two mono compressors but then the sidechain has twice the code!
By the way, the difference in the code between a stereo and mono compressors that are otherwise the same is minimal. The stereo one has an add instruction, then it could have a multiply to reduce the gain by 6dB and then it is the same as the mono until the end. Then there is two multiplies for the output gain instead of one. For the Sigma300/350 DSPs where they have a quad MAC, these two multiplies would be in one cycle anyway so zero difference on the output side of the sidechain.
When I mentioned the curve is exposed, I meant in the parameter memory. So the MCU could write to the compressor curve gain factors to make adjustments on the fly. Yes, the gain curves will be included into the export files but I am not certain how easy it is to find the exact data. It might not be labeled well. In SigmaStudio when you look at the parameters there are some labels which helps a lot. You can always just look at the Capture window, do to your compressor, change the curve and see where SigmaStudio is writing to.
Beginning code is code that is executed when the DSP comes out of reset or was just powered up, and came out of the power up reset.
It is some initialization that has to be done. This code only runs once. The very first sample period. Sometimes you also see "End Code" which is run after the entire program is run during the first sample period and then it does not run again until another reset.
Safeload is where you can safely load in new filter coefficients without the filter becoming unstable. You do not want to run the filter with only a few coefficients updated! The result may be unstable! So this is a set of memory locations where you can write the new coefficients and then "tell" the DSP to load them in before running the code on the next sample period. This transfer is usually done as a block write which is faster.
There is some info here:
System Implementation [Analog Devices Wiki]
For the Sigma200 cores this takes place at the beginning of the program before the start of a new frame. More detail than you need! LOL
You are correct, the Beginning and Safeload cannot be optimized or done away with.
Dave T
Hi Dave,
Thanks for the reply.
I believe I understand the Dynamic processors now, thanks for that.
The link for this part seems to be missing : System Implementation [Analog Devices Wiki]
Are there a function that just estimates the RMS value? Preferable directly with a dB FS output? I'm using a compressor (limiter) with gain out to calculate the level in dB (above the knee point).
All the best
John Hammer
Hello John,
I will attach a project I did for another reason but it shows what you could do with some more primitive blocks to do something more custom. This project I have an oscillator as a known source with a volume control to give it gain or loss. Then this goes to an RMS table block that obtains the RMS value and based on the level it will output a value from a table. You can setup this table any way you want to. In this case I have it applying gain when the signal is lower so it is acting like an AGC but no compression.
You can modify this to just put out a number based on the level coming in! It does extrapolate between the points of the table. Also, in my project I have the decay super slow at 4dB/s. Feel free to adjust that for testing purposes.
I have a readback in there and your MCU could also read this readback if you want.
Here is the project.
Dave T
ADAU1787 - SDSP RMS Table Example with gain change.dspproj
Hi Dave
Thanks a lot for the reply.
I'll close it here, as I'm doing ok with the optimized mono compressor with 22 inst vs the RMS table using 63 inst.. I was hoping to to something similar in numbers of instuctions with the RMS table.
All the best.
John Hammer
Please log in to reply.




