Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DSP memory holds FIR coefficients in reverse order #105

Closed
mike811 opened this issue Jan 16, 2022 · 17 comments
Closed

DSP memory holds FIR coefficients in reverse order #105

mike811 opened this issue Jan 16, 2022 · 17 comments
Labels
bug Something isn't working work in progress Somebody is working on this issue

Comments

@mike811
Copy link

mike811 commented Jan 16, 2022

Hello,

tests reveal a maximum phase behaviour of current FIR implementation.
This seems to be caused by incorrect order of coefficient upload. According to this:
https://wiki.analog.com/resources/tools-software/sigmastudio/toolbox/filters/firfilter
Coefficents need to be loaded in reverse order.

As a quick workaround coefficients may be swapped prior upload by a script or via command line e.g:
tail -r LIN.txt > LIN_rev.txt

@dspverden dspverden added bug Something isn't working work in progress Somebody is working on this issue labels Jan 16, 2022
dspverden pushed a commit that referenced this issue Feb 7, 2022
@dspverden
Copy link
Collaborator

HI,

please can you verify wether the issue is solved in v2.2.2? I have added the coefficient order reversing to the ESP32 firmware.

@mike811
Copy link
Author

mike811 commented Mar 15, 2022

Hello,

seems to work correctly in principle with pre 2.2.2 but there is a difference in frequency response:
For example with 2.1.4 and manual coef reversal:
Bildschirmfoto 2022-03-15 um 19 02 36

With pre 2.2.2 and without manual coef reversal:
Bildschirmfoto 2022-03-15 um 19 05 02

Did something regarding PEQ change to cause this?

Regards
Michael

@dspverden
Copy link
Collaborator

Are there PEQs involved in your setting?
Or do I see the FIR only there?
I did test it with only FIR active and directly from audio interface back into audio interface and saw the expected FIR response.

@dspverden
Copy link
Collaborator

P.S. between 100 and 200 Hz I see a phase change, too. Can it be that you have enabled another filter (PEQ or Phase)?

@mike811
Copy link
Author

mike811 commented Mar 15, 2022

No Aurora PEQ were involved. All 10 PEQs had Gain 0. Tested with clean 2.2.1 and pre 2.2.2 FW. Only FIR-inside EQs generated via rePhase.
Didn't you mention something about extending PEQs to 10 in FIRs plugin?

@dspverden
Copy link
Collaborator

Is there a way to show how the FIR should look like? So what did you design and does Aurora reproduce that correctly.
Or send me your filter and I can verify here.
Regarding PEQs: Yes the GUI was telling 10 PEQs but SigmaStudio has set it to 8 when copying the block from 8channels to 4FIRs.

@mike811
Copy link
Author

mike811 commented Mar 15, 2022

Yes, the first picture with 2.1.4 shows my Woofer with linear phase close to zero. This was only tuned by rePhase EQs and should look like that ;-)

@dspverden
Copy link
Collaborator

ok, plz can you send me the text file you uploaded to aurora? I want to make sure that this is processed correctly.

@mike811
Copy link
Author

mike811 commented Mar 15, 2022

What ever caused this EQ thing, a new REW<->rePhase session shows good results and is fun to work with! Thanks Raphael.
Example:
Bildschirmfoto 2022-03-15 um 20 27 04

@mike811
Copy link
Author

mike811 commented Mar 15, 2022

You got mail.

@dspverden
Copy link
Collaborator

dspverden commented Mar 15, 2022

Yes saw it while I was typing here. Can I conclude from your previous post, that this issue is solved now?
Will have a look at your file anyway. Just to be sure with some files from outside of my lab.
Thanks for helping with debugging it.

@mike811
Copy link
Author

mike811 commented Mar 15, 2022

Yes this reversed coef thing is solved for me.

@MarsianCRaute
Copy link

Great! Can't wait to use FIR more often now

@mike811 mike811 closed this as completed Mar 15, 2022
@mike811 mike811 reopened this Mar 17, 2022
@mike811
Copy link
Author

mike811 commented Mar 17, 2022

Hello,
it seems there is still something going on with the FIR or EQ implementation.
After power up today I got this response measured:
Bildschirmfoto 2022-03-17 um 16 59 54

Only after reloading the coef file again I got the nice response from two days ago:
Bildschirmfoto 2022-03-17 um 17 09 04

So there seem to be something wrong with saving and reloading.

@dspverden
Copy link
Collaborator

I will verify this today evening.

@dspverden
Copy link
Collaborator

dspverden commented Mar 17, 2022

Hm, I cannot reproduce that here. Could it be that you did not press "Store Preset"?
Because in the IR file you have sent me, I see that you equalize the dip at 100. So the first picture looks a bit like no filter present at all. Btw. the file you have sent me does not fully match your result because I cannot see the LP behaviour in your measurement.
This is the file you have sent me:
test1
And this is what I measure after a reboot:
test2

P.S. I measured directly REW->Aurora->REW

@mike811
Copy link
Author

mike811 commented Mar 18, 2022

Hi,
sorry for the confusion. I can't reproduce it here either. You are probably right. Maybe I simply forgot to klick store preset when playing around last time...

@mike811 mike811 closed this as completed Mar 18, 2022
exislow added a commit to exislow/freeDSP-aurora that referenced this issue Mar 21, 2022
* freeDSP-master: (23 commits)
  Added argument check to release script
  Increased PEQ-Bands to 10 fpr 4FIRs plugin
  Fixed issue freeDSP#94 and freeDSP#106
  Fixed issue freeDSP#89
  Bash script for release deploying
  sigma2aurora.py accepts output directory
  Fixed wrong id syntax in sigma2aurora.py
  Fixed wrong AddOn header in GUI
  Updated README.md
  Fixed hostname
  Fix for issue freeDSP#105
  Custom DSP name
  Fixed issue freeDSP#107
  Fix for freeDSP#102
  Hide AddOn if needed
  Fixed SPDIF routing for Virtual Inputs
  Arrange PEQ bands in two rows
  Apple remote codes updated
  Fix relative link
  Make it clear esp32make is an alternative/experimental method
  ...

# Conflicts:
#	SOURCES/WEBAPP/ESP32/aurora/aurora.ino
#	SOURCES/WEBAPP/ESP32/aurora/hwconfig.h
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working work in progress Somebody is working on this issue
Projects
None yet
Development

No branches or pull requests

3 participants