Author Topic: Parallel dac to double sample, possible?  (Read 2898 times)

0 Members and 1 Guest are viewing this topic.

Offline KokoriantzTopic starter

  • Frequent Contributor
  • **
  • Posts: 260
  • Country: vn
Re: Parallel dac to double sample, possible?
« Reply #25 on: November 02, 2024, 02:15:28 pm »
Here.
 
The following users thanked this post: SteveThackery

Offline KokoriantzTopic starter

  • Frequent Contributor
  • **
  • Posts: 260
  • Country: vn
Re: Parallel dac to double sample, possible?
« Reply #26 on: November 02, 2024, 02:17:36 pm »
Here.
 
The following users thanked this post: SteveThackery

Offline gf

  • Super Contributor
  • ***
  • Posts: 1376
  • Country: de
Re: Parallel dac to double sample, possible?
« Reply #27 on: November 05, 2024, 07:56:16 pm »
For interpolated image frequencies filtering,  it is necessary to have minimum 15 samples from the future and 15 from the past each is weighted by sinc function. When a pulse of 1 sample is applied,  the filter will betray one by one its weighing coefficients while coming in and going out of the interpolator. As the sinc function alternate the sign on every sample, the 44khz becomes 22khz multiplying. frequency.

If a 16khz burst enters the filter, it will generate 6khz new frequency by intermodulation and the sound of the percussion instrument will be different.

A filter is a linear operation. It does not create any new frequencies. Only frequencies already present in the input signal are passed through with frequency-dependent attenuation and phase shift.

[ The images, which are newly created frequencies, are not introduced by filtering, but when the DAC emits a rectangular pulse with a width of one sample interval for each sample. The spectrum of the resulting staircase then contains the images in the 2nd, 3rd, ... Nyquist zone. ]

Quote
We, listeners cannot know it, as we don't know how the original sound is but the artist realizes that this isn't the sound of his instrument.

But then my conclusion would be that 20kHz bandwidth (44.1kSa/s) is simply not enough. But this cannot be solved on the player/DAC side alone. Already the recording must be done with higher bandwidth and sample rate, and the player, amplifier, and speakers must have a higher bandwidth, too. I also found this article, saying that recordings done with a high-bandwidth microphone at 192 kSa/s were prefered by listeners.

Quote
Figure 10 shows the .wav file and corresponding spectrogram of a snare drum track I recorded at 192 kHz using a high-bandwidth microphone. Such recording methods do capture the energy that is created by the snare drum. The limited number of A-B comparisons I made so far with professional musicians hearing their performances recorded at 192 kHz using high-bandwidth microphones shows that these recordings are preferred when compared to similar recordings made at lower sample rates using conventional microphones. The most common response is that the 192 kHz recordings sound more like the instrument(s) they play.
 

Offline Someone

  • Super Contributor
  • ***
  • Posts: 5068
  • Country: au
    • send complaints here
Re: Parallel dac to double sample, possible?
« Reply #28 on: November 05, 2024, 09:49:46 pm »
I can't figure out how they got the spectrum in pink. Did they use 88.2khz cd ?
Must be, just doubling the output sample rate with a simple interpolator (zero order, linear, cubic) retains the images around the original sample rate. As you noted it would require a sophisticated interpolation filter to suppress that to the level they showed.
 

Online langwadt

  • Super Contributor
  • ***
  • Posts: 4799
  • Country: dk
Re: Parallel dac to double sample, possible?
« Reply #29 on: November 05, 2024, 10:05:09 pm »
it is necessary to have minimum 15 samples from the future and 15 from the past each is weighted by sinc function.

does it come with a time machine?
 

Offline KokoriantzTopic starter

  • Frequent Contributor
  • **
  • Posts: 260
  • Country: vn
