Skip to main content
updated faulty plot
Source Link

I'm writing a tool that converts a dsdiff audio file (dsd64) into a flac audio file (DSM -> PCM). The project is both a programming exercise and a signal processing exercise; I'm learning a lot from it.

Currently, I'm doing the following to compute a sample in the PCM stream

  1. Select a window of the DSM sequence that corresponds to the size of the window of a low-pass (FIR) filter.
  2. Replace all 0s in the DSM window with -1s
  3. Convolve (multiply+sum) the elements in the DSM window with the coefficients of the (FIR) filter and rescale the result to fir into the chosen bitrate (24-bit).
  4. Move the window by downsampling factor many elements (16 in my case) and apply repeat this process.

I tested the conversion using a few (arbitrarily chosen) dsdiff files (songs by the band deep purple). The conversion reproduces the signal (good) but introduces noise (bad) with the following profile (measured during the beginning of the track where there is a bit of silence in the original):

Spectrum of the added noise

I've been trying to figure out how this is being introduced, and what I need to do to remove it. From my reading of random sources online I understand that this is introduced by integrating the DSM signal, which amplifies the noise floor and maps it to a spectrum similar to the one I see in my plot.

Did I identify the problem correctly? What can I do to verify this and, ultimately, fix it?

Any help is highly appreciated.

Edit:

Added a figure showing the filter's frequency response enter image description here

Added the Periodogram of the first 10 secondssecond of the DSM stream Periodogram

Periodogram of the first second of the DSM stream

I'm writing a tool that converts a dsdiff audio file (dsd64) into a flac audio file (DSM -> PCM). The project is both a programming exercise and a signal processing exercise; I'm learning a lot from it.

Currently, I'm doing the following to compute a sample in the PCM stream

  1. Select a window of the DSM sequence that corresponds to the size of the window of a low-pass (FIR) filter.
  2. Replace all 0s in the DSM window with -1s
  3. Convolve (multiply+sum) the elements in the DSM window with the coefficients of the (FIR) filter and rescale the result to fir into the chosen bitrate (24-bit).
  4. Move the window by downsampling factor many elements (16 in my case) and apply repeat this process.

I tested the conversion using a few (arbitrarily chosen) dsdiff files (songs by the band deep purple). The conversion reproduces the signal (good) but introduces noise (bad) with the following profile (measured during the beginning of the track where there is a bit of silence in the original):

Spectrum of the added noise

I've been trying to figure out how this is being introduced, and what I need to do to remove it. From my reading of random sources online I understand that this is introduced by integrating the DSM signal, which amplifies the noise floor and maps it to a spectrum similar to the one I see in my plot.

Did I identify the problem correctly? What can I do to verify this and, ultimately, fix it?

Any help is highly appreciated.

Edit:

Added a figure showing the filter's frequency response enter image description here

Added the Periodogram of the first 10 seconds of the DSM stream Periodogram

I'm writing a tool that converts a dsdiff audio file (dsd64) into a flac audio file (DSM -> PCM). The project is both a programming exercise and a signal processing exercise; I'm learning a lot from it.

Currently, I'm doing the following to compute a sample in the PCM stream

  1. Select a window of the DSM sequence that corresponds to the size of the window of a low-pass (FIR) filter.
  2. Replace all 0s in the DSM window with -1s
  3. Convolve (multiply+sum) the elements in the DSM window with the coefficients of the (FIR) filter and rescale the result to fir into the chosen bitrate (24-bit).
  4. Move the window by downsampling factor many elements (16 in my case) and apply repeat this process.

I tested the conversion using a few (arbitrarily chosen) dsdiff files (songs by the band deep purple). The conversion reproduces the signal (good) but introduces noise (bad) with the following profile (measured during the beginning of the track where there is a bit of silence in the original):

Spectrum of the added noise

I've been trying to figure out how this is being introduced, and what I need to do to remove it. From my reading of random sources online I understand that this is introduced by integrating the DSM signal, which amplifies the noise floor and maps it to a spectrum similar to the one I see in my plot.

Did I identify the problem correctly? What can I do to verify this and, ultimately, fix it?

Any help is highly appreciated.

Edit:

Added a figure showing the filter's frequency response enter image description here

Added the Periodogram of the first second of the DSM stream

Periodogram of the first second of the DSM stream

added two figures
Source Link

I'm writing a tool that converts a dsdiff audio file (dsd64) into a flac audio file (DSM -> PCM). The project is both a programming exercise and a signal processing exercise; I'm learning a lot from it.

Currently, I'm doing the following to compute a sample in the PCM stream

  1. Select a window of the DSM sequence that corresponds to the size of the window of a low-pass (FIR) filter.
  2. Replace all 0s in the DSM window with -1s
  3. Convolve (multiply+sum) the elements in the DSM window with the coefficients of the (FIR) filter and rescale the result to fir into the chosen bitrate (24-bit).
  4. Move the window by downsampling factor many elements (16 in my case) and apply repeat this process.

