Help - Search - Members - Calendar
Full Version: SRCdropV0.1 released
Hydrogenaudio Forums > Hydrogenaudio Forum > General Audio
john33
I've just uploaded the above to Rarewares,' Others' page. smile.gif

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
Thanks as always for your work John33! smile.gif

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
I'd like to know if it's possible to build a foobar2000 resampler based on this lib.
john33
QUOTE(callmeace @ Mar 27 2005, 02:32 AM)
Thanks as always for your work John33!  smile.gif 

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. smile.gif I like your suggestion better than how I have it currently so I'll change it accordingly. Anyone else have any other thoughts?
john33
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. smile.gif However, I'd suggest that someone more familiar with building foobar plugins might be a better choice than me to do this. wink.gif
Enig123
QUOTE(john33 @ Mar 29 2005, 03:50 PM)
The answer has to be , yes.  smile.gif  However, I'd suggest that someone more familiar with building foobar plugins might be a better choice than me to do this.  wink.gif
*



Great. I always think foobar2000 deserves one of the best resampler as it's plugin.
m0rbidini
There's already one here: http://pelit.koillismaa.fi/plugins/dsp.php#114

cya
rjamorim
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
Whats the difference between SSRC and SRC resamlpers exept the letter s?
rjamorim
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
QUOTE(m0rbidini @ Mar 29 2005, 05:39 PM)


Thank you very much, m0rbidini. I'm very happy to know that good news. smile.gif
john33
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
It doesn't work well with clipped samples. It adds clicks or something like that...
Why ?
Digga
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
But during realtime playback in foobar2000 everything's OK when playing clipped music with SSRC, SRC and PPHS blink.gif Why ?

P.S. Digga thanx for reply.
rjamorim
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  blink.gif Why ?
*



I suspect foobar2000 does the normalization after resampling.

You can also avoid clipping using --twopass in SSRC.
PatchWorKs
Why not integrate different algorithms in the resample-dropper (or drop-resampler) ?

I mean, sr-convert, PPHS, SRC & wavefs44
john33
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. wink.gif
john33
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. smile.gif sr-convert, for instance, only works with 8 and 16 bit PCM input.
Leo 69
Thanks a lot, John cool.gif
rjamorim
QUOTE(PatchWorKs @ Mar 29 2005, 01:06 PM)
PPHS
*



PPHS is proprietary and closed source (belongs to Garf), so it's automatically incompatible with SRC's GPL.
PatchWorKs
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
Apparently not. You can hear it straight from the horse's mouth.

http://www.hydrogenaudio.org/forums/index....ndpost&p=212899
askoff
QUOTE(rjamorim @ Mar 29 2005, 08:35 PM)
QUOTE(PatchWorKs @ Mar 29 2005, 01:06 PM)
PPHS
*



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
Great work John33, thanks a lot! cool.gif
rjamorim
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)
john33
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
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
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?
daphy
I fine tool, I really enjoy it! smile.gif

THX Daphy
Mr_Rabid_Teddybear
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.... unsure.gif smile.gif

john33
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.... unsure.gif smile.gif
*


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.
Invision Power Board © 2001-2008 Invision Power Services, Inc.