Re: Parallel dac to double sample, possible?
« Reply #30 on: November 05, 2024, 10:16:28 pm »
Filter do create its own resonant frequency to dissipate accumulated energy. With digital filters, the signal enters and goes out in time domain as on bumpy road which makes it vibrate at Nyquist frequency. Apparently, much effort has been thrown to minimize this pre-post resonance but the linear phase shift type has always got the upper hand.
I tried on simulator to deal with the image frequencies as double side band modulated by the ADC. So I demodulate synchronous way first the output of the DAC by multiplying with the Nyquist, 20khz becomes 2khz and remodulate it with Heartley single side band modulator. I do get rid of the images but as the modulator multiplies back, the DC component remained after the signal burst, generates decaying Nyquist frequency similar to post resonance. 2 week work for nothing.
 

Offline gf

  • Super Contributor
  • ***
  • Posts: 1376
  • Country: de
Re: Parallel dac to double sample, possible?
« Reply #31 on: November 05, 2024, 11:07:55 pm »
Filter do create its own resonant frequency to dissipate accumulated energy. With digital filters, the signal enters and goes out in time domain as on bumpy road which makes it vibrate at Nyquist frequency.

If you feed a (say) 10 kHz sine wave in, you get a 10 kHz sine wave out. Nothing else.

I mean a continuous sine wave. Not an impulse or burst. These are not sine waves. They have a continuous spectum, containing an infinite number of frequencies.

Even if a sinc impulse appears to oscillate at say 20kHz, it has a continuous, FLAT spectrum from 0...20kHz, and no frequencies beyond 20kHz. There is no dominant frequency peaking out in the Fourier spectrum.

If you want less ringing/overshoot/preshoot you need a filter with a soft roll-off (like Gaussian or Bessel). Any filter with a sharp cut-off (analog or digital) suffers significantly from overshoot.
 

Offline moffy

  • Super Contributor
  • ***
  • Posts: 2159
  • Country: au
Re: Parallel dac to double sample, possible?
« Reply #32 on: November 06, 2024, 01:15:57 am »

But then my conclusion would be that 20kHz bandwidth (44.1kSa/s) is simply not enough. But this cannot be solved on the player/DAC side alone. Already the recording must be done with higher bandwidth and sample rate, and the player, amplifier, and speakers must have a higher bandwidth, too. I also found this article, saying that recordings done with a high-bandwidth microphone at 192 kSa/s were prefered by listeners.


The big difference between the 44.1kHz and 192kHz sampled signals is the reconstruction filter. With the higher sample rate it is much easier to maintain good linear phase in the passband than with a necessarily much steeper filter for the lower sampling rate. I remember a story from Bob Pease about a fellow who designed a crossover for a speaker and complained that he had the spectrum quite flat, but Bob asked about the phase response, which in the end was where the problem lay.
 

Offline KokoriantzTopic starter

  • Frequent Contributor
  • **
  • Posts: 260
  • Country: vn
Re: Parallel dac to double sample, possible?
« Reply #33 on: November 06, 2024, 04:26:27 am »
I simulated an upsampling.
The 16khz input gets by the interpolating filter at entrance and exit, multiplied by the Nyquist 22khz. The FFT graph shows 6khz and 38khz components.
Then I upsample to 192khz. Now, all the undesired are frequencies go above audio range.
I think the interpolated transient will still remain.


« Last Edit: November 06, 2024, 04:43:53 am by Kokoriantz »
 

Offline KokoriantzTopic starter

  • Frequent Contributor
  • **
  • Posts: 260
  • Country: vn
Re: Parallel dac to double sample, possible?
« Reply #34 on: November 06, 2024, 09:24:36 am »
I came to the evidence that 20khz frequency is too high for 44.1khz sampled. The reasonable frequency is 16khz. After all any personal above 20 do not hear above. Commercial way is not good, specially online reviewers pretend to hear 0.5db difference at 20khz at an age of over 30, such proposition can only convince long time audiophile.
I simulated the output of a DAC filtered by a lowpass 16khz 5th Bessel, bellow are the bursts of 0.5ms for 20khz and 16khz.
Edit: Butterworth not Bessel.
« Last Edit: November 06, 2024, 11:41:32 am by Kokoriantz »
 