I tested the conversion using a few (arbitrarily chosen) dsdiff files (songs by the band deep purple). The conversion reproduces the signal (good) but introduces noise (bad) with the following profile (measured during the beginning of the track where there is a bit of silence in the original):

Spectrum of the added noise

I've been trying to figure out how this is being introduced, and what I need to do to remove it. From my reading of random sources online I understand that this is introduced by integrating the DSM signal, which amplifies the noise floor and maps it to a spectrum similar to the one I see in my plot.

Did I identify the problem correctly? What can I do to verify this and, ultimately, fix it?

Any help is highly appriciatedappreciated.

Edit:

Added a figure showing the filter's frequency response enter image description here

Added the Periodogram of the first 10 seconds of the DSM stream Periodogram

I'm writing a tool that converts a dsdiff audio file (dsd64) into a flac audio file (DSM -> PCM). The project is both a programming exercise and a signal processing exercise; I'm learning a lot from it.

Currently, I'm doing the following to compute a sample in the PCM stream

  1. Select a window of the DSM sequence that corresponds to the size of the window of a low-pass (FIR) filter.
  2. Replace all 0s in the DSM window with -1s
  3. Convolve (multiply+sum) the elements in the DSM window with the coefficients of the (FIR) filter and rescale the result to fir into the chosen bitrate (24-bit).
  4. Move the window by downsampling factor many elements (16 in my case) and apply repeat this process.

I tested the conversion using a few (arbitrarily chosen) dsdiff files (songs by the band deep purple). The conversion reproduces the signal (good) but introduces noise (bad) with the following profile (measured during the beginning of the track where there is a bit of silence in the original):

Spectrum of the added noise

I've been trying to figure out how this is being introduced, and what I need to do to remove it. From my reading of random sources online I understand that this is introduced by integrating the DSM signal, which amplifies the noise floor and maps it to a spectrum similar to the one I see in my plot.

Did I identify the problem correctly? What can I do to verify this and, ultimately, fix it?

Any help is highly appriciated.

I'm writing a tool that converts a dsdiff audio file (dsd64) into a flac audio file (DSM -> PCM). The project is both a programming exercise and a signal processing exercise; I'm learning a lot from it.

Currently, I'm doing the following to compute a sample in the PCM stream

  1. Select a window of the DSM sequence that corresponds to the size of the window of a low-pass (FIR) filter.
  2. Replace all 0s in the DSM window with -1s
  3. Convolve (multiply+sum) the elements in the DSM window with the coefficients of the (FIR) filter and rescale the result to fir into the chosen bitrate (24-bit).
  4. Move the window by downsampling factor many elements (16 in my case) and apply repeat this process.

I tested the conversion using a few (arbitrarily chosen) dsdiff files (songs by the band deep purple). The conversion reproduces the signal (good) but introduces noise (bad) with the following profile (measured during the beginning of the track where there is a bit of silence in the original):

Spectrum of the added noise

I've been trying to figure out how this is being introduced, and what I need to do to remove it. From my reading of random sources online I understand that this is introduced by integrating the DSM signal, which amplifies the noise floor and maps it to a spectrum similar to the one I see in my plot.

Did I identify the problem correctly? What can I do to verify this and, ultimately, fix it?

Any help is highly appreciated.

Edit:

Added a figure showing the filter's frequency response enter image description here

Added the Periodogram of the first 10 seconds of the DSM stream Periodogram

Source Link

Remove noise introduced while converting a Delta-Sigma Modulated (DSM) signal into a pulse-code modulated (PCM) signal?

I'm writing a tool that converts a dsdiff audio file (dsd64) into a flac audio file (DSM -> PCM). The project is both a programming exercise and a signal processing exercise; I'm learning a lot from it.

Currently, I'm doing the following to compute a sample in the PCM stream

  1. Select a window of the DSM sequence that corresponds to the size of the window of a low-pass (FIR) filter.
  2. Replace all 0s in the DSM window with -1s
  3. Convolve (multiply+sum) the elements in the DSM window with the coefficients of the (FIR) filter and rescale the result to fir into the chosen bitrate (24-bit).
  4. Move the window by downsampling factor many elements (16 in my case) and apply repeat this process.

I tested the conversion using a few (arbitrarily chosen) dsdiff files (songs by the band deep purple). The conversion reproduces the signal (good) but introduces noise (bad) with the following profile (measured during the beginning of the track where there is a bit of silence in the original):

Spectrum of the added noise

I've been trying to figure out how this is being introduced, and what I need to do to remove it. From my reading of random sources online I understand that this is introduced by integrating the DSM signal, which amplifies the noise floor and maps it to a spectrum similar to the one I see in my plot.

Did I identify the problem correctly? What can I do to verify this and, ultimately, fix it?

Any help is highly appriciated.