Filter brewing for the Soekris R2R

@Soren:
Speaking of "a single bi-quad", a question I always wanted to ask is, can you cascade several IIR bi-quad filders with the DAM?
As you want to use them for the crossover (+ potentially de-emphasis) this should be the case?
If so, how should the headers look like that they are used cascaded.

All Biquads are cascaded, kinda the only option....
 
Regarding IIR de-emphasis, here are some biquad coefficients that can be used in place of the original ones for better accuracy :

Code:
dam1021,352800,8,30,5,1
Deemphasis IIR, 352.8 Khz Samplerate, hiself f=5600 Hz, Q=0.485, gain=-10.1 dB
0.331085040573029
-0.577213330670734
0.251294171647457
1.85212451656979
-0.857290398119544

dam1021,384000,8,30,5,1
Deemphasis IIR, 384 Khz Samplerate, hiself f=5600 Hz, Q=0.485, gain=-10.1 dB
0.329617410213504
-0.581107678819127
0.255876017438852
1.86372441280949
-0.868110161642715

This is as close as I could get with a single biquad.
That said, it looks like variations do exist among CDs on how emphasis was implemented...
Still I think it is a good thing to be as close as possible to the theoretical formula :rolleyes:

Good work, thanks. I'll use those in the release filters....
 
Disabled Account
Joined 2005
What should be the difference between using the DAC Volume control and using different audio input files with scaled PCM sample values?
None I hope, but I have full control on the input files but no knowledge about the implementation details of the signal processing in the DAC.

Changing the volume, via differently scaled input files, I did (in real world) and it produced the described result as in

But OK I will try the volume controll tomorrw.

The DAC has a 28bit R2R ladder.

The filters are processed FIR1 -> Volume -> FIR2.

If the gain added at FIR1 is clipping audio data then using the volume control to shift the data by 2 or 4 bits will make no difference to clipping.

If the clipping is passing through FIR1 unclipped but then clipping in the R2R shifting the data by 4 bits/-24dB should eliminate the clipping.

That should identify if point where clipping occurs.

I'd test but I'm at work as it's monday morning.
 
The DAC has a 28bit R2R ladder.

The filters are processed FIR1 -> Volume -> FIR2.

If the gain added at FIR1 is clipping audio data then using the volume control to shift the data by 2 or 4 bits will make no difference to clipping.

If the clipping is passing through FIR1 unclipped but then clipping in the R2R shifting the data by 4 bits/-24dB should eliminate the clipping.

That should identify if point where clipping occurs.

I'd test but I'm at work as it's monday morning.

If you use the DAC volume control to compensate the multiplier the output is unclipped.
I tested for all FIR with one tap 1
1.) FIR1 multiplier 2 volume -6dB
2.) FIR1 multiplier 2, FIR2 multiplier 2 volume -12dB

That is to be what you could expect with 32bit fixed point arithmetic in the FPGA and a 28bit ladder. You might get clipping in the "computation" itself if you exaggerate with the multipliers.

P.S. I have the impression your answers get a bit ... hmm tense :rolleyes:
Please be aware that English is not my first language, I come from a different cultural background and I am not in engineering nor audio business.
I have no intensions to offend you.
 
Lets look at some nice pictures :)
All are from a full amplitude 11025kHz sinus signal 44.1kHz sample rate, measured at the SE-output of the DAM with an oscilloscope and 1MOhm probes. The oscilloscope settings are unchanged.

First all FIR taps set one 1. (so 2 times zero insertion only: at FIR1 and FIR2). Perhaps that should be called the bypass filter instead of "NOS".
Bypass.jpg

Second the NOS filter of pos (FIR1 and FIR2 8 taps 1)
NOS.jpg

And last the stock filter from Soren
fltr.jpg

Quite that what you (or at least I) would expect, except the much higher output level with the last two.
For an explanation of that lets have an amplified look at the first negative spike of the bypass filter (i.e. the raw output of the DAM)
SE1.jpg
SE2.jpg
The time of the, next to linear, negative, rise is 1/(64*44.1kHz) ... fine.
This is the typical diagram of charging (not to full applied voltage) an decharging a capacitor.
So the voltage pulse of the DAM is to short to charge the capacitor (C135) completely. Secondly the decharge time is considerably longer (due to the high resistive load). The other two filters continue "charging" and result in a higher output voltage.