Offline KokoriantzTopic starter

  • Frequent Contributor
  • **
  • Posts: 260
  • Country: vn
Re: Parallel dac to double sample, possible?
« Reply #35 on: November 06, 2024, 11:38:04 am »
I found a similar claim of paralleled dacs on DIYAUDIO.
Post in thread 'Building the ultimate NOS DAC using TDA1541A' https://www.diyaudio.com/community/threads/building-the-ultimate-nos-dac-using-tda1541a.79452/post-914726
Post in thread 'Building the ultimate NOS DAC using TDA1541A' https://www.diyaudio.com/community/threads/building-the-ultimate-nos-dac-using-tda1541a.79452/post-914899
 

Offline gf

  • Super Contributor
  • ***
  • Posts: 1376
  • Country: de
Re: Parallel dac to double sample, possible?
« Reply #36 on: November 06, 2024, 02:11:08 pm »
I simulated an upsampling.
The 16khz input gets by the interpolating filter at entrance and exit, multiplied by the Nyquist 22khz. The FFT graph shows 6khz and 38khz components.
Then I upsample to 192khz. Now, all the undesired are frequencies go above audio range.
I think the interpolated transient will still remain.

Not sure what you are doing - attached are my results from 4x upsampling from 44.1 to 176.4 kSa/s.
No 6 kHz tone in the FFT spectrum, only the expected images at N*44100 +- 16000 Hz, where N is an integer.
After applying the interpolation filter, the images are strongly attenuated.

Code: [Select]
% 16 kHz sine wave signal @ 44.1kSa/s
t = [0:44100-1]'/44100;
x = sqrt(2)*sin(2*pi*16000*t);

% plot spectrum
figure 1
fs = 44100;
f = [0:length(x)-1]'*fs/length(x)-fs/2;
win = kaiser(length(x),18); win /= mean(win);
plot(f/1000,fftshift(20*log10(abs(fft(x.*win)/length(x)))))
grid on
ylim([ -140 0 ])
% xlim([0 fs/2/1000])
xlabel("kHz")
title("16 kHz sine wave")

