ReSampler icon indicating copy to clipboard operation
ReSampler copied to clipboard

Very short sound clips do not convert correctly

Open bossesand opened this issue 2 years ago • 3 comments

I liked the iedea of you ReSampler software, I was searching for the best quality reasampler as I wanted to convert 16 bit Impulse responces from 44100 to 48000. As they are to be used for convolver fileters I wanted best quality for the multi channel files.

I converted the [hoast_o1_01-04ch.wav] (https://github.com/thomasdeppisch/hoast360/blob/master/irs/hoast_o1_01-04ch.wav) and [hoast_o3_01-04ch.wav] (https://github.com/thomasdeppisch/hoast360/blob/master/irs/hoast_o3_01-04ch.wav)

The results came out as files with longer or shorter times than the originals and the impulse miximums where not in the same time slots. I compared the originals with the resampled results in Reaper.

I solved my need with the use of the highest quality Render setting in the Reaper DAW with the use of extreme setting for resampling. I do not know if this resulted in similar quality as a ReSampler would have produced if it was working correctly.

bossesand avatar Feb 28 '22 13:02 bossesand

Hey, Sorry - I've been off doing other things for a while, but I'm back now. I have replicated your issue, and I know what the problem is. I can see that your impulse is getting truncated at the end.

Actually, I'm grateful that you have brought this to my attention. It's highlighted an important issue that I had overlooked. I will get it fixed for for you.

jniemann66 avatar Jul 26 '23 15:07 jniemann66

@bossesand

Rightio - I have pretty much solved this in 9e5b6c3

I got the converted output (48kHz) of hoast_o1_01-04ch.wav to agree exactly with the original 44.1kHz version. The only difference is that the converted version has 4 additional samples of silence (all zeroes) padded onto the end (which I am in the process of cleaning-up.)

44.1 kHz:

hoast_o1_01-04ch(44_1kHz)

48 kHz:

hoast_o1_01-04ch(converted-48k)

typical command line:

ReSampler -i hoast_o1_01-04ch.wav -o hoast_o1_01-04ch(converted).wav -r 48000 -b 16 --mt --steepLPF

jniemann66 avatar Jul 27 '23 13:07 jniemann66

Dear @jniemann66, it seems I have found a sample that puts ReSampler to shame.

54321.flac.zip

$ mediainfo 54321.flac
Format                                   : FLAC
Format/Info                              : Free Lossless Audio Codec
Duration                                 : 5 s 0 ms
Bit rate mode                            : Variable
Bit rate                                 : 308 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 54.3 kHz
Bit depth                                : 16 bits
Compression mode                         : Lossless
Stream size                              : 188 KiB (96%)
Writing library                          : libFLAC 1.4.3 (2023-06-23)
MD5 of the unencoded content             : 1151627D253AD4436776CEF9C21B84C8

$ resampler -i 54321.flac -o out.wav -r 44100 --doubleprecision --dither --autoblank
2.1.0 64-bit version
Input file: 54321.flac
Output file: out.wav
Output Bit Format not specified
Changing output file format to wav
Using double precision for calculations.
input bit format: 16
source file channels: 2
input sample rate: 54321
output sample rate: 44100
Scanning input file for peaks ...Done
Peak input sample: 0.251221 (-11.998891 dBFS) at 0:0:0.903315
LPF transition frequency: 20045.45 Hz (90.91 %)
Conversion ratio: 0.811841 (14700:18107)
Generating 1.00 bits of standard dither for 16-bit output format, with auto-blanking
Writing Metadata
Converting (multi-stage) ...
Writing to output file ...
Done
Peak output sample: 0.112339 (-18.989417 dBFS)
Time=88425 ms [0.1x]

Original original

Expected more or less like sox-v-ns-shibata-low

Fact resampler

sergeevabc avatar Feb 25 '24 22:02 sergeevabc