Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Resampler plugin (Read 532383 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Resampler plugin

Good quality and fast resampler based on code from SoX `rate` effect.

If you want to know what settings are best:
1. Read SoX FAQ, "What are the best 'rate' settings to resample a file and retain the highest quality?"
2. This post: http://www.hydrogenaudio.org/forums/index....st&p=626176 (an excerpt from SoX help)
3. Feel free to experiment and decide what's best for you.

Changelog:

0.8.7:
- fixed a bug introduced in 0.8.4 that may result in crashes.
- recompiled with MSVS 2019 (16.2.0) and SDK-2019-06-30.

0.8.6:
- fixed a bug introduced in 0.8.5 when "Target samplerate" was set to "Upsample" or "Downsample".

0.8.5: maintenance release
- minor code cleanup;
- minor update of project files;
- update FFmpeg FFT code.
No bugfixes / speed increase / new features; 'mod' versions were not updated.

0.8.4:
- minor fixes;
- changed default quality from 'Normal' to 'Best';
- added signal extrapolation to reduce a possibility of clicks during track change;
- recompiled with latest SDK (2018-10-11). Works with foobar2000 1.4.x; users of 1.3.x need to download and install MSVC redist (here).

Old versions and old changelog are available here

Re: Resampler plugin

Reply #1
Downloading now & will try soon. I use SSRC however. Do you have any detailed comparison between your SoX based resampler vs PPHS, SSRC??

Thanks


Re: Resampler plugin

Reply #3
Now does this resampler use the "High" or "Very High" setting?

Thanks for the component, by the way.

Re: Resampler plugin

Reply #4
I think i found a bug


when using in dsp chain and play a 22050Hz file, the playback time displayed in foobar is slower than it should be
and it sometimes even stall at 0:00

there might be something wrong...


btw. i love this component

Re: Resampler plugin

Reply #5
Now does this resampler use the "High" or "Very High" setting?

Thanks for the component, by the way.

Sorry, I don't fully understand your question. 
SoX effect named "rate" has 5 quality presets: quick, low, medium, high, very high.
Code: [Select]
    |      Quality   Band-  Rej dB   Typical Use       |
    |                width                             |
    |-q     quick     n/a   ?30 @    playback on       |
    |                        Fs/4    ancient hardware  |
    |-l      low      80%    100     playback on old   |
    |                                hardware          |
    |-m    medium     95%    100     audio playback    |
    |-h     high      95%    125     16-bit mastering  |
    |                                (use with dither) |
    |-v   very high   95%    175     24-bit mastering  |

Also, 'quick' and 'low' quality levels doesn't allow to override options like aliasing, steep filter and phase response. So I disabled them. I don't think that foobar users play music on ancient or old hardware 

Re: Resampler plugin

Reply #6
when using in dsp chain and play a 22050Hz file, the playback time displayed in foobar is slower than it should be
and it sometimes even stall at 0:00

Thanks, I'll investigate this.

Re: Resampler plugin

Reply #7
Please ignore my earlier comment. I missed the configuration somehow. This looks great!


Re: Resampler plugin

Reply #9
The SSRC is better than this component, right?
Because if you select Passband/Transition, you can see that the SSRC is more similar to the "ideal filter".

I'm afraid that it isn't so simple. Look at:

http://www.hydrogenaudio.org/forums/index....ost&p=81050

http://www.hydrogenaudio.org/forums/index....ost&p=29125

But I don't know of the audibility of ringing at Nyquist limit.


I think i found a bug


when using in dsp chain and play a 22050Hz file, the playback time displayed in foobar is slower than it should be
and it sometimes even stall at 0:00

there might be something wrong...


btw. i love this component

Bug confirmed and (I hope ) fixed. Updated version is available. Thanks!

Re: Resampler plugin

Reply #10
Hmm, ok, i take it this one is better then
But im wondering: What should i use for samplerate conversion? (From 44100 to 96000)
My soundcard (Onkyo SE-90PCI, highend stereo soundcard, VIA Envy24 chip) or this plugin, any idea which one is better?

Probably hard/impossible to tell without actually testing my soundcard
Foobar2000 @ Onkyo SE-90PCI @ Sennheiser HD595 :)

Re: Resampler plugin

Reply #11
The SSRC is better than this component, right?
Because if you select Passband/Transition, you can see that the SSRC is more similar to the "ideal filter".

I'm afraid that it isn't so simple. Look at:

http://www.hydrogenaudio.org/forums/index....ost&p=81050

http://www.hydrogenaudio.org/forums/index....ost&p=29125


lvqcl, good work with the port, and good pointers to some well informed posts. 

vigylant, the bandwidth of the SoX SRC is configurable up to 99.7% which pretty much matches that of SSRC (standard).  But be aware, that the closer you get to the nyquist, the more artifacts you get; look closely at the transition graphs for the Shibatch SRC and you'll see that (esp. for the hp version) the transition lies to the right of the ideal filter's -- i.e. aliasing is occurring.

  -bandpass

Re: Resampler plugin