% up-sample 4x by zero insertion
x = 4 * [ x'; zeros(3,length(x)) ](:);

% plot spectrum
figure 2
fs = 44100*4;
f = [0:length(x)-1]'*fs/length(x)-fs/2;
win = kaiser(length(x),18); win /= mean(win);
plot(f/1000,fftshift(20*log10(abs(fft(x.*win)/length(x)))))
grid on
ylim([ -140 0 ])
% xlim([0 fs/2/1000])
xlabel("kHz")
title("After 4x up-sampling (zero insertion)")

% apply interpolation filter
[n,Wn,beta,ftype] = kaiserord([20000 22000],[1 0],[0.0001 0.0001],fs);
h = fir1(n,Wn,ftype,kaiser(n+1,beta),'noscale');
x = filter(h,1,x);

% plot spectrum
figure 3
fs = 44100*4;
f = [0:length(x)-1]'*fs/length(x)-fs/2;
win = kaiser(length(x),18); win /= mean(win);
plot(f/1000,fftshift(20*log10(abs(fft(x.*win)/length(x)))))
grid on
ylim([ -140 0 ])
% xlim([0 fs/2/1000])
xlabel("kHz")
title("After 4x up-sampling + interpolation filter")
« Last Edit: November 06, 2024, 02:51:05 pm by gf »
 

Offline KokoriantzTopic starter

  • Frequent Contributor
  • **
  • Posts: 260
  • Country: vn
Re: Parallel dac to double sample, possible?
« Reply #37 on: November 06, 2024, 07:05:43 pm »
What happens to a burst of 16 cycles of 16khz pass through this filter?
 

Offline gf

  • Super Contributor
  • ***
  • Posts: 1376
  • Country: de
Re: Parallel dac to double sample, possible?
« Reply #38 on: November 06, 2024, 09:47:44 pm »
What happens to a burst of 16 cycles of 16khz pass through this filter?

It depends on the shape of the envelope whether its spectrum happens to be bandwidth-limited to 0...20 kHz or not.

If it is bandwidth-limited, the above filter will not change it noticeably, because it only affects frequencies > 20 kHz.

If the bandwidth happens to exceed 20 kHz, then you cannot put it "as is" on an audio CD, and the question of how the player's reconstruction filter would alter the signal becomes meaningless. The question then becomes, how does the recorder alter the signal to make it fit into the 0...20 kHz bandwidth?
 

Offline KokoriantzTopic starter

  • Frequent Contributor
  • **
  • Posts: 260
  • Country: vn
Re: Parallel dac to double sample, possible?
« Reply #39 on: November 06, 2024, 11:50:48 pm »
The 16khz entering the bumpy Nyquist rate vibrating coefficients for interpolation will get modulated to be transformed into 6khz+38khz. The same modulation while going out.
Transient instruments, as percussion, piano, strings, when reproduced, sound different than the original. We, the listeners, we don't realize it but the musician does that it sounds a different instrument.
I found on you tube several examples how the pre and post ringing generate different sounds by switching linear phase to zero phase types.
Here is an example.
https://youtu.be/efKabAQQsPQ?si=8m-YEIMPdW0mmKsm
Or else, on continuous note instruments, the digital filter is perfect.
I want to remind that we give all the trouble to attenuate the image frequencies, to avoid intermodulating by the speaker's nonlinearty and generate audible frequencies. If the remedies are generating other modulating frequencies, is to replace the problem with another one.
At this stage, I am convinced that 44.1khz is good for 16khz -3db.
 

Offline moffy

  • Super Contributor
  • ***
  • Posts: 2159
  • Country: au
Re: Parallel dac to double sample, possible?
« Reply #40 on: November 06, 2024, 11:58:08 pm »
What happens to a burst of 16 cycles of 16khz pass through this filter?

It depends on the shape of the envelope whether its spectrum happens to be bandwidth-limited to 0...20 kHz or not.

If it is bandwidth-limited, the above filter will not change it noticeably, because it only affects frequencies > 20 kHz.

If the bandwidth happens to exceed 20 kHz, then you cannot put it "as is" on an audio CD, and the question of how the player's reconstruction filter would alter the signal becomes meaningless. The question then becomes, how does the recorder alter the signal to make it fit into the 0...20 kHz bandwidth?
@gf, sorry to intrude but could you plot the phase as well as the amplitude for the filter response? Thanks :)
 

Offline gf

  • Super Contributor
  • ***
  • Posts: 1376
  • Country: de
Re: Parallel dac to double sample, possible?
« Reply #41 on: November 07, 2024, 07:42:41 am »
@gf, sorry to intrude but could you plot the phase as well as the amplitude for the filter response? Thanks :)

The unwrapped phase response is a straight line. This is a linear phase FIR filter, having a constant group delay. What else would you use as interpolation filter for upsampling in the digital domain?

Btw, in the digital domain you also had the opportunity to pre-compensate the inherent sin(x)/x frequency response roll-off of a traditional DAC, and/or pre-compensate the phase of the final analog reconstruction filter with a digital allpass filter.
 

Offline gf

  • Super Contributor
  • ***
  • Posts: 1376
  • Country: de
Re: Parallel dac to double sample, possible?
« Reply #42 on: November 07, 2024, 12:48:07 pm »
The 16khz entering the bumpy Nyquist rate vibrating coefficients for interpolation will get modulated to be transformed into 6khz+38khz. The same modulation while going out.

You must be doing something wrong. Filtering is convolution (in the time domain), not modulation. Convolution does not create new frequencies.

