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: a resampler that does <this>: (Read 6917 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

a resampler that does <this>:

my sound card is the m-audio revolution. this card supports samplerate switching which means that when i playback a 44.1khz file the card puts out 44.1khz and if i playback a 48khz file it puts out 48khz.

but there are some problems with files with very low sample rates which the card can't output. foobar displays me an error msg (error opening device) then.

one solution would be to resample anything to 44.1khz which indeed works but there is no need to resample 48 or 32khz files, because the card supports this sample rate. i only want to resample 8khz or 16khz to 44.1 for example but leave 44.1, 32, 48 etc alone.

for this i would be a more config-friendly resampler. anyone interessted in adding such features to the current one?

thanks, xenion.


edit:
i could imagine a dropdown menu where you can chose any re-sample rate for any sample rate:

Code: [Select]
8000 => 44100
11025 => 44100
16000 => 44100
22050 => 44100
24000 => 44100
32000 => 32000
44100 => 44100
48000 => 48000
64000 => 44100
88200 => 44100
96000 => 44100


btw: does the resampler "resample" 44.1k files when i chose 44100 in the menu or does it just leave them alone (no resampling, because it is already the target sample rate?)

a resampler that does <this>:

Reply #1
Quote
btw: does the resampler "resample" 44.1k files when i chose 44100 in the menu or does it just leave them alone (no resampling, because it is already the target sample rate?)


I'd also like to know if using a resampler (ssrc/pphs) DSP is safe in case input and output samplerate are the same.
I play both files from CD (44,1 kHz) and digital radio (48 kHz) with resampler activated @48 kHz.

a resampler that does <this>:

Reply #2
In case of equal input/output rates no resampling is done.

a resampler that does <this>:

Reply #3
a small checkbox like: "Upsample only" would be enough IMO 

a resampler that does <this>:

Reply #4
Quote
a small checkbox like: "Upsample only" would be enough IMO  

I think that is a good idea.

a resampler that does <this>:

Reply #5
I have the same sound card, and I have no problem with odd sample rates. Maybe it is because I use DirectSound output and let the kernel mixer service handle the resampling.

a resampler that does <this>:

Reply #6
What about a drop-down listbox which contains settings of the native supported samplerates (and combinations of them) instead of target samplerate?

E.g.: Supported Samplerate: 32000 , 48000

Resampling:

8000, 11025, 16000, ... => 32000

44100, 64000, 96000 => 48000

a resampler that does <this>:

Reply #7
Quote
I have the same sound card, and I have no problem with odd sample rates. Maybe it is because I use DirectSound output and let the kernel mixer service handle the resampling.

i use KS

a resampler that does <this>:

Reply #8
A conditional resampler would be handy with Audigy 2 as well, at least with the Creative drivers, which appear to do little damage to audio that can be routed through the p16v module that supports 48, 96 and possibly 192 khz at least, and possibly rates in between. 44.1 khz however still appears to be upsampled by the card, so resampling this is a good idea. I vote for the PPHS resampler with 'Upsample Only' option!

It is important to note, however, that this probably only worth it with analog output, and even then it is uncertain. This is because SPDIF will output at the frequency set in AudioHQ/Kx control panel no matter what. It can be set to 48khz or 96khz in the CL drivers, so resampling to one of these in software should give the best possible quality through SPDIF. I wonder whether it is better to resample to 96 khz or 48 khz for 44.1 khz audio, assuming that it will remain at the resampled frequency... anyone know?

a resampler that does <this>:

Reply #9
Sort of a nitpick but:

Quote
8000 => 44100
11025 => 44100
16000 => 44100
22050 => 44100
24000 => 44100
32000 => 32000
44100 => 44100
48000 => 48000
64000 => 44100
88200 => 44100
96000 => 44100


You probably want to keep your resampling to even multiples in order to avoid aliasing issues as much as possible:


Quote
8000 => 32000
11025 => 44100
16000 => 32000
22050 => 44100
24000 => 48000
32000 => 32000
44100 => 44100
48000 => 48000
64000 => 48000 // It seemed a shame to resample 64k all the way down to 32k, and .75 is even enough
88200 => 44100
96000 => 48000

a resampler that does <this>:

Reply #10
Quote
i could imagine a dropdown menu where you can chose any re-sample rate for any sample rate:

good suggestion!!!

a resampler that does <this>:

Reply #11
Maybe I'm wrong but a - upsample only - switch has the following disadvantages with emu 1xxx series soundcards in three scenarios:
(the soundcard supports no samplerates between 48 kHz und 96 kHz according datasheet)

- Target sample rate 48 kHz, upsample only on:
Problems playing files with samplesrates between 48 kHz and 96 kHz.

- Target sample rate 48 kHz, upsamle only off:
Files with higher samplerates are resampled to 48 kHz

- Set target sample rate to 96 kHz and then there is no need for a upsamle only switch, but files with native supported samplerates by soundcard getting resampled

That are only my thoughts about it, I know this is only important for a small number of people with that type of soundhardware playing files with samples between 48 kHz and 96 kHz.

a resampler that does <this>:

Reply #12
Quote
- Target sample rate 48 kHz, upsample only on:
Problems playing files with samplesrates between 48 kHz and 96 kHz.

Do those files exist?

A simple checkbox is much cleaner than having to add dropdown lists, which can only cover a fixed set of rates anyway.

a resampler that does <this>:

Reply #13
Quote
Quote
- Target sample rate 48 kHz, upsample only on:
Problems playing files with samplesrates between 48 kHz and 96 kHz.

Do those files exist?

I don't have such files and never saw them in the wild
but the samplerate of 88,2 kHz is in the DVD-Audio specifications and is supported by professional audio software (e.g. SonicStudio. Steinberg Cubase).

I assume such files exists at least in studios of music producers.

Forgot to mention: The emu card doesn't play samples below 44 kHz, resampling is needed for e.g. 32 kHz sampled files.

a resampler that does <this>:

Reply #14
Not whidespread enough to care about

BTW. Resampling a not so common sampling rate 'once too much' is not something which is very problematic...the resamplers will not degrade quality audibly (though it is indeed a pointless loss of cpu cycles).

a resampler that does <this>:

Reply #15
Quote
Not whidespread enough to care about :)

