ΣSigmaStudio Ask AI Русский Log in

How get eq coefficent to write sigma dsp ?

SigmaDSP & SigmaStudio walkercc May 11, 2011 00:00 1 replies Original on forum ↗
Subscribe
walkercc Question
May 11, 2011 00:00

How convert it?

Eq coefficent write to sigma dsp have 5 cofficent,

for example, like help file's formula, calculate peaking eq coefficent, my code is :
double omegac= 2.0 * pi * F/G_FS;
double cosv= cos(omegac);
double alpha= sin(omegac) / (2.0 * Q);
double A= pow(10, G/40);
double gainLinear = pow(10, lg/20);

double a0 = 1.0 + alpha/A;
double a1 = -2.0 * cosv;
double a2 = 1.0 - alpha/A;
double b0 = (1.0 + alpha*A )*gainLinear;
double b1 = -(2.0 * cosv) * gainLinear;
double b2 = (1.0 - alpha*A ) * gainLinear;

and Sigmastudio help file said "all the coefficients are divided by a0,
normalizing them and making a0 = 1, so that only 5 coefficients must be stored."

So, 5 coeff is :
double a1a0 = a1/a0;
double a2a0 = a2/a0;
double b0a0 = b0/a0;
double b1a0 = b1/a0;
double b2a0 = b2/a0;

It's my solution, but compare sigma dsp decimal val and my result, is differnet!
i don't know wha's wrong ? example: F = 31Hz Fs = 48k Q = 1.41 Boost = 1.0

my result is :

sigmastudio result ( 5 coefficent is below):

Last, the help file said"a1 and a2 need to be inverted", what's meaning?

6abf23ce0747dde46d5199ba2e4e958e.jpg
6abf23ce0747dde46d5199ba2e4e958e.jpg
6abf23ce0747dde46d5199ba2e4e958e.jpg-507x223.jpg
6abf23ce0747dde46d5199ba2e4e958e.jpg-507x223.jpg
f1763357883fb37a7d16da573b625944.jpg
f1763357883fb37a7d16da573b625944.jpg
f1763357883fb37a7d16da573b625944.jpg-397x80.jpg
f1763357883fb37a7d16da573b625944.jpg-397x80.jpg
ADIApproved Reply
May 11, 2011 00:00

The sentence about inverting the a1 and a2 coefficients is a bit misleading. I'm hoping to clear that up soon. In the meantime, please use this guide for calculating coefficients exactly as they need to be stored in memory.