Filter brewing for the Soekris R2R - Page 25 - 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 28th February 2015, 09:36 PM   #241
diyAudio Member
 
Join Date: May 2005
Location: Melbourne
Blog Entries: 1
Quote:
Originally Posted by TNT View Post
OK - thanks!

//
I should add that using the "norm" option with sox is the optimal way to add headroom.

Code:
sox /path/to/input.wav  -b 24 -r 352.8k /path/to/upsampled_output.wav norm -4 \
upsample 8 [fir /path/to/fir1_coefficents.txt vol 8]
This normalises the volume of the audio data to -4dB prior to upsampling.

Last edited by spzzzzkt; 28th February 2015 at 10:05 PM.
  Reply With Quote
Old 1st March 2015, 02:28 AM   #242
diyAudio Member
 
Join Date: May 2005
Location: Melbourne
Blog Entries: 1
Seems like there is no evidence of clipping with the x2 gain correction on the 44.1/48 filters, so I've upped the gain to x4 and done another revision of the .skr

This should mean there is 12dB gain applied by FIR1 and 6dB gain by FIR2 which should make the levels a bit more reasonable and hopefully still avoid issues with clipping.
Attached Files
File Type: zip 1021filtNOS_fullbypassv3.skr.zip (527 Bytes, 29 views)
  Reply With Quote
Old 1st March 2015, 09:23 AM   #243
diyAudio Member
 
oneoclock's Avatar
 
Join Date: Oct 2010
F1 and F2 NOS filters F1 should be 44,1 samples repeated 64 times. The gain should be 1, except signal attenuation in form of sync from 16 kHz (reconstruction rectangular samples) and measures spectrogram should show a fall in the form of sync with nulls at 44.1, 88.2 ...

Put 0 between samples produce no output signal similar to the original signal in addition to the attenuation x 64.
  Reply With Quote
Old 1st March 2015, 09:40 AM   #244
diyAudio Member
 
Join Date: May 2005
Location: Melbourne
Blog Entries: 1
Quote:
Originally Posted by oneoclock View Post
The gain should be 1, .
Nice in theory. But in the case of the DAM1021, praxis proves otherwise.
  Reply With Quote
Old 1st March 2015, 12:13 PM   #245
zfe is offline zfe
diyAudio Member
 
Join Date: Dec 2014
Quote:
Originally Posted by spzzzzkt View Post
Nice in theory. But in the case of the DAM1021, praxis proves otherwise.
Never fight the theory

I measured with an oscilloscope the output of the DAM (SE-out). As input I used a 44.1kHz file containing as samples 0,a,0,-a,0,a,0..., so what you would get as the samples of a sinus signal of 11025kHz of amplitude "a" and phase 0.

With the NOS filter (only one tap 1, gain 1) I saw positive and negative spikes with:
full amplitude --- top pos spike top neg. spike = 1.4V
0.5*full amplitude --- top pos spike top neg. spike = 0.7V
0.25*full amplitude --- top pos spike top neg. spike = 0.35V

With the 2xNOS filter (only one tap 1, gain 2 for FIR1, gain1 FIR2) I saw positive and negative spikes with:
full amplitude --- top pos spike top neg. spike = 1.4V
0.5*full amplitude --- top pos spike top neg. spike = 1.4V
0.25*full amplitude --- top pos spike top neg. spike = 0.7V

So what seems to happen is that amplitudes greater than 1 are reduced to 1.
So if you use to much amplification the top bit(s) of the information get lost, and the more silent parts get lifted (something like loudness).

@ Soren:
There problem with how the DAM handles the maximal negative sample in the PCM data.
Lets say we use 24bit. According the WAV/PCM specifications the negative numbers are the two-complements and x80 00 00 is the the maximal allowed negative number. The DAM (USB-Amareno) reproduces this a zero. x80 00 01 gives the maximal negative spike.
If I look at the x7F FF FF, 0, x80 00 00, 0, x7F FF FF -wav file in audacity, the negative part is displayed, so I suppose the DAM (or the Amareno) does something "wrong".

Last edited by zfe; 1st March 2015 at 12:40 PM.
  Reply With Quote
Old 1st March 2015, 12:43 PM   #246
zfe is offline zfe
diyAudio Member
 
Join Date: Dec 2014
Worse, the above effect is "phase sensitive". A 11025kHz sin signal of amplitude a with phase shift -Pi/4 would sample as 0.7a, 0,7a, -0.7a,-0.7a,..., so "suffer" less than the unshifted version.
  Reply With Quote
Old 1st March 2015, 01:19 PM   #247
TNT is offline TNT  Sweden
diyAudio Member
 
Join Date: Apr 2003
Location: Sweden
Nice find again zfe - keep up the good job!

//

Quote:
Originally Posted by zfe View Post
Never fight the theory

I measured with an oscilloscope the output of the DAM (SE-out). As input I used a 44.1kHz file containing as samples 0,a,0,-a,0,a,0..., so what you would get as the samples of a sinus signal of 11025kHz of amplitude "a" and phase 0.

With the NOS filter (only one tap 1, gain 1) I saw positive and negative spikes with:
full amplitude --- top pos spike top neg. spike = 1.4V
0.5*full amplitude --- top pos spike top neg. spike = 0.7V
0.25*full amplitude --- top pos spike top neg. spike = 0.35V

With the 2xNOS filter (only one tap 1, gain 2 for FIR1, gain1 FIR2) I saw positive and negative spikes with:
full amplitude --- top pos spike top neg. spike = 1.4V
0.5*full amplitude --- top pos spike top neg. spike = 1.4V
0.25*full amplitude --- top pos spike top neg. spike = 0.7V

So what seems to happen is that amplitudes greater than 1 are reduced to 1.
So if you use to much amplification the top bit(s) of the information get lost, and the more silent parts get lifted (something like loudness).

@ Soren:
There problem with how the DAM handles the maximal negative sample in the PCM data.
Lets say we use 24bit. According the WAV/PCM specifications the negative numbers are the two-complements and x80 00 00 is the the maximal allowed negative number. The DAM (USB-Amareno) reproduces this a zero. x80 00 01 gives the maximal negative spike.
If I look at the x7F FF FF, 0, x80 00 00, 0, x7F FF FF -wav file in audacity, the negative part is displayed, so I suppose the DAM (or the Amareno) does something "wrong".
  Reply With Quote
Old 1st March 2015, 05:25 PM   #248
diyAudio Member
 
oneoclock's Avatar
 
Join Date: Oct 2010
I think this is the correct filter NOS DAM1021:
Attached Files
File Type: txt NOS.txt (1.5 KB, 61 views)
File Type: zip NOS.zip (1.1 KB, 30 views)
  Reply With Quote
Old 1st March 2015, 05:28 PM   #249
TNT is offline TNT  Sweden
diyAudio Member
 
Join Date: Apr 2003
Location: Sweden
Correct filter is... no filter ?

I must try this.

//
  Reply With Quote
Old 1st March 2015, 05:40 PM   #250
zfe is offline zfe
diyAudio Member
 
Join Date: Dec 2014
Quote:
Originally Posted by oneoclock View Post
I think this is the correct filter NOS DAM1021:
In my opinion, this is equivalent to the situation that the DAM would be clocked at sample rate (so 44.1kHz etc) with no filters applied. This might perhaps with more reason be called "NOS" than zero insertion.
One thing that then schould happen is that you have sinc attenuation at the high frequencies, which at least for 44.1 and 48 would be noticeable.

Last edited by zfe; 1st March 2015 at 06:06 PM.
  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 1039 31st May 2017 11:23 AM
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:30 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