Filter brewing for the Soekris R2R - Page 12 - diyAudio
Go Back   Home > Forums > Source & Line > Digital Line Level
Home Forums Rules Articles diyAudio Store Gallery Wiki Blogs Register Donations FAQ Calendar Search Today's Posts Mark Forums Read

Digital Line Level DACs, Digital Crossovers, Equalizers, etc.

Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools Search this Thread
Old 19th February 2015, 08:39 PM   #111
Sin Bin
 
Join Date: Jan 2002
No disrespect, but you bought this dac, right?

Clearly there are different levels and facets of DIY. Some may prefer not to design their own filters or might not have the ability. Some may prefer what appears for many to be a better solution.

Surely there is room in the dac implementation for plenty of DIY outside of the filters....though I applaud the efforts of those who are exploring that part of the dac.
  Reply With Quote
Old 19th February 2015, 08:56 PM   #112
leehan is offline leehan  United Kingdom
diyAudio Member
 
Join Date: Jun 2010
Location: Kent, UK
Quote:
Originally Posted by spzzzzkt View Post
No disrespect, but do you have any clue what the initials D I Y in the name of the forum means?
Do you have any clue about the diyaudio standards? Trying to police this thread in this manner will be tiring for you. Good luck.

Staying on topic:

1. What is AirFilter1?

2. How zero insertion upsampling limit our options about filters (necessary window size to achieve enough smoothing and allowable roll-off steepness, if this is relevant at all)?
  Reply With Quote
Old 19th February 2015, 10:46 PM   #113
diyAudio Member
 
Join Date: Feb 2009
Quote:
Originally Posted by spzzzzkt View Post
Returning to the topic at hand.

Just had the idea to try Soren's default filter coefficients to see how it behaved on the 0dBFS sine test file.

Code:
sox  0_16.wav -r 352.8k 0_16_Sok441.wav upsample 8 fir Soekris441FIR.txt vol 8
sox WARN vol: vol clipped 54830 samples; decrease volume?
sox WARN dither: dither clipped 49403 samples; decrease volume?
The command sequence changes the sampling rate of the file to 352.8k with the "-r" switch, up samples the input file x8, applies the FIR filter described in Soekris441FIR.txt (a rePhase .txt output file) and adjusts the amplitude by 8dB to correct for the amplitude loss of the upsampling process. This is about as close to the process Søren has described for the DAM1021 as I think we can get using SoX.

What leaps out is the large number of clipped sample being reported. If also occurs in the DAM1021 it would go a long way to explaining why the default filters - and some of the user generated filters sound "shouty" or harsh.


Attached is an image comparing the impulse peaks of the Stock 44.1 filter, the AirListen1 filter and the Apodizing filter I'd made. The Soekris441 and Apodize441 both result in clipped samples when used with SoX. Soekris441 results in 54830 clipped samples at the volume adjust stage, while Apodize441 results in 30 clipped samples.

Søren has commented that there is some kind of compensation for the filters to prevent over saturation but I'm not sure if will prevent clipping. I guess this is something we need to find out.
That is an interesting observation, i use this dac as a loopback dac always a few db down from 0db full scale and i never heard the problems the other guys heard. It sounds pretty similar used that way, no matter what filter i use, subtle differences, of course, but no shouting or so.
But since all modern masters are approaching full scale all the time, there might be problems with clipping. By the way, thanks for the hard work and research.
  Reply With Quote
Old 19th February 2015, 11:32 PM   #114
diyAudio Member
 
lehmanhill's Avatar
 
Join Date: Jan 2008
Location: Chelsea, Michigan
Quote:
Originally Posted by hop.sing View Post
That is an interesting observation.....But since all modern masters are approaching full scale all the time, there might be problems with clipping. By the way, thanks for the hard work and research.
I agree, this is a very interesting place to investigate. Thanks spzzzzkt (It's Paul, right?)

As for your earlier question, here is the link to John Swenson's posts. There are more links in Soren's "Reference DAC Module.." thread at post 1478, page 148.

Upsampling Impressions

I'm surprised by your comment that SoX uses zero insertion because John discussed how it "interpolated" between data points and made the steps smaller in post 11 of the thread above. Or maybe I am not understanding it correctly.

One other thought. Mr. Swenson talks about the windowed sinc filter as being "better" than complicated cascade filters. I'm still reading about the details of SoX, but I did find a "sinc" command with lots of options. Perhaps "Rephase" has it too. It might be an interesting filter to try if there is room in the FPGA.

Naturally, that should come after the clipping issue is resolved.

Thanks again for all your hard work. I'm learning a lot.

Jac
  Reply With Quote
Old 20th February 2015, 12:29 AM   #115
leehan is offline leehan  United Kingdom
diyAudio Member
 
Join Date: Jun 2010
Location: Kent, UK
Quote:
Originally Posted by lehmanhill View Post
Upsampling Impressions

I'm surprised by your comment that SoX uses zero insertion because John discussed how it "interpolated" between data points and made the steps smaller in post 11 of the thread above.
Post #51 is also interesting.

Quote:
For the wordy explanation, lets take the output of a basic DAC chip, without any digital or analog filtering you get a stairstep. Upsampling without the filter is just subdividing each of those stairsteps into smaller pieces, but keeping the same values. Lets say you have a sample at .5V level, 8X upsampling gives you 8 shorter samples all at the same .5V, you haven't changed anything.
This doesn't sound like zero insertion upsampling, but like carrying over the value of last sample until next one throughout inserted samples. The result should be like NOS at the original sample rate in effect. You don't get the benefits of upsampling with increased resolution by interpolation, but you shouldn't be introducing any imaging/alisasing effects in addition to that of the source neither.

Quote:
What you want is the upsampler to make a "guess" at filling in the intermediate values between the .5V sample and the next sample. The filter defines exactly how that is done. The human hearing system seems to be quite sensitive to exactly what that filter does, slight differences in that filter can make significant differences in what we hear.
Indeed, and I wonder if dam1031 architecture could help the filter by doing better than zero insertion (by repeating the the last known sample amplitude) and ease the burden on the filter for performing necessary smoothing/interpolation. This interpolation is an effect of low pass nature of the filter. So I think if the filter has to do less low passing, we would have a slower roll off, which I find better than steep roll off for realism.

Of course the best would be actually interpolating the samples on the hardware, but it may be too much to ask from the FPGA.

By the way, Paul, I'm listening to your 1021LPSRO441 for the last few days and finding it quite good. I could live with it. But the more I learn, the more I wonder about the means we could improve the sound quality by less intrusive filters (i.e., letting Soren the difficult job on the architecture )
  Reply With Quote
Old 20th February 2015, 01:40 AM   #116
diyAudio Member
 
lehmanhill's Avatar
 
Join Date: Jan 2008
Location: Chelsea, Michigan
Quote:
Originally Posted by leehan View Post
Indeed, and I wonder if dam1031 architecture could help the filter by doing better than zero insertion (by repeating the the last known sample amplitude) and ease the burden on the filter for performing necessary smoothing/interpolation.
I'm still a beginner here, but it seems like this should be possible. I would think that Soren needed to add the zeros in the upsampling process. The question of holding the value would seem to take more, but not too much more programing.

Quote:
Originally Posted by leehan View Post
Of course the best would be actually interpolating the samples on the hardware, but it may be too much to ask from the FPGA.
From what John Swenson said about windowed sinc filters and interpolation, I wonder if this is possible in SoX? That said, he also implied that these things take a lot of space, so it may not be possible in the FPGA.

I will try to read deeper into the SoX documentation and try to understand.

Jac
  Reply With Quote
Old 20th February 2015, 02:29 AM   #117
diyAudio Member
 
Join Date: May 2005
Location: Melbourne
Blog Entries: 1
Have a read of the information for the SoX "upsample" effect.

SoX

The key thing is "factor−1 zero-value samples are inserted between each pair of input samples"

It is entirely possible SoX uses other algorithms for resampling, but without reading the code I wouldn't know, and I'm not sufficiently curious about SoX to do so.

John's comments about cascaded filters is one that is commonly levelled at commercial chips. One example is the old SM5847 filter which was very well regarded for a long time - the signal passes through 4 separate FIR filters working in the audio band plus de-empahasis if needed. The DAM1021 has one main filter plus a second FIR filter which is used to clean up HF junk above 220kHz.

The cascaded filters are believed to cause signal degradation and the optimum solution is to have all filtering done in a single FIR filter.

rePhase uses a different but equally validmethod to generate the filters. Basically you specify the curve you want to achieve, then FFT analysis is used to determine the required filter co-efficents.

cheers
Paul
  Reply With Quote
Old 20th February 2015, 06:01 AM   #118
TNT is offline TNT  Sweden
diyAudio Member
 
Join Date: Apr 2003
Location: Sweden
Quote:
Originally Posted by leehan View Post
You don't get the benefits of upsampling with increased resolution by interpolation....
One can rest assure that this is not true. Interpolation has nothing to do with resolution whatsoever. Inserting a sample between two neighbors could at best change nothing in the derived, ideal, output but most probably introduce an estimation error which doesn't degrade "resolution" but introduces an error = distorsion. The little "wrinkles", probable distorsion as per above, introduced to the audible envelope by interpolation at upsampling cant be heard anyway. Upsampling is about reducing filter requirements by reshaping the energy of the alias spectrum and not for "envelop forming".

My experience is that a real high resolving system tends to sound soft as an initial impression, not "sharp".

//
  Reply With Quote
Old 20th February 2015, 08:09 AM   #119
zfe is offline zfe
diyAudio Member
 
Join Date: Dec 2014
Other patterns than inserting zeros for upsampling can always also be obtained form a zero-inseted version via a filter.
So you do nothing wrong by inserting zeros and it is easy to handle theoretically. If you start with some fancy upsampling algorithm both might no longer be true.
  Reply With Quote
Old 20th February 2015, 08:53 AM   #120
leehan is offline leehan  United Kingdom
diyAudio Member
 
Join Date: Jun 2010
Location: Kent, UK
Quote:
Originally Posted by zfe View Post
So you do nothing wrong by inserting zeros and it is easy to handle theoretically. If you start with some fancy upsampling algorithm both might no longer be true.
OK, good point.

Checked SoX source code and it does zero insertion upsampling, nothing fancy. So the results are comparable to that of dam1021.

TNT, you are right about interpolation & resolution. By "interpolation" in that sentence I meant the method described in the paragraph, which is actually not interpolation. Bad choice of term.
  Reply With Quote

Reply


Hide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Soekris 's DAC implementations Eldam Digital Line Level 1039 31st May 2017 11:23 AM
Sold: Soekris DAM1021 R2R DAC Eldam Swap Meet 6 6th February 2015 07:23 AM
24-bit R2R DAC using miltiple 16/18/20-bit R2R chips Marek Digital Source 21 1st April 2011 09:05 PM
project brewing in my head, challenging, but seem like a good way to try new concepts lemans23 Multi-Way 26 11th October 2005 12:29 PM


New To Site? Need Help?

All times are GMT. The time now is 02:45 AM.


vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Copyright ©1999-2017 diyAudio

Content Relevant URLs by vBSEO 3.3.2
Wiki