Quote
Transient instruments, as percussion, piano, strings, when reproduced, sound different than the original. We, the listeners, we don't realize it but the musician does that it sounds a different instrument.

The spectrum of many instruments does extend into the ultrasound region. So yes, then it cannot be reproduced exactly with 44.1kSa/s digital audio. I never objected that. I also pointed to an article which also claimed that 192 kSa/s was preferred by listeners, and the most prominent example in the article was a drum track, which definitively did contain frequencies >20kH.

The question of whether the reproduction still sounds "good enough" when the bandwidth is cut to 20 kHz is not an EE question, but a psychophysical one.

The EE question would be: Can a signal with a (say) 0...40 kHz occupied bandwidth be sampled at 44.1 KSa/s and then reconstructed almost perfectly? And the answer to this question is clearly "no".

Quote
Here is an example. https://youtu.be/efKabAQQsPQ?si=8m-YEIMPdW0mmKsm

It's a very interesting demonstration, but IMO not a good example for the desired use case, as it mainly shows the impact of group delay in the context of mixing the filtered channel with other channels. This does not apply to a CD player, where both channels (L+R) are always filtered equally and therefore have same group delays.

Quote
I want to remind that we give all the trouble to attenuate the image frequencies, to avoid intermodulating by the speaker's nonlinearty and generate audible frequencies. If the remedies are generating other modulating frequencies, is to replace the problem with another one.

Again, a filter does not generate new frequencies.

Quote
At this stage, I am convinced that 44.1khz is good for 16khz -3db.

For what purpose? For the player's reconstruction filter?

In practice, you need of course some headroom below Nyquist. So 22.05 kHz are definitively not feasible. But I consider 20 kHz (-0.1dB) @41.1 kSa/s well feasible with today's technology and sufficient oversampling.

Keep the following difference in mind:

The antialiasing filter on the recorder must modify the input signal if it happens to contain components >20 kHz. This modification can of course make an audible difference. And it may also make a difference, how it alters the signal in order to limit the bandwidth.

But the player's reconstruction filter does not need to do that. It is never confronted with with useful frequencies >20 kHz. They are not present on the CD, because the recorder has already filtered them out. So all it has to do is pass through 0...20 kHz unaltered and suppress the unwanted images sufficiently. It does not matter how the reconstruction filter at the player would hypothetically alter the original analog signal when it exceeds 20 kHz. This signal is never seen by the player.
 

Offline gf

  • Super Contributor
  • ***
  • Posts: 1376
  • Country: de
Re: Parallel dac to double sample, possible?
« Reply #43 on: November 07, 2024, 01:01:33 pm »
What happens to a burst of 16 cycles of 16khz pass through this filter?

It depends on the shape of the envelope whether its spectrum happens to be bandwidth-limited to 0...20 kHz or not.

If it is bandwidth-limited, the above filter will not change it noticeably, because it only affects frequencies > 20 kHz.

If the bandwidth happens to exceed 20 kHz, then you cannot put it "as is" on an audio CD, and the question of how the player's reconstruction filter would alter the signal becomes meaningless. The question then becomes, how does the recorder alter the signal to make it fit into the 0...20 kHz bandwidth?

Attached is an example of a burst with a "soft" envelope, where 99.9% of the power happens to reside in frequencies < 18 kHz.  So I think this burst can be considered as properly bandwidth limited for sampling and reconstruction at 44.1 kSa/s.

OTOH, with a rectangular envelope, this is no longer granted.
 

Offline KokoriantzTopic starter

  • Frequent Contributor
  • **
  • Posts: 260
  • Country: vn
Re: Parallel dac to double sample, possible?
« Reply #44 on: November 07, 2024, 01:34:10 pm »
Very interesting example.
I will experiment by myself, so I will buy an ADC analog to I2S, SRC4190 sample rate converter board I2S in/out and I'll make a I2S tda1387 DAC.
ADCs I read must use analog low pass filter for ant-aliasing. I don't think the 16khz can be so bandwidth limited. Bellow is that of pcm1802.
It is highly probable that the ADC's digital filter generates pre and post ringing, then, OS will not harm any further.
« Last Edit: November 07, 2024, 01:46:35 pm by Kokoriantz »
 

