Filter brewing for the Soekris R2R

Disabled Account
Joined 2005
rePhase file attached.


IP filter you mentioned has similar tradeoff (higher stopband floor). I hope somebody actually tests this for image attenuation and other criteria. I don't have any means to do so and time to set up one at the moment.

rePhase file doesn't appear to be attached?

If you want to visualise the effect of the filter you can use SoX to do so. It won't be exactly what you'd get from the output of the DAM1021 but still better than nothing.

The way I've been doing it is:

Code:
sox  /path/to/input.wav -r 352.8k /path/to/output.wav vol 8 upsample 8 fir /path/to/firfilter.txt

If you see clipping errors reported, drop the vol setting by 0.1, rinse and repeat, until you get no errors.

The output file will be up sampled to 352.8k have the selected fir filter applied. You can then open up with Audacity, Baudline or your preferred spectrum analyser and see the result. Anything you see above Fs/2 is a mirror image.

On OS X you can drag files into the terminal to insert the file path which makes a bit easier.

If you want to see what filter curves SoX is outputting with various the guru tweak settings grab a short - 3 seconds is heaps - .wav containing white noise. Google should turn up a few sites that have online test file generators, these are fine for the task.

Code:
sox /path/to/input.wav /path/to/output.wav gain -h 0.1 rate -m -I -b 90 -p 28 352.8k

The gain -h 0.1" setting provides 0.1dB headroom for any following effects, and might need to be adjusted to avoid clipped samples.

"rate" is used to upsample, interpolate and dither. Settings in this case are those posted by John Swenson in a thread linked earlier:
-m medium quality
-I Intermediate phase
-b bandwidth as a percentage of nyquist or fs/2 (= 19845 Hz for 22050Hz)
-p phase setting, 0=minimum, 50 = linear-phase. 28 is a intermediate phase, slightly biased toward linear-phase.
352.8k = target sampling rate.

You can then analyse the filtered file and get fairly accurate idea of the filter curve. Don't pay too much attention to the absolute dB values - look at the values relative to the passband. Not sure how you recover the phase information.

Screenshot attached.

It's a bit difficult for me to do any serious listening over the weekend, so will try to test the posted filters Monday.
 

Attachments

  • SwensonSoxWN.png
    SwensonSoxWN.png
    63.9 KB · Views: 566
Last edited:
Paul,

That's very helpful information, many thanks!

Missing rePhase file in post #141 attached.

One of your new links in the first post helped me understand what REW impulse plot is about, it's in dBs!

So I'm attaching that version of the impulse response as well. I aimed a 30% IP. If this calculation is in decibels, I hit the mark at 26% (bottom of the ripples is about -69.5 dB).

I will work with the filter again after analysing it with your SoX method, probably next weekend.

Cheers.
 

Attachments

  • IP.rephase.zip
    1.1 KB · Views: 92
  • Impulse3.png
    Impulse3.png
    23.2 KB · Views: 579
OK, a post explaining my interest in IP filters.

3. Duration of ringing is affected by the steepness of the roll-off curve. Longer durations affect items 1 and 2, and also transients negatively (3). A slow-roll off is desirable for shorter ringing. But as everybody knows DA artifacts also need to be attenuated.

