john33
Mar 25 2005, 10:36
I've just uploaded the above to Rarewares,' Others' page.
This is a high quality resampler using the SRC libsamplerate library from Erik de Castro Lopo. The library offers five resamplers but I have only implemented the three higher quality modes. Currently, the output wave files have a file suffix of: name.samplerate.wav, eg., name.48000.wav. If anyone can think of a better way of naming the output, I'm open to suggestions. While there is an option to delete the input files, I am assuming that this would not be desirable as a default, hence the naming convention currently used.
callmeace
Mar 26 2005, 20:32
Thanks as always for your work John33!
If you don't mind I will let you know my preference. I don't ever go for spaces nor extra dots in filenames.
So I would name the output-file with 2 underscores instead of the first dot, something like this
originalfilename__samplerate.wav
The 2 underscores will give clarity when looking down a long list of paired files sorted by name.
Enig123
Mar 26 2005, 21:06
I'd like to know if it's possible to build a foobar2000 resampler based on this lib.
john33
Mar 29 2005, 01:48
QUOTE(callmeace @ Mar 27 2005, 02:32 AM)
Thanks as always for your work John33!
If you don't mind I will let you know my preference. I don't ever go for spaces nor extra dots in filenames.
So I would name the output-file with 2 underscores instead of the first dot, something like this
originalfilename__samplerate.wav
The 2 underscores will give clarity when looking down a long list of paired files sorted by name.
Thanks for the input.

I like your suggestion better than how I have it currently so I'll change it accordingly. Anyone else have any other thoughts?
john33
Mar 29 2005, 01:50
QUOTE(Enig123 @ Mar 27 2005, 03:06 AM)
I'd like to know if it's possible to build a foobar2000 resampler based on this lib.
The answer has to be , yes.

However, I'd suggest that someone more familiar with building foobar plugins might be a better choice than me to do this.
Enig123
Mar 29 2005, 03:05
QUOTE(john33 @ Mar 29 2005, 03:50 PM)
The answer has to be , yes.

However, I'd suggest that someone more familiar with building foobar plugins might be a better choice than me to do this.

Great. I always think foobar2000 deserves one of the best resampler as it's plugin.
m0rbidini
Mar 29 2005, 03:39
rjamorim
Mar 29 2005, 04:36
QUOTE(Enig123 @ Mar 29 2005, 06:05 AM)
Great. I always think foobar2000 deserves one of the best resampler as it's plugin.
It already has one of the best resamplers as its plugin: SSRC :B
askoff
Mar 29 2005, 05:40
Whats the difference between SSRC and SRC resamlpers exept the letter s?
rjamorim
Mar 29 2005, 05:46
QUOTE(askoff @ Mar 29 2005, 08:40 AM)
Whats the difference between SSRC and SRC resamlpers exept the letter s?
Different authors, SRC supports odd sampling frequencies that nearly nobody ever uses.
Enig123
Mar 29 2005, 06:10
QUOTE(m0rbidini @ Mar 29 2005, 05:39 PM)
Thank you very much, m0rbidini. I'm very happy to know that good news.
john33
Mar 29 2005, 07:24
V0.2 now at Rarewares. I have added an extra box in the Options dialogue that allows you to specify the file suffix of your choice. However, if left blank, the default file suffix is now "__new sample rate"
Leo 69
Mar 29 2005, 07:59
It doesn't work well with clipped samples. It adds clicks or something like that...
Why ?
QUOTE(Leo 69 @ Mar 29 2005, 02:59 PM)
It doesn't work well with clipped samples. It adds clicks or something like that...
Why ?
maybe because of this:
QUOTE
The output of libsamplerate will be roughly the same volume as the input. However, even if the input is strictly in the range (-1.0, 1.0), it is still possible for the output to contain peak values outside this range.
Consider four consecutive samples of [0.5 0.999 0.999 0.5]. If we are up sampling by a factor of two we need to insert samples between each of the existing samples. Its pretty obvious then, that the sample between the two 0.999 values should and will be bigger than 0.999.
This means that anyone using libsamplerate should normalise its output before doing things like saving the audio to a 16 bit WAV file.
http://www.mega-nerd.com/SRC/faq.html
Leo 69
Mar 29 2005, 08:21
But during realtime playback in foobar2000 everything's OK when playing clipped music with SSRC, SRC and PPHS

Why ?
P.S. Digga thanx for reply.
rjamorim
Mar 29 2005, 09:33
QUOTE(Leo 69 @ Mar 29 2005, 11:21 AM)
But during realtime playback in foobar2000 everything's OK when playing clipped music with SSRC, SRC and PPHS

Why ?
I suspect foobar2000 does the normalization after resampling.
You can also avoid clipping using --twopass in SSRC.
PatchWorKs
Mar 29 2005, 10:06
Why not integrate different algorithms in the resample-dropper (or drop-resampler) ?
I mean,
sr-convert, PPHS, SRC & wavefs44
john33
Mar 29 2005, 10:12
I've just uploaded V0.3 that fixes this and a couple of little bugs I found.
The strategy suggested by Erik de Castro Lopo is essentially peak restoration of a sort and, personally, I'm not convinced that this is necessarily the correct approach. The fix I have made simply applies a brute force hard limit which means that the peaks will essentially be as they were before resampling, in compression terms; in other words, closer to the original. If anyone thinks they can convince me that I should look at doing this differently they're welcome to try.
john33
Mar 29 2005, 11:04
QUOTE(PatchWorKs @ Mar 29 2005, 04:06 PM)
Why not integrate different algorithms in the resample-dropper (or drop-resampler) ?
I mean,
sr-convert, PPHS, SRC & wavefs44
I understand where you're coming from, but I built this basically for my own use and if anyone else finds it useful, well great, but I'm not too bothered about adding other resamplers.

sr-convert, for instance, only works with 8 and 16 bit PCM input.
Leo 69
Mar 29 2005, 12:25
Thanks a lot, John
rjamorim
Mar 29 2005, 12:35
QUOTE(PatchWorKs @ Mar 29 2005, 01:06 PM)
PPHS is proprietary and closed source (belongs to Garf), so it's automatically incompatible with SRC's GPL.
PatchWorKs
Mar 30 2005, 01:48
QUOTE
sr-convert, for instance, only works with 8 and 16 bit PCM input.
So why not improving it (too) ?
QUOTE
PPHS is proprietary and closed source (belongs to Garf)
Uhm, isn't it a derivate of SSRC ?
kjoonlee
Mar 30 2005, 01:53
Apparently not. You can hear it straight from the horse's mouth.
http://www.hydrogenaudio.org/forums/index....ndpost&p=212899
askoff
Mar 30 2005, 06:42
QUOTE(rjamorim @ Mar 29 2005, 08:35 PM)
QUOTE(PatchWorKs @ Mar 29 2005, 01:06 PM)
PPHS is proprietary and closed source (belongs to Garf), so it's automatically incompatible with SRC's GPL.
IIRC, the
SoX has some kind of polyphase resampling algorithm also.
callmeace
Apr 9 2005, 09:01
Great work John33, thanks a lot!
rjamorim
Apr 9 2005, 09:47
QUOTE(PatchWorKs @ Mar 30 2005, 04:48 AM)
So why not improving it (too) ?
Why bother? There's already a big selection of open source resamplers out there that can process 24bit samples.
Besides, sr-convert's license is as restrictive as SRC's. If one resampler is to be improved, I would vote for a less restrictive one - SSRC (LGPL) or wavefs44 (PD)
Version 0.4 now at Rarewares. Like the new release of WaveGain, the wave header is copied to the new file, preserving chunk data, but with the basic data amended to reflect the changes made through resampling.
Mr_Rabid_Teddybear
Sep 15 2005, 08:49
Would it be possible to add downmixing option to SRCdrop? Like e.g. 5.1 > stereo, stereo > mono?
Maybe also simple upmixing; e.g. mono > stereo, stereo > 4 channels?
john33
Sep 15 2005, 09:53
Clearly, the answer is - yes, it would be possible. The only question I would ask in reply is whether this is really the right place to be doing it?
I fine tool, I really enjoy it!
THX Daphy
Mr_Rabid_Teddybear
Sep 16 2005, 13:43
QUOTE(john33 @ Sep 15 2005, 07:53 AM)
Clearly, the answer is - yes, it would be possible. The only question I would ask in reply is whether this is really the right place to be doing it?
Well, if I wanted to e.g. make a 22050 kHz, 16 bit mono file from a 44100 kHz 24 bit stereo file I could do it with just this tool. Seems practical to me....
john33
Sep 16 2005, 14:30
QUOTE(Mr_Rabid_Teddybear @ Sep 16 2005, 07:43 PM)
QUOTE(john33 @ Sep 15 2005, 07:53 AM)
Clearly, the answer is - yes, it would be possible. The only question I would ask in reply is whether this is really the right place to be doing it?
Well, if I wanted to e.g. make a 22050 kHz, 16 bit mono file from a 44100 kHz 24 bit stereo file I could do it with just this tool. Seems practical to me....

Point taken. Let me think about it.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.