BTW. Resampling a not so common sampling rate 'once too much' is not something which is very problematic...the resamplers will not degrade quality audibly (though it is indeed a pointless loss of cpu cycles).

I see.

Another suggestion:
What do you think about four checkboxes (for the most common samplesrates) to set exceptions not to be resampled.

Most common samplesrates: 32000, 44100, 48000, 96000

a resampler that does <this>:

Reply #16
That also looks like an OK solution.

a resampler that does <this>:

Reply #17
One possibility would be to try a matrix arrangement and you could check off the conversions that you want. This would be the most flexible type of arrangement. I expect it would look something like the matrix mixer available in media player classic (another cool thing to implement in foobar2000 ). In the example below the card supports 32kHz to 192kHz output sampling rates (like the M-Audio Revolution). The resampler configuration would probably look like this:
Code: [Select]
 \OUT                          1
 \        1 1 2 2 3 4 4 6 8 9 9
IN\     8 1 6 2 4 2 4 8 4 8 6 2
   \    0 0 0 0 0 0 1 0 0 2 0 0
    \   0 2 0 5 0 0 0 0 0 0 0 0
     \  0 5 0 0 0 0 0 0 0 0 0 0
       ________________________
      |
 8000 |           x
11025 |             x
16000 |           x
22050 |             x
24000 |               x
32000 |           x
44100 |             x
48000 |               x
64000 |                 x
88200 |                   x
96000 |                     x
192000|                       x

Invalid output sampling rates could either be greyed out or not available in the output section. Just my 2c.
Anish

Edit: Added more description for the example and fixed a mistake in the example.

a resampler that does <this>:

Reply #18
No way, see my statements above why not. An extra checkbox or two for the most common situation is acceptable, a matrix resampling config is complete utterless unneeded bloat.

Quote
Invalid output sampling rates could either be greyed out or not available in the output section.


There is no way for the resampler to determine what the card can properly handle and what not. If it could, the resampler would probably not have any cfg at all!

a resampler that does <this>:

Reply #19
Hmmm, I see your point. I got carried away .

a resampler that does <this>:

Reply #20
A simple "If sample_rate<x then upsample to y" would solve most situations.

As Garf says, apart from CPU cycles, upsampling everything to 96k will do the trick - except for AC-3 and DTS files, which would be broken by _any_ DSP anyway, and so should have a "absolutely no DSP to be applied to these files" tag.

Cheers,
David.

a resampler that does <this>:

Reply #21
I like the "don't resample these rates" idea because it reflects reality well, and is pretty clean. Your card supports several rates and the others will have to be resampled to one of those rates. You just check what your card can handle (well) and voila...

a resampler that does <this>:

Reply #22
My suggestion for pphs resampler:

Set the target sample rate to a fixed value of 48 kHz, because all modern soundcards support that rate. The pphs dsp is mainly addressed to bypass internal resampling isues of soundcards, if I'm right.

Add only three checkboxes to exlude by soundcard supported sample rates
(32000, 44100, 96000)
and "ultra mode" checkbox.

For convertions to other (less used) samplerates und file processing there is still the ssrc resampler.

a resampler that does <this>:

Reply #23
There is a point to this, but unfortunately, my own soundcard, Audigy 2 NX, supports only 1 samplerate at the time and resamples everything else to it, and I've set it to 96000Hz.

So I would shoot myself in the foot by forcing 48khz  (though 48k->96k has less issues than 44.1)

Also, the nice thing about this resampler is that it can handle any combination, don't want to break that.

a resampler that does <this>:

Reply #24
Hello Garf,

oh, I see, you are proud of your "baby". 

Then I've nothing more to say then "Happy coding..." (original by Ace of Base)
(Proposed by me to become a programmers hymn)