Hence my preference of IP for 44.1kHz as an optimization between pre and post ringing given the necessary roll-off steepness.
(

Like you, I am philosophically aligned with IP filters. Haven't had a chance to listen to them yet.

I may be misunderstanding this, but I believe that the number of taps also affects both the length of ringing and the level of the stopband. You might be able to trade-off filter length and slope.

Keep up the good work.
 
Disabled Account
Joined 2005
Paul,

That's very helpful information, many thanks!

Missing rePhase file in post #141 attached.

One of your new links in the first post helped me understand what REW impulse plot is about, it's in dBs!

So I'm attaching that version of the impulse response as well. I aimed a 30% IP. If this calculation is in decibels, I hit the mark at 26% (bottom of the ripples is about -69.5 dB).

I will work with the filter again after analysing it with your SoX method, probably next weekend.

Cheers.

Change centring to "Middle".

Red is centering = middle
Blue is centering = 35%

Slightly more pre/post ringing but a massive improvement in stop band rejection at Nyquist. There is about 1.5dB less roll-off at 20kHz using the "middle" setting.

I've added a couple of zoomed plots showing the difference at 20kHz and 22kHz. You can see the reduction of roll off at 20kHz mentioned above and 10+dB improvement in rejection at 22kHz resulting from this single change in configuration.
 

Attachments

  • MiddleV35_FR.png
    MiddleV35_FR.png
    38.1 KB · Views: 561
  • MiddleV35_IR.png
    MiddleV35_IR.png
    40.3 KB · Views: 569
  • Leehan22K.png
    Leehan22K.png
    36 KB · Views: 208
  • leehan20kRO.png
    leehan20kRO.png
    40.4 KB · Views: 540
Last edited:
Reduces ringing length and amplitude as well... hmm. We need Pos to to explain why he recommended intermediate centering values for IPs. Pos, where are you?

That said, I'd be already happy with original roll-off, better than I expected.

I'll try this version as soon as possible. And proceed with porting it to higher sample rates.

Regarding porting to higher sample rates, I find www.auralic.com/download/flexible_filter_mode.pdf filter parameters tables a good starting point.

Thank you.
 
Hi there.
Have tried different filters and I am in the process of "filter brewing" myself.
Feel free to try.

Notice: Fairly new to this but I think it sounds good.
However with some of these filters the difference in sound is quite marginal.

Impulse response is done with audacity.

The 22.050khz is down at -80db or so. A minimal phase combined with linear. Little faceshift in the 2-5khz region.
We are down -1db at 20khz.

The .rephase file, .txt and .skr are in the zip..

Hopefully I am doing this right?

EDIT: Looks like it is somewhat similar to leehans IP filter
http://www.diyaudio.com/forums/digi...ilter-brewing-soekris-r2r-14.html#post4231740

Havent tried that one yet.

Best regards
 

Attachments

  • impulse.PNG
    impulse.PNG
    9.6 KB · Views: 607
  • rephase.PNG
    rephase.PNG
    66.7 KB · Views: 618
  • 4thtry_combined.zip
    22.8 KB · Views: 117
  • rephase2.PNG
    rephase2.PNG
    76.3 KB · Views: 611
Last edited:
I tried all filters. The best sounding in my opinion is 1021MinPhaseSlowrev1.skr of spzzzzkt. And also those measures i has made are best.

But there is a problem with the measures. All filters of 44,100, 88, ... 352 have noise, saturation, rounding....?
I see in all measures i made, 1k, jitter j-Test, or 19 kHz. -12 DB + 20 khz. -12 dB.
So I gather that is 352 F2 filter problem.
This problem does not occur in 48, .... 384 kHz. measures.

Spzzzzkt please could you design a filter F2 352 kHz. with similar characteristics to 1021MinPhaseSlowrev1 44,100?
 

Attachments

  • 19-20-44.jpg
    19-20-44.jpg
    122.5 KB · Views: 602
  • 19-20-88.jpg
    19-20-88.jpg
    98.7 KB · Views: 596
  • 19-20-352.jpg
    19-20-352.jpg
    107.9 KB · Views: 222
  • 19-20-48.jpg
    19-20-48.jpg
    102.9 KB · Views: 202
  • 19-20-96.jpg
    19-20-96.jpg
    95.2 KB · Views: 198
  • 19-20-384.jpg
    19-20-384.jpg
    96.7 KB · Views: 198
Disabled Account
Joined 2005
oneoclock,

I did have a play with the fir2 filters and I think there is some room for improvement. While they are well above audio, I'm not sure what the point of -0.1dB at 100kHz and -80dB at 220kHz.

I need to check the interaction between the fir1 filters before I post anything up.


In the interim I'm going to post this up TNT-style because I suspect there is a bit of expectation bias happening. This is slightly different approach to what I've posted up so I'd be interested to hear any comments.
 

Attachments

  • 1021SA1.skr.zip
    4.8 KB · Views: 110
Disabled Account
Joined 2005
This is revision of the previous filter. The passband and stop band frequencies have been adjusted slightly. +/- 250Hz or so...

The big change is in FIR2 ( yes, yes, the Norse gods were angered - Thor was making a huge racket outside when I made these changes... ). Your DAM many well disappear into a small black hole, never to be seen again if you install this...

That said, I've changed the passband to 0 - 60kHz, and the stop band starts at 100kHz. TNT will probably complain about the roll-off be I'm sure less bat-eared listeners will be less offended.

cheers
Paul
 

Attachments

  • 1021SA2F2v1.skr.zip
    6.8 KB · Views: 113
  • FIR2mods.png
    FIR2mods.png
    67 KB · Views: 278