Filter brewing for the Soekris R2R

Just to close zero insertion or not:

There is a very good reason everybody is using zero insertion when upsampling.... A FIR filter is basically a large number of multiple add operation, and with each zero you can save a operation as zero multiplied by something is zero. So t.ex. upsampling from 44.1K to 352.8K is 1 input data and 7 zeroes inserted for each sample, if using something else than zero insertion you would need 8 times as many multiple add operation, cutting down on your filter length (number of taps)....
 
Maybe this is an over simplification, but when people are reporting harshness with NOS filter it is during loud loud and intense passages. Couldn't this be due to the natural presentation of the music? When I am at a concert and music intensity increases so does distortion of instruments and stage gear, and sometimes it sounds very harsh. But that is the real tone of the music! I like NOS because it reveals tone signatures, good and bad.
To ask another way- do filters have a "soft-clipping" function?
 

TNT

Member
Joined 2003
Paid Member
In concert, close to the stage I think the ears can be distorted due to aboslute level. At playback, if the sound is hars at moderate levels its either the recording or the playback systen that is a fault. Ear distortion is not the reason in this case. Mic and recording equipment today has really low distorsion, even at very high sound pressur so on modern, well made recordings this "should" not be a problem. Remains the playback gear.

//
 
Disabled Account
Joined 2005
I
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


sinc is a mathematically ideal lowpass filter with vertical cutoff and no ringing.

The equation is sinc = sin(pi * x)/(pi * x) which when plotted looks like:

attachment.php


You should recognise the shape of the impulse from all the linear phase filters that have been posted to this thread.

While sinc is an ideal low pass filter, the ripples to each side continue to infinity. This is a problem when you have a limited number of poles/taps available. The DAM1021 can use 1016 taps/poles for 44.1 filters. If you simply truncate the ripples you get high levels of distortion.

This issue is addressed by applying a windowing function to the sinc filter.

Interpolation is a result of applying a low pass filter to the data.

There is a very good explanation of windowed-sinc here:
Strategy of the Windowed-Sinc
http://www.dspguide.com/CH16.PDF

All of this is basic DSP, so don't fall into the trap of thinking that SoX some magical piece of software simply because it has a celebrity endorsement.

cheers
Paul
 

Attachments

  • sinc.jpg
    sinc.jpg
    66.3 KB · Views: 1,447
Last edited:
Disabled Account
Joined 2005
In concert, close to the stage I think the ears can be distorted due to aboslute level. At playback, if the sound is hars at moderate levels its either the recording or the playback systen that is a fault. Ear distortion is not the reason in this case. Mic and recording equipment today has really low distorsion, even at very high sound pressur so on modern, well made recordings this "should" not be a problem. Remains the playback gear.

//

There was a fantastic free SACD produced by DPA Microphones around 2008 called "Miking a Grand Piano". It's intended to demonstrate different mic configurations, and has 8 or 9 tracks of the each performance captured with different setups. Because the recordings are intended to illustrate mic and array performance there is no additional effects or production applied. The music is not the most thrilling stuff you've ever listened to, but it is a very useful reference for judging system performance if you can track it down.

DAD - News Miking a Grand Piano - a Super Audio CD by DPA Microphones

I really need to find someone who can rip the SACD layer...
 

TNT

Member
Joined 2003
Paid Member
Interesting. I can not play SACD. My Philips SACD1000 broke which was a pity because it soundes really nice. So hopefully the DAM can do it. We need a solution to rip the SACD layer. Those Playstations are hard to get hold of I suppose.

Fortunantly there are really clean recordings, even on red book 44,1. I hope to be able to produce some own recordings this year using Acko's ESS based A/D board.

MB2b and DAM on battery is producing the cleanest I have heard the DAM yet. Time to reveal the filters..

//
 

TNT

Member
Joined 2003
Paid Member
I took the previosly posted MB2 filter and made the follwing modification to the text file. *No* change made in the generated coefficients!

(-- signature, samplerate, interpolationrate, type, numbercoefficients, multiplier)

MB2a: dam1021,44100,8,1,1016,7
MB2b: dam1021,44100,2,1,1016,1


MB2a: 7/8ths will create rounding error in estimating the levels of each sample but if there where clipping in the filter they should be gone. Almost full output level.

MB2b: Just 2x oversampling and no gian multiplication so no rounding errors. 6 dB down?

Thinking of a MB2c: 8x OS, mult=4. 6 dB down? Noise spreading and no rounding errors. I will post it.

//
 
Last edited:
Here is an Intermediate Phase filter. Wanted to target the character of most natural sounding 030 sample in post #49 at Mastering Captured Vinyl For CD - Hydrogenaudio Forums (where they make the effects of filter phases quite noticeable by bringing the stop band into 4kHz).

Adjustments are made by visuals and listening without measurements, so I may well be very far off it. But I like the sound listening to it in the past few hours. My intention is to have a satisfactory filter on dam1021 for a variety of genres so that I don't bother with changing filter presets.

Filter is steep, stops at around -60db Nyquist according to rePhase. Pre-ringing is negligible, but helped reducing post-ringing amplitude. Arcam FMJ D33's Filter 1 helped settling on these values.

I used blackman-nuttall windowing and adjusted centering for IP in rePhase after Pos' suggestions in vendor thread.

Attached are two versions of the filter (0db and -6db against possible clipping for those who don't have volume control) and the mandatory specs charts.

I couldn't plot a nice impulse response in REW, and Holm doesn't seem to support sample rates higher than 192kHz. Attached impulse responses are drawn in ClickPlot from the text output and in Audacity from wav output.

Any suggestions for achieving an accurate 30% IP and lowering the noise floor without adding further ringing are very welcome.

I can post rePhase file if anybody is interested.

Cheers.
 

Attachments

  • Impulse1.png
    Impulse1.png
    41.8 KB · Views: 532
  • Impulse2.png
    Impulse2.png
    73 KB · Views: 526
  • Frequency.png
    Frequency.png
    13.3 KB · Views: 530
  • 1021IPv1.zip
    11.5 KB · Views: 116
Disabled Account
Joined 2005
Disabled Account
Joined 2005
Unfortunately that track seems to download as a 44.1/16 rip. It also appears to have been heavily processed. There is extensive pre-echo at the start, and the track has been time shifted so only runs for 32 seconds instead of the original 52 seconds.

Do you get different version if you are a member?

I've added a link to a copy of the entire redbook layer in .flac format in the first post. I'll leave it up for a few days.
 

TNT

Member
Joined 2003
Paid Member
So the MB2c did not sound god for me. The 1021IPv16dB has that irritating digital hash top that I get a headake from.

MB2b is so far most natural and ear relaxing tone achived from the DAM. Judged over headphones running on batteries.

I strongly reccomend a listen to MB2b and I'm curious of your experiance.

//
 
All of this is basic DSP, so don't fall into the trap of thinking that SoX some magical piece of software simply because it has a celebrity endorsement.

cheers
Paul

Paul,

Thanks for this post. It is helpful to me in learning and following the thread. As for falling in the celebrity trap, I agree it is something to guard against. I'm not enamoured of SoX or John Swenson. It's just that John is one of the few respected Dac designers (present company excluded) that is talking about his filter designs and process, so I was hoping to learn something. Of course, one still has to sort through the techno-babble marketing talk.


Here is an Intermediate Phase filter.

But I like the sound listening to it in the past few hours.

Filter is steep, stops at around -60db Nyquist according to rePhase. Pre-ringing is negligible, but helped reducing post-ringing amplitude. Arcam FMJ D33's Filter 1 helped settling on these values.

I can post rePhase file if anybody is interested.

Cheers.

Leehan, please document the filter. I have just ordered my DAM board, but I hope to try a range of filter approaches when I get up and running. It sounds interesting.

Not to put John Swenson on a pedestal, but it seems he is doing something similar on the Bottlehead Dac. From the Bottlehead site:

"As to buzz words, my own reconstruction filter is an FIR with about 1200 taps. At 44.1 (or 48) input it is an 8X upsampling filter. The FIR is implemented with a single 52 bit MAC running a loop going through the coefficients and intermediate results. This loop runs at 96MHz no matter what the sample rate.

The filter is intermediate phase. A linear phase filter has equal amounts of pre and post ringing but fairly short amount of time in each. The minimum phase has no pre ringing, but in order to get the same over all similar functionality it has to have a much longer amount of post ringing. The intermediate phase splits the difference and has a small amount of pre ringing and post ringing that is a little bit longer than linear phase but much less than minimum phase. This is also deliberately a short filter. That means the amount of time it spends ringing is a very short amount of time compared to other filters. The tradeoff is that the ultimate amount of alias reduction is only about 80db, whereas those in modern DAC chips are going to 130 db or more. This is the tradeoff I mentioned, by not aiming for nearly as much ultimate image rejection I get a filter that sounds much better."

In comparison to Leehan's filter, his Dac uses an FPGA like the DAM, the filter uses a similar number of taps, similar stopband level, intermediate phase, the only strange thing is that Swenson's filter is stated as running at 96 MHz for all sampling rates. I'm guessing that is a typo, but even if it should be 96k it is still a bit different in a dac that upsamples to 352k or 384k to avoid the chip filters.

I promise from here forward to stop bringing up John Swenson and his filters.

Thanks in advance for the education.

Jac
 
The 1021IPv16dB has that irritating digital hash top that I get a headake from.

Thank you for testing. Apparently you have wide bandwidth headphones and very to sensitive high frequencies. This makes you a desirable tester :) I would not be surprised with your sensitivity because an amazing feature of our brains when processing audio signals is that neurons work at the same rate as the frequency of the signal heard. If you are hearing a 400Hz signal, than you neorons are firing 400 times a second. This isn't the case for other sensory system. And it looks like our brains expect a certain harmonic content in the audio signal for pattern matching. May be if this isn't happening because of high frequency DA conversion artifacts, you may be running your pattern matching engine at a too high rate :)

The fact that you are more comfortable with 2x upsampling and no multiplier correlates with this. I'll test MB2b this weekend and try lower upsampling and no multiplier with my filter as well.

zfe highlighted a very good point in the vendor thread regarding loss of bits because of the multiplier used. I'm not sure how that may contribute to unwanted artifacts (even if it does, it may be out of audible range because of high sample rate).

Another issue with evaluating filters is that, new type of filters are different sounding to us then those we are used to. LP filters for me are too familiar, and kind of boring. I like the excitement of MPs and IPs at the moment but we'll see how long that will last. I remember reading somewhere that people who only listened to MP3 format didn't like the sound of lossless audio initially in a test (may not be a scientific one).

Cheers.