Offline gf

  • Super Contributor
  • ***
  • Posts: 1376
  • Country: de
Re: Parallel dac to double sample, possible?
« Reply #45 on: November 07, 2024, 02:58:26 pm »
Attached is an example of a burst with a "soft" envelope, where 99.9% of the power happens to reside in frequencies < 18 kHz.  So I think this burst can be considered as properly bandwidth limited for sampling and reconstruction at 44.1 kSa/s.

OTOH, with a rectangular envelope, this is no longer granted.

Attached is also the spectrum of a 16 cycle burst with rectangular envelope.
The 99.9% quantile of spectral power is now at ~30 kHz.

Problem with this kind of signals is that the actual bandwidth is infinte. Using the 99.9% quantile of the spectral power as threshold between significant and negligible frequency components was an arbitrary choice of mine. I have no idea which amount is really audible.
« Last Edit: November 07, 2024, 03:37:54 pm by gf »
 

Offline gf

  • Super Contributor
  • ***
  • Posts: 1376
  • Country: de
Re: Parallel dac to double sample, possible?
« Reply #46 on: November 07, 2024, 04:14:10 pm »
Very interesting example.
I will experiment by myself, so I will buy an ADC analog to I2S, SRC4190 sample rate converter board I2S in/out and I'll make a I2S tda1387 DAC.
ADCs I read must use analog low pass filter for ant-aliasing. I don't think the 16khz can be so bandwidth limited. Bellow is that of pcm1802.
It is highly probable that the ADC's digital filter generates pre and post ringing, then, OS will not harm any further.

Just a note: For a highly oversampling ADC like this one, the role of the analog antialiasing filter is not the same as for a non-oversamlping ADC. Here, the analog filter just provides anti-aliasing for the sampling at the significantly higher oversampling rate (64*fs or 128*fs), but it does not yet do the full filtering for the output sample rate fs. This is done by the decimation filter.
 

Offline gf

  • Super Contributor
  • ***
  • Posts: 1376
  • Country: de
Re: Parallel dac to double sample, possible?
« Reply #47 on: November 08, 2024, 01:53:08 pm »
@Kokoriantz, yet another point where a misunderstanding might exist:

Which bandwidth-limited continuous-time signal is represented by the discrete sequence of samples ...0 0 0 0 1 0 0 0 0... ?
What do you think? What is the shape of the continuous-time signal between the points?
 

Offline KokoriantzTopic starter

  • Frequent Contributor
  • **
  • Posts: 260
  • Country: vn
Re: Parallel dac to double sample, possible?
« Reply #48 on: November 08, 2024, 03:59:04 pm »
I learned to use a single pulse of 1 sample duration to generate a full spectrum signal instead of white noise.
 

Offline gf

  • Super Contributor
  • ***
  • Posts: 1376
  • Country: de
Re: Parallel dac to double sample, possible?
« Reply #49 on: November 08, 2024, 05:34:22 pm »
I learned to use a single pulse of 1 sample duration to generate a full spectrum signal instead of white noise.

The samples ...0 0 0 0 1 0 0 0 0... represent a sinc impulse in continuous-time. See attached diagram, which also shows the sampling points. The diagram is of course truncated, since the horizontal extent of sinc is infinite. This impulse is the only baseband signal which is bandwidth-limited to sample_rate/2, and which gives you discrete-time samples ...0 0 0 0 1 0 0 0 0... when you sample it. Its spectrum is continuous and perfectly flat in the 0...sample_rate/2 region, and zero beyond sample_rate/2 (brickwall).

Your rectangular impulse is not bandwidth-limited. It does contain frequency contents beyond sample_rate/2.
« Last Edit: November 08, 2024, 05:42:57 pm by gf »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf