Filter brewing for the Soekris R2R - Page 37 - 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 11th March 2015, 09:58 PM   #361
diyAudio Member
 
oneoclock's Avatar
 
Join Date: Oct 2010
This filter can be improved by multiplying by 8 all coefficients and leaving multiplier 1 This employs more FIR coefficients above e-9.

Good filter. The scene is big. It measures well in distortion.

I like 1021MinPhaseSlow rev1. but It could be one of the final filters collection.
With totalCRaP ™DAM1021 sounds great.
  Reply With Quote
Old 11th March 2015, 10:17 PM   #362
zfe is offline zfe
diyAudio Member
 
Join Date: Dec 2014
Quote:
Originally Posted by oneoclock View Post
This filter can be improved by multiplying by 8 all coefficients and leaving multiplier 1 This employs more FIR coefficients above e-9
No you will gain nothing. If you read Soekris post agian, you will see that he mutiplies the coefficients with the multiplier as floats and then converts in fixed points for the FPGA.
  Reply With Quote
Old 12th March 2015, 01:14 AM   #363
diyAudio Member
 
Join Date: Feb 2015
totalCRaP™ sounds fantastic on Little Dot MK9+HD800, best filter I heard so far, not too bright either but its possible the tubes are helping soften things up a bit. Nice flat response.

Cheers for the great work spzzzzkt, and certainly another one for the final filters list.
  Reply With Quote
Old 12th March 2015, 06:44 AM   #364
diyAudio Member
 
Join Date: May 2005
Location: Melbourne
Blog Entries: 1
Default totalCRaP™ take two

OK this is the same FIR1 filters, but FIR2 has been changed.

I had a think about this after zfe's post in the vendor forum.
My feeling is that FIR1 should take care of aliasing for the first round of oversampling, and FIR2 should remove imaging for the final upsample.

If we remove imaging in FIR1 above 40kHz as the worst case, then the lowest frequency the mirrored image will extend to is 352.8-40 = 312.8kHz. There shouldn't be reason to attempt a steep cutoff before 176.4kHz.

To test the theory I've made a FIR2 filter that rolls off gently from around 30kHz and is -150dB by 275kHz. I'm not sure it makes a huge difference, but there is minimal ringing here.

Interested to hear opinions.



As a digression this what I'm using to create filters at the moment
It is pretty rough but it works. It's needs Octave installed to use and requires manual editing of the script file to alter parameters.
You need to load the Octave signal package for it to work.


Code:
# Test script for creating FIR files in Octave
#  v0.001a  21FEB2015

conv_count = 1;
nb = 95;
#fs = 352800;
fs = 352800*8;
#fs = 384000;
fn = fs/2;
fpass = 90000/fn;
fstop = 135000/fn;
fnyl = (22050-250)/fn;
fnyu = (22050+250)/fn;
fedge = [ 0, fpass, fstop, 1];
famp = [ 1, 1, 0, 0];
n = floor( (nb/conv_count) - (conv_count/2)) ; # number of taps

b = fir2(n, fedge, famp, kaiser(n+1,15));
#b = fir1(n, fpass, "low", kaiser(n+1, 7));
#b=remez(n,fedge,famp,[1, 1]);
#b=firls(n, fedge, famp,[1, 1]);
d = b;

if conv_count > 1
	itt = 1 ;

	while (itt < (conv_count))
	d = conv (d , b);
	itt++;
	endwhile
endif

[H,f] = freqz ( d);
#[gd,f] = grpdelay ( d );
figure(1);
subplot(211);
plot((f/(2*pi))*fs,20*log10(abs(H)));
title(sprintf('Passband Ripple: fs: %d, fc: %d',fs,fpass*fn));
xlabel('Frequency (hz)');
ylabel('Amplitude Response (dB)');
axis([30000, 100000, -5, 5]);
grid('on');

subplot(212);
plot((f/(2*pi))*fs,20*log10(abs(H)));
title(sprintf('Filter response: fs: %d, fc: %d',fs,fpass*fn));
xlabel('Frequency (hz)');
ylabel('Amplitude Response (dB)');
axis([90000, 450000, -200, 5]);
grid('on');
figure(2);
subplot(111);
[Hi, Ti] = impz(d);
plot(Ti,Hi);
grid('on');
axis([0,95,-0.1,0.2]); 


dlmwrite("imp_3528_fir2.txt", d, "delimiter", "\\r");


1;
- conv_count is not getting much use but creates two fir filters and convolves them together. The results can be useful/interesting as it creates a gentler filter with greater attenuation in the stop band.
- nb is number of filter taps required
- fs is sampling frequency. a few variations are commented out.
- fpass - is the end of the passband in hz
- fstop - start of the passband in hz
- fedge is the spec for the edges of the bands for a couple of the filter types
- famp is the spec for the amplitude for the bands 1 being max, 0 = zero

There are four filter types setup. The windowing can be changed but requires tweaking.
if you wanted to use Hann you would replace
kaiser(n+1,15)
with
hann(n+1)

If you have a look at the signal package documentation you'll see what is going on...
Function Reference: signal

There are a a few bits and pieces for calculating the size of the filters for convolution, and then doing the convolve.

the rest of the script is just plotting commands

axis([30000, 100000, -5, 5]);

the above plots from 30kHz to 100kHz, -5dB to +5dB for example. Adjust as required - for passband ripple checking I usually set to -0.001dB, +0.001dB.

The file the coefficients are saved to is set in the dlmwrite command.

Best way to use the above is to save into a text file with a .m extension and load into Octave.
Attached Files
File Type: pdf FIR2example1.pdf (169.4 KB, 80 views)
File Type: pdf FIR2example2.pdf (54.0 KB, 68 views)
File Type: zip totalCRaP_rev2.skr.zip (6.4 KB, 86 views)
File Type: txt 1021filt.txt (60.0 KB, 51 views)

Last edited by spzzzzkt; 12th March 2015 at 06:50 AM.
  Reply With Quote
Old 12th March 2015, 12:43 PM   #365
diyAudio Member
 
oneoclock's Avatar
 
Join Date: Oct 2010
Quote:
Originally Posted by spzzzzkt View Post
FIR2 has been changed.
.
.
Thank God.
  Reply With Quote
Old 12th March 2015, 08:56 PM   #366
diyAudio Member
 
Join Date: Feb 2013
Paul, do you think it is possible to have in the first page the latest versions of all the filters that you think are worthy, with all the relevant graphs? Thank you
  Reply With Quote
Old 12th March 2015, 09:19 PM   #367
potstip is offline potstip  Turkey
diyAudio Member
 
Join Date: Oct 2013
Quote:
Originally Posted by PanagiotisPapadakos View Post
Paul, do you think it is possible to have in the first page the latest versions of all the filters that you think are worthy, with all the relevant graphs? Thank you
+++
  Reply With Quote
Old 12th March 2015, 09:30 PM   #368
diyAudio Member
 
Join Date: May 2005
Location: Melbourne
Blog Entries: 1
Quote:
Originally Posted by PanagiotisPapadakos View Post
Paul, do you think it is possible to have in the first page the latest versions of all the filters that you think are worthy, with all the relevant graphs? Thank you
Everyone seems to have different tastes, so might be difficult.

What I can probably do is put links to filters that are well liked but at this stage they are all essentially tweaks to the 44.1 and occasionally also 48kHz filters.

It might be a week or two before I can do anything, as I'll have limited access to the 'net.
  Reply With Quote
Old 12th March 2015, 10:23 PM   #369
zfe is offline zfe
diyAudio Member
 
Join Date: Dec 2014
The totalCRaP_rev2 FIR2 is clearly an improvement with my STAX headphones. Turning the volume down on the DAC instead on he STAX improves the things further (might not be an issue of clipping but of output level).
  Reply With Quote
Old 13th March 2015, 06:26 AM   #370
jaffar is offline jaffar  Russian Federation
diyAudio Member
 
Join Date: Aug 2008
Location: Far North Russia
Default totalCRaP™ rev2 min-phase request

Paul,
i think it is reasonable to make a minimum/intermediate-phase version with (almost) no pre-ringing, similar to Ayre's 'MP Listen'.
Would be a worthy addition to our filter collection.

Thanks!
  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 1038 20th April 2017 05:30 PM
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 01:48 PM.


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