Filter brewing for the Soekris R2R

Auditioning now. Thanks for the changelog.

I put together two quick scripts for auditioning. Execute "./filter.sh F4|F5|F6|F7" or "./audition.sh 30". The latter changes to random filters every 30 seconds (or whatever else you specify). It implements some very basic level matching.

These require the dam1021 Python library to be installed: GitHub - fortaa/dam1021: Python inferface for the dam1021 DAC

filter.sh
Code:
#!/bin/bash

case $1 in
"F4")
	FILTER=linear
	VOLUME=0
	;;
"F5")
	FILTER=mixed
	VOLUME=0
	;;
"F6")
	FILTER=minimum
	VOLUME=-9
	;;
"F7")
	FILTER=soft
	VOLUME=-9
	;;
esac

python .local/lib/python2.7/site-packages/dam1021.py -l -60
python .local/lib/python2.7/site-packages/dam1021.py -f $FILTER
python .local/lib/python2.7/site-packages/dam1021.py -l $VOLUME

audition.sh
Code:
#!/bin/bash

WAIT="${1:-30}"

while true; do
	FILTER=F$((4 + $RANDOM % 4))
	echo "--- $FILTER for $WAIT seconds"
	./filter.sh $FILTER
	sleep $WAIT
done
 
Yesterday I was overthinking for those scripts. Here is a simplified version that does not depend on the dam1021 Python library:

filter.sh
Code:
#!/bin/bash

DEVICE=/dev/serial0

case $1 in
"F4")
	FILTER=linear
	VOLUME=0
	;;
"F5")
	FILTER=mixed
	VOLUME=0
	;;
"F6")
	FILTER=minimum
	VOLUME=-10
	;;
"F7")
	FILTER=soft
	VOLUME=-10
	;;
*)
	echo "Please specify a valid filter F4, F5, F6 or F7."
	exit 1
esac

echo "V-60" > $DEVICE
echo "$FILTER" > $DEVICE
echo "V$VOLUME" > $DEVICE

Initial listening impressions:

- I can't really hear a difference between F4<>F5 and F6<>F7.

- Between both groups there is a difference in soundstage. Slight, but observable when switching between filters. I can't find the exact words. F4/F5 seem somewhat leaner. Compared to F6/F7 the latter seems a bit more "in the action" and F4/F5 observing from a few steps back.

So multiple people have been writing here about @gumisb's filters. Other than the gain and level matching, what are your thoughts?
 
Yes, there is difference in roll off in FIR2 stage between groups. It’s small but has influence on perceived sound stage. I’m on headphones and I prefer some distance/deep of soundstage. Difference are so small that can be difficult to notice. It’s like interconnect cable rolling if someone try this 😊 .
So what we are comparing . The frame is anti-aliasing/imaging IIR cascaded filter with matching all pass filter – it’s the most significant element with biggest influence on sound that differs my filters from others. IIR filter is common for all filters. In first group we can compare NOS vs smoothed newNOS which is moving average filter (no interpolation vs interpolated up sampling). In second group C128dp which is classic sinc filter vs again NOS.
 
F4 and F7 FIR1 filters are identical NOS with one multiplication so unchanged but lowered. C128dp is sinc filter but very short one so limited bandwidth is used for reconstruction. We can compare upsampling with limited bandwidth reconstruction vs original non modified. Both then are slightly modified by FIR2 stage which is NewNOS with 8 multiplication for gain recovery. That has influence on sound but smaller (can be compared F4 vs F7 if level matched as you done). This is for sure not original environment for C128dp filter but without imaging problem comparison by audition should be easier.

Better is the one you like more :)
 
That would explain some of my problems. I assume that even with stable externally reclocked signal problem still occur(can't be eliminated) and the only way to be corrected is by code change in firmware?

The more stable your clock originally is the better. But from our understanding the DAC overcorrects and thus oscillates quite significantly around the target frequency.
 
I have a very basic question, because they have been working on the filters for 5 years now (unfortunately I'm only reading at #1000): What is the advantage of the DAM and its filters over a pure purist and completely filterless NOS DAC hardware solution, using only a PC as a source that can flexibly upsample and filter at a higher level (and in one step!)?
 
Last edited:

TNT

Member
Joined 2003
Paid Member
One will always have an image at 22,05->44,1. No way out of that. If one leaves that unfiltered, it will cast information backwards into the audible range and create information that was not in the recording - a.k.a distorsion and as "predicted" by the sampling theorem. Quite a few like this addition or cant hear it, it seems like. The DAM filter function enables the possibility for adequate filtering of the 22,05->44,1 range. Personally I don't see that as an advantage but a necessity for correct conversion. You can skip FIR1 by upsampling 8 times (->384 ksps) but cant avoid FIR2 (->3M) which is yet 8 times upsampling in the DAM.

//
 
Yes. But you can also, among other things, e.g. adjust the bandwidth better (if the sound engineer didn't do it correctly - I don't know the specific. limits of the firmware which is limited to 1016 taps), so that there is no level at fs/2, etc..

No limit in taps and hardware side can turn out much more precise and simple.
 
Yes. But you can also, among other things, e.g. adjust the bandwidth better (if the sound engineer didn't do it correctly - I don't know the specific. limits of the firmware which is limited to 1016 taps), so that there is no level at fs/2, etc..

No limit in taps and hardware side can turn out much more precise and simple.
With very light player or CD transport, you do not up-sample in real-time with fancy filter. So doing it inside the DAC is the only solution, keep in mind that most dac do not even provide this ability.

If you do not like what produced a sound engineer, the best is to use pro-audio software and Eq to adapt to your taste and rebuild once what you want. But you will not do magic as once the information is lost it is lost forever. (Unless you plan to have MQA magic up sample).

Latest firmware have a limit of 4K taps and not 1K as you said.

Up-sampling is adding noise, good noise is what you like or bad noise is what you find not good.
 

TNT

Member
Joined 2003
Paid Member
The latest firmware supports 4k taps for FIR1 44,1 and you are free to load whatever filter you like within the limits of number of taps and Fs I suppose.. It will be tiresome to change filters for every CD record ;-)

More taps can indeed increase precision but if it is "simpler" I don't know :)

//
 
With very light player or CD transport, you do not up-sample in real-time with fancy filter. So doing it inside the DAC is the only solution, keep in mind that most dac do not even provide this ability.
I am talking about PC audio.

If you do not like what produced a sound engineer, the best is to use pro-audio software and Eq to adapt to your taste and rebuild once what you want. But you will not do magic as once the information is lost it is lost forever. (Unless you plan to have MQA magic up sample).
I am talking about a single example and if you can hear ringing at fs/2 or not. A basic parameter of filters.

Latest firmware have a limit of 4K taps and not 1K as you said.
Thank you. At #1000 there are still 1k ;)

Up-sampling is adding noise, good noise is what you like or bad noise is what you find not good.
Upsampling or oversampling is noise-adding... :confused:
 
New IIR anti-aliasing/NOS upsampling filters set for evaluation

What’s new

- Filters are divided into two groups F4,F5 with gain ca.-10dB and F6,F7 with gain ca.-1dB if we compare to stock firmware. (Increasing gain by V+ command above 0 introduce clipping on both groups, so better stay below or at 0dB.) So this is important to pay attention when changing filters.
- F4 filter is new stack of NOS and smoothed NOS evolution filter introduced earlier as F5 filter, now used as FIR2.
- F5 filter is “my classic” stack. (only at 44.1/48kHz)
- F6 filter is C128dp as FIR1 and NewNOS as FIR2 stack (only at 44.1/48kHz)
- F7 filter is previous NOS/NewNOS stack called by @roderickvd NewNOS++.
- All input frequency over 44.1/48kHz are served on FIR1 stage by gain matched NOS filters, identical no matter what filter was chosen, final gain will differ and FIR2 filter according to group.
- New IIR all pass filter tuned differently. Should match most expectations but we will see.

Good job. Finally, equalization of the volume levels between 44.1 and 48.
Bravo!