Reply #12
I had carefully compared this SRC, based on SOX 14.2.0 with other foobar resamplers and it is sonically the best resampler out there, IMHO of course. On this SRC I appreciate very low artifacts, frequency responce, good transition and very low noise floor.
Then I found this, maybe well known side yet (http://src.infinitewave.ca), which basically confirmed my experience. SOX with VHQ settings is according to this side for me in pair with iZ RX Advanced (High steepness), which is in some parameters maybe very slightly better, but has also a little higher noise floor, which is on sweep test result picture quite visible and therefore maybe for highend headphones or speakers also audible.
So many many thanks to the author for hard work and time for creating and uploading this free soft, which will certainly improve listening experience for people with low/medium quality sound cards/int. chips. To author, I intercede for future development of this great plug-in to make it even better, btw I didn't find any bugs in this version yet.
So thank you very very much again

Re: Resampler plugin

Reply #13
@jaro1: I am not convinced that you did, indeed, hear a difference. The quantifiable differences between PPHS and this resampler are below the threshold of human hearing. Please re-read our terms of service, paying attention to point 8.

That is not to diminish the efforts of the developer of this component. I am now using it myself for high quality work, due to the objective differences. Subjectively, however, I am not convinced it is possible to discern between PPHS and the SoX resampler. The site you cited primarily concerns itself with inaudible qualities.

Re: Resampler plugin

Reply #14
question which I must ask. He as well as PPHS Ultra?

Re: Resampler plugin

Reply #15
@jaro1: I am not convinced that you did, indeed, hear a difference. The quantifiable differences between PPHS and this resampler are below the threshold of human hearing. Please re-read our terms of service, paying attention to point 8.

That is not to diminish the efforts of the developer of this component. I am now using it myself for high quality work, due to the objective differences. Subjectively, however, I am not convinced it is possible to discern between PPHS and the SoX resampler. The site you cited primarily concerns itself with inaudible qualities.


Because of very short time I could not write all circumstances of listening tests I'done, now I can only add, that I wasn't alone, there were three of us, loudspeakers-B&W Sig. Diamond; headphones - AKG K701.
But according to service terms you are absolutely right, but I wanted because of time shortness write something about our SUBJECTIVE observations and at least say thanks to the author, sorry for forum rules breaking and also for my bad english.

Re: Resampler plugin

Reply #16
This seems to be a very good resampler. From my limited understanding, it rivals the SSRC resampler but uses less CPU.

A visual comparison can be seen at
http://sox.sourceforge.net/SoX/Resampling
http://sox.sourceforge.net/rate-44k1-96k.png

The example of VERY HIGH (-v) looks almost the same as the Secret Rabbit result with -c0 and
Secret Rabbit -c1 looks very close to MEDIUM with 90% bandwidth (-mb 90). Other than that, I don't know enough to be able to interpret the impulse response per se.

Here are some more pointers from the SOX manual:

Quality         Band-width     Rej dB   Typical Use
-q   quick    n/a                   ~=30 @ Fs/4    playback on ancient hardware
-l   low           80%                   100           playback on old hardware
-m   medium   95%                   100           audio playback
-h   high           95%                   125           16-bit mastering (use with dither)
-v   very high    95%                   175           24-bit mastering

Re: Resampler plugin

Reply #17
someone who can compile and lay out icl version?

Re: Resampler plugin

Reply #18
Version 0.3.0 is out. It seems that resampling routines are not thread-safe, so I changed them a little.

By the way, I think that "Resampler based on SoX 'rate' effect" is a bit awkward name. Any ideas how to name this plugin more elegantly?

Re: Resampler plugin

Reply #19
SoX Resampler.

Resampler (SoX) in the DSP list.

Re: Resampler plugin

Reply #20
Thank You for transfering this great resampler to f2k! 

Re: Resampler plugin

Reply #21
0.4.0... uh, what? Please don't rename stuff so it gets broken in the DSP setup... the names should be kept between updates.

Re: Resampler plugin

Reply #22
0.4.0... uh, what? Please don't rename stuff so it gets broken in the DSP setup... the names should be kept between updates.


0.4.0 version is in alpha stage 

Re: Resampler plugin

Reply #23
Hi, I know it's a little offtopic, but I wanted to ask lvqcl  to something, because I suppose he knows SOX internal routines quiet good yet.
Would it be possible in the future make a plugin, which implements SOX deemphasis filter? (deemph: ISO 908 CD de-emphasis (shelving) IIR filter)

Till now I use for it wav impuls responses with FB2Ks Convolver plugin, but this isn't a right choice according to this german page:
http://www.radonmaster.de/robernd/tAFILTER.html  (thanks to author and Surfi for the link)
On this side there are packed wav signals, with explanation, for testing different deemphasis filters ( there is also filter of old SOX version, which results very badly, it altered also stereo image... )
Filter from recent SOX version is perfect, but solution with Convolver plugin (whatever impulse I use) alters a signal after closser look in Audition quiet a lot from what it should do, although frequencygoing could be very close and therefore after listening undistinguishable. 

For me is use of Convolver plugin, at least for this purpose, a little unpractical and ultimately inaccurate, so therefore this idea. By the way, it may or may not be a problem, but I think SOX deemph filter has 32bit internal precision, which is, on the other side, for this kind of operation absolutely necessary.

Once more, sorry for offtopic and thanks for your opinion.

Re: Resampler plugin

Reply #24
Hi, I know it's a little offtopic, but I wanted to ask lvqcl  to something, because I suppose he knows SOX internal routines quiet good yet.

I think bandpass knows them much more 

Filter from recent SOX version is perfect, but solution with Convolver plugin (whatever impulse I use) alters a signal after closser look in Audition quiet a lot from what it should do, although frequencygoing could be very close and therefore after listening undistinguishable.

Seems strange for me. Try to use this impulse: deemph_SoX.wav

For me is use of Convolver plugin, at least for this purpose, a little unpractical and ultimately inaccurate, so therefore this idea. By the way, it may or may not be a problem, but I think SOX deemph filter has 32bit internal precision, which is, on the other side, for this kind of operation absolutely necessary.

I tested SoX and Convolver with my impulse: difference between them is about -130 dB. So convolver is quite accurate.
And don't use "Auto level adjust" option.