# How to manipulate attenuation in Parks MClellan algorithm?

I am using GNU Radio C++ source code in my app (pm_remez()) for generating FIR filters coefficients. Input parameters here are: bands[], des[] and weight[]. How I can manipulate stop band attenuation in pm_remez() function?

The stopband attenuation is controlled indirectly by the relation between passband and stopband weights. A large weight means a small error in the corresponding frequency band. E.g., if the passband weight is $1$ and the stopband weight is $10$, then the approximation error in the stopband will be $10$ times smaller than the approximation error in the passband. The actual value of the error (i.e. passband ripple and stopband attenuation) cannot be prescribed in the original version of the algorithm. The approximation error is an outcome of the algorithm, just like the filter coefficients. The only thing that can be prescribed is the ratio between the errors in the different frequency bands.