Post Go back to editing

Adaptation of the Reverb algorithm to various sampling frequencies

Category: Software
Product Number: ADAU1463
Software Version: SIGMASTUDIO 4.7

Dear Friends,

If I compile an IR-filter with fs set to 192 kHz the underlying biquad parameters will be optimized such that I get the required filter response for any signal that has a sampling frequency of 192 kHz.

If the same filter is used with a signal with 48 kHz sampling frequency all filterfrequencies will be effectively shifted downwards by a factor 4.

To get the proper filter response the schematics have to be compiled with an fs of 48 kHz. This will give me the proper biquad parameters for this specific sampling frequency.

It’s all easy and logical.

My problem: When I use the Reverb algorithm in combination with the ADAU1463, then the parameters of the algorithm are independent of fs!! Whether the fs is set to 48 or 192 kHz makes no difference.

As a result, the reverb signal calculated for an “input” signal with a sampling frequency of 192 kHz will be different from a signal with the same shape but with a sampling frequency of 48 kHz. With the latter the reverb signal is more delayed in time (4x) and is more spread in time (four times wider).

So my questions:

+  For what sampling frequency has the reverb algorithm been optimized?

+  Can the parameters of the parameters access table of the reverb algorithm (coeffs, dif_cos, dif_sin, ….)  been optimized for different sampling frequencies?

+  Is there any documentation available what all these parameters do?

Currently I’m working on an audio processor that does all the processing at the default frequency of the incoming signal. The reason is, that I’ve found the asynchronous sample rate converters to have a slight muddying effect on sound quality.

I want to add reverb to the processor but this is only possible if the response can be made consistent for all sampling frequencies.

Thanks in advance,

Jan Meier

Parents
  • Hello Jan,

    Most of the algorithms are not optimized for certain sampling rates. The exceptions are things like the noise reduction algorithms and the NLMS algorithm. Reverbs are not designed for just one rate. They are designed like most of the blocks to take in the settings and compile to the current sample rate. But,... The rate up on the top of the window is only one of three ways to change the sample rate and all three must be correct and agree. 

    The rate up in the top of the window is only to tell SigmaStudio what rate you intend to setup the DSP to run at. This way it will compile the code using the correct parameters and coefficients. This is the first step. 

    The second step is to setup the PLL to output the correct frequency and setup the clock generators to send out the correct frequency. These are all related to each other. The clock generators use the output of the PLL to divide down to the correct rate. You have to setup the PLL for a certain master clock input frequency. 

    Oh, and one other little detail about the clock generators, these are for the internal rates. If you setup the serial port as a clock slave then it is up to the incoming rate and that is out of the control of the DSP.

    The third thing is to actually apply the correct clocks to the DSP. The crystal/clock source must be at the frequency you expected when you setup the PLL. If it is off them all the clocks are off. 

    I do not know if you are using our evaluation board and if you are then which one? Some of our eval boards can be difficult to change the sampling rate. The codecs also need to be changed. 

    I would normally say to include your project but that will only tell me what your settings are but not what the actual hardware is doing. It still is good to have a look. 

    Dave T

Reply
  • Hello Jan,

    Most of the algorithms are not optimized for certain sampling rates. The exceptions are things like the noise reduction algorithms and the NLMS algorithm. Reverbs are not designed for just one rate. They are designed like most of the blocks to take in the settings and compile to the current sample rate. But,... The rate up on the top of the window is only one of three ways to change the sample rate and all three must be correct and agree. 

    The rate up in the top of the window is only to tell SigmaStudio what rate you intend to setup the DSP to run at. This way it will compile the code using the correct parameters and coefficients. This is the first step. 

    The second step is to setup the PLL to output the correct frequency and setup the clock generators to send out the correct frequency. These are all related to each other. The clock generators use the output of the PLL to divide down to the correct rate. You have to setup the PLL for a certain master clock input frequency. 

    Oh, and one other little detail about the clock generators, these are for the internal rates. If you setup the serial port as a clock slave then it is up to the incoming rate and that is out of the control of the DSP.

    The third thing is to actually apply the correct clocks to the DSP. The crystal/clock source must be at the frequency you expected when you setup the PLL. If it is off them all the clocks are off. 

    I do not know if you are using our evaluation board and if you are then which one? Some of our eval boards can be difficult to change the sampling rate. The codecs also need to be changed. 

    I would normally say to include your project but that will only tell me what your settings are but not what the actual hardware is doing. It still is good to have a look. 

    Dave T

Children
  • Dear Dave,

    attached please find a picture of the schematics of the project. The project “register-reads” the contents of the S/PDIF inputs and all processing is done at the default rate of this S/PDIF signal.

    The fs in the header of Sigma-Studio has been set to 192 kHz. So all blocks are compiled with parameters as if the signal is processed at this frequency.

    Next an analog pulse signal was digitized at various sampling frequencies and processed through the ADAU1463. The S/PDIF output signal was send to a DA-converter. The output of this converter was checked with an oscilloscope.

    The first oscillocope picture shows (from top to bottom):

    * The analog pulse signal

    * The reverb signal with a sampling frequency of the input signal of 48 kHz

    * The reverb signal with a sampling frequency of 96 kHz

    * The reverb signal with a sampling frequency of 192 kHz

    As expected the reverb signal changes with the sampling frequency as it was optimized for 192 kHz (fs). At lower sampling frequencies the reverb signal is stretched as the unit of time (sampling time) is also stretched.

    Similar time-stretching of the response also can be seen if we, instead of the reverb signal, use a first order filter (not shown in a picture). Only an input signal that has the same sampling frequency as fs will have the proper behaviour (proper filter frequencies). The response of the filter changes if we change the fs at compiling.

    However, with the reverb the response does not change with fs!!

    The second oscilloscope picture shows the same signals as the first but now with the fs set to 48 kHz. The signals of the first and second picture are the same!

    ????????

    The use of sample rate converters at the input and the output does not really change the situation. Of course now the reverbsignal is independent of the sampling frequency of the input signal but if we use different processing frequencies (fs) the reverb signal changes its time scale (is stretched or compressed). Therefore I suspect the reverb algorithm to be optimized for a specific processing rate.

    I hope this clarifies my question.

    Cheers

    Jan