Skip to main content

Notice

If you are using a Hotmail or Outlook email address, please change it now, as Microsoft is rejecting all email from our service outright.
Topic: Track break issue when converting SACD/DSD (Read 330 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Track break issue when converting SACD/DSD

Using sacd_extract I am able to rip SACD ISO files using my Oppo BD-103. foobar2000 (1.6.2) is able to open and play them correctly with the foo_input_sacd (1.2.3) and foo_dsd_processor (1.1.4) plugins. However, I have noticed that when I convert tracks to FLAC, the track breaks are not correct: the resulting waveform is slightly discontinuous at the track breaks.

For the time being I've been able to work around this as follows:

1) Convert the ISO to a single DSF file using the -k flag in sacd_extract.
2) Convert the resulting single DSF file to FLAC using foobar2000.
3) Export to individual tracks in foobar2000 using the FLAC from #2 and the CUE sheet from sacd_extract (updating it to point to the FLAC).

That results in proper track breaks, but it's obviously more work that shouldn't be necessary.

I've tried different output settings for SACD, but none seem to make a difference regarding the track breaks. I'm currently using:

Output Mode: PCM
DoP for Converter: unchecked
PCM Volume: 0dB LFE-10dB
PCM Samplerate: 88200
DSD2PCM Mode: Direct (64p, 30kHz lowpass)
Preferable Area: None
DSD Processor: DSD Processor

Interestingly, I just tried capturing the *playback* of a track break via the Speakers loopback in Audacity, and it doesn't appear as if the problem exists there.

Re: Track break issue when converting SACD/DSD

Reply #1
Sounds like the issue is caused by resampler. If the DSD decoder allows output without resampling you could try SoX resampler in its place. The latest version extrapolates the signal transitions to prevent this exact issue.

Re: Track break issue when converting SACD/DSD

Reply #2
Sounds like the issue is caused by resampler. If the DSD decoder allows output without resampling you could try SoX resampler in its place. The latest version extrapolates the signal transitions to prevent this exact issue.

I just tried this:

- Changed Output Mode from PCM to DSD
- For Processing selected "Resampler (SoX)" and set that to:
 - Target samplerate: 88200Hz
 - Quality: Best
 - Passband: 95.0%
 - Allow aliasing/imaging: not checked
 - Phase response: 50%

The problem was actually slightly *worse* doing that.

Re: Track break issue when converting SACD/DSD

Reply #3
- Changed Output Mode from PCM to DSD
- For Processing selected "Resampler (SoX)" and set that to:
 - Target samplerate: 88200Hz
 - Quality: Best
 - Passband: 95.0%
 - Allow aliasing/imaging: not checked
 - Phase response: 50%
Output mode for converter is always PCM anyway, unless you enabled DoP for converter.
To make SoX work you should set different samplerates in foo_input_sacd and SoX. For example 176400 in foo_input_sacd settings and 88200 in SoX settings. If samplerates are the same, SoX (and any other resampler in DSP) just does nothing.
Also, try 44100 Hz in SACD decoder settings to get gapless. With all other output samplerates foo_input_sacd is not so-gapless.
If nothing helps, you can use DSP Fake Gapless - https://foobar.hyv.fi/?view=foo_dsp_fakegapless
Author of foo_input_sacd is not on Hydrogenaudio. You can report problem to him on https://sourceforge.net/p/sacddecoder/bugs/

Re: Track break issue when converting SACD/DSD

Reply #4
Use 44100 Hz in SACD decoder settings to get gapless. With all other output samplerates it is not gapless. The problem is caused by SACD decoder itself, not by fb2k or DSPs.

If that were true, that the problem is inherent at sample rates other than 44100kHz, playback would also have a problem. But as noted above, it doesn't.

Re: Track break issue when converting SACD/DSD

Reply #5
I'm mostly speculating here, but a single-bit format like DSD can't really support anything but start from previous loudness or from zero loudness. When you decode the entire album the tracks obviously flow nicely together. But when you start decoding from a random track I think it will always have to start from silence. Only way to track what PCM value is needed would be to decode the entire album from the beginning to the starting point of the track you want.

You could try forcing the conversion to use only one thread to simplify your process. Pick FLAC encoder and switch the encoder to "custom" to get all the options available. Tick "do not convert in multiple threads". I'm not 100% certain if this keeps the same decoder instance for all the tracks without decoder having support for this, but I think it's worth a try. Should be simpler than the method you used.

Re: Track break issue when converting SACD/DSD

Reply #6
I'm mostly speculating here, but a single-bit format like DSD can't really support anything but start from previous loudness or from zero loudness. When you decode the entire album the tracks obviously flow nicely together. But when you start decoding from a random track I think it will always have to start from silence. Only way to track what PCM value is needed would be to decode the entire album from the beginning to the starting point of the track you want.

You could try forcing the conversion to use only one thread to simplify your process. Pick FLAC encoder and switch the encoder to "custom" to get all the options available. Tick "do not convert in multiple threads". I'm not 100% certain if this keeps the same decoder instance for all the tracks without decoder having support for this, but I think it's worth a try. Should be simpler than the method you used.

Thanks for the suggestion.

Unfortunately, the problem remains.

And to be clear, I *am* converting the entire album (or at least in the case of quick testing, consecutive tracks). Based on your explanation, I can see how converting single tracks separately could be an issue, but that's not what I'm doing. And it's especially frustrating when the source is an ISO, as opposed to individual files.

Re: Track break issue when converting SACD/DSD

Reply #7
I took a quick look at the sources. It seems the decoder intentionally handles the track transition differently during normal playback and conversion. Unless the author changes subsequential subsongs not to reinitialize the engine you'll be forced to use your single-file workaround.

Re: Track break issue when converting SACD/DSD

Reply #8
I took a quick look at the sources. It seems the decoder intentionally handles the track transition differently during normal playback and conversion. Unless the author changes subsequential subsongs not to reinitialize the engine you'll be forced to use your single-file workaround.

As someone who has used foobar2000 for years but has never gotten into the development of it, how does one initiate a discussion regarding a possible change to that behavior?



 
SimplePortal 1.0.0 RC1 © 2008-2020