As also modern preamps and amps have very high input resistance, the situation might there be similar.

Last picture, the bypass filter spike at the balanced output (other oscilloscope time base).
Balanced.jpg
You see that even the excellent op amp of the balanced output is not fast enough to reproduce the SE output spike.

I for myself think I will not torture my equipment with the Bypass or NOS filter.
 
Last edited:
Well , this is the NOS no-filter that other people likes.:rolleyes:

The correct filter NOS that people are asking, previously proposed by Soren. I think it's not right to put NOS filter: one sample and seven 0.

Are you talking about non oversampling mode ? That can easily be done, t.ex. for 44.1:

Enter 8x 1.00000 as filter coefficients, 8 taps and gain set to 1.

The 8 is for 8 times oversampling, use 4 and 2 for other oversampling rates,
just like the 352/384 bypass filters using 1.

Again, I don't recommend non oversampling, and you then need the compensating filter for the 3db loss at 20 khz.

With 11025 Khz. or 22.050 kHz. sinus see bad. With lower frequency signal is more nice. With audio signal the NOS output is more similar original audio. And one sample and seven 0 see bad, no similar to original audio.

I 'm not very interested NOS filter, if I have a good filter oversampling , without saturation or rounding errors. But they are people likes NOS without oversampling filter.

In case I use NOS, I prefer with an IIR filter that amplify the fall of 16 kHz due to rectangles reconstruction. (a sync in frequency). (3 dB. 20 Khz.)
 
Disabled Account
Joined 2005
Well , this is the NOS no-filter that other people likes.:rolleyes:

The correct filter NOS that people are asking, previously proposed by Soren. I think it's not right to put NOS filter: one sample and seven 0.



With 11025 Khz. or 22.050 kHz. sinus see bad. With lower frequency signal is more nice. With audio signal the NOS output is more similar original audio. And one sample and seven 0 see bad, no similar to original audio.

I 'm not very interested NOS filter, if I have a good filter oversampling , without saturation or rounding errors. But they are people likes NOS without oversampling filter.

In case I use NOS, I prefer with an IIR filter that amplify the fall of 16 kHz due to rectangles reconstruction. (a sync in frequency). (3 dB. 20 Khz.)

Thanks for posting up the quote from Søren, I couldn't find it when I looked.

From zfe's posts I can see the single coefficient is the main issue with the NOS filter I did. I'm not particularly interested in using NOS personally, and only gave the filters a cursory listen to ensure there wasn't obvious audible clipping.

I've been playing around using the Octave's least squares FIR algorithm to generate filter coefficients. The resulting filters are linear-phase and steep roll off but have very low levels of passband ripple and better stopband rejection than the default 44.1khz filters. I think they sound fairly good, but probably not much different to TNT's efforts.
 
Last edited:
I've not listened to the most recent (last two or three days) filters nor have I revisited the NOS files yet but, after trying the first nine or ten files on this thread, I am leaning to Paul's 1021SA1. Has excellent shimmer and sheen on cymbals, very good separation of instruments and very good detail. Background seems 'quieter/blacker' and voices have good microdynamics. Have to go back and listen to other DAC and filters again to confirm but only caveat is a nagging thought that there's a touch of darkness (small lack of warmth, maybe?) on voices and midrange. But I could live with this filter....

Subject to correction the 1021SA1 was posted on another thread I think but what are it's 'characteristics', Paul? i.e what were you trying? (Save me wading through the other thread, please.)

Might be an idea too, to repost it and 1021SA2F2v1 in this thread (if it indeed was not) just to consolidate the filters here.
 
Disabled Account
Joined 2005
I've not listened to the most recent (last two or three days) filters nor have I revisited the NOS files yet but, after trying the first nine or ten files on this thread, I am leaning to Paul's 1021SA1. Has excellent shimmer and sheen on cymbals, very good separation of instruments and very good detail. Background seems 'quieter/blacker' and voices have good microdynamics. Have to go back and listen to other DAC and filters again to confirm but only caveat is a nagging thought that there's a touch of darkness (small lack of warmth, maybe?) on voices and midrange. But I could live with this filter....

Subject to correction the 1021SA1 was posted on another thread I think but what are it's 'characteristics', Paul? i.e what were you trying? (Save me wading through the other thread, please.)

Might be an idea too, to repost it and 1021SA2F2v1 in this thread (if it indeed was not) just to consolidate the filters here.

Good question! I think that was an attempt at a steep roll-off apodizing style filter. The SA was "super adopizing" but the filter was made with linear phase so doesn't have the minimum phase characteristic that Peter Craven used in his apodizing filters. So effectively it's only "sort of" apodizing. The idea was to have the filter -100dB at 21-21.5kHz, but this had the effect of rolling off gently down to 10kHz. I was trying to ensure that this filter eliminated the effect of any other filters, but it softens off the mids in the process. v2 changed the filter corner so the filter was down -80 or -100dB at near to 22050 so there was less impact on the mid-range. The F2 variant had a modified FIR2 with gentle roll-off.

I quite like these filters as they seem to recover more of the room ambience - but this may well be a side effect of the pre-ringing.
 

Attachments

  • 1021SA1.skr.zip
    4.8 KB · Views: 122
  • 1021SA2F2v1.skr.zip
    6.8 KB · Views: 112
  • 1021filtSuperApo.txt
    59.8 KB · Views: 117
  • 1021filtApo_SRFinal.txt
    45.5 KB · Views: 113
Last edited:
Good question! I think that was an attempt at a steep roll-off apodizing style filter. The SA was "super adopizing" but the filter was made with linear phase so doesn't have the minimum phase characteristic that Peter Craven used in his apodizing filters. So effectively it's only "sort of" apodizing. The idea was to have the filter -100dB at 21-21.5kHz, but this had the effect of rolling off gently down to 10kHz. I was trying to ensure that this filter eliminated the effect of any other filters, but it softens off the mids in the process. v2 changed the filter corner so the filter was down -80 or -100dB at near to 22050 so there was less impact on the mid-range. The F2 variant had a modified FIR2 with gentle roll-off.

I quite like these filters as they seem to recover more of the room ambience - but this may well be a side effect of the pre-ringing.

Thanks for the explanation - it helps to get an explanation of what the filter is intended to do and correlate it to what you hear. Who knows, it may lead to a consensus - although that's not likely!

Reading your reply gives me the impression there was SA1, a v2 of SA1 and then SA2 - i.e, three filters? If that's so, could you post SA1v2?

And yes, there's an ease and naturalness to SA1 - I slightly preferred it to SA2F2 although I need to listen to F2 again. It also has good PRAT.
 
Disabled Account
Joined 2005
Thanks for the explanation - it helps to get an explanation of what the filter is intended to do and correlate it to what you hear. Who knows, it may lead to a consensus - although that's not likely!

Reading your reply gives me the impression there was SA1, a v2 of SA1 and then SA2 - i.e, three filters? If that's so, could you post SA1v2?

And yes, there's an ease and naturalness to SA1 - I slightly preferred it to SA2F2 although I need to listen to F2 again. It also has good PRAT.

Sorry v2 was same as SA2. The other thing about the first version is that it was partly an experiment in convolving a 507 tap FIR filter with itself. This improved some aspects - such as lowering the level of the stop band, but also reduced the steepness of the rolloff - which might be considered a benefit. The process also increased the pass band ripple.

Current filter I'm listening to has a 0-19kHz Passband and stop band starting at 22kHz. This version has two identical filters convolved together. There is some low level ripple in the passband but is 0.03dB p-p in the worst case, and less than 0.01dB p-p at 10kHz.
 

Attachments

  • 1021filtLS19_22_c2.skr.zip
    7.6 KB · Views: 96
  • 19_22fqc2.jpg
    19_22fqc2.jpg
    122.3 KB · Views: 998
One thing to keep in mind while filter testing, is that if you use the DAM volume control you probably will not hear if the filter induces clipping (which might be a problem for the DAM-preamp people).
One asset of the NOS (8x tap 1, gain 1) is that it can not induce clipping, combined with not beeing more silent, maybe therefore some people like it.
I e.g. like the attenuated stock soekris filter (and then compensated by the preamp) definitely much more than the unattenuated version.