Jump to content

Ittaku

Extreme filtering software upscaling

Recommended Posts

This thread could go either in DACs or software, but I think it's better suited to DACs in this case.

 

I was inspired by a recent audition of the Chord MScaler in my system, courtesy of @Sime V2 as many would have read about on the thread below:

https://www.stereo.net.au/forums/topic/260051-chord-hugo-m-scaler-discussion-and-impressions-thread/

 

My experience was only positive with the upscaling from this device, which attempts to recreate a perfect sinc approximation by using their proprietary Watts Transient Aligned filter and up to 1 million taps for the upscaling. Apart from the WTA, there is nothing unknown about sinc upscaling and it's perfectly doable in PC, but the MScaler provides a very convenient single box to do the upscaling. However the disadvantage is that to get the maximum benefit, you need to upscale to over 700kHz from either 44 or 48 sources, and use Chord's proprietary interface out which only Chord DACs have. What I set out to do was hack away on the existing free software code to allow it to do obscene upscale levels and find the realistic limits of doing it on PC. The fun part was I did exactly what Sox told me not to do "note that band-width values greater than 99% are not recommended for normal use as they can cause excessive transient echo" which is of course echo above the limits of human hearing and is exactly what the Chord upscalers do already.

 

The limits I found on PC were mainly to do with the fact that the upscaling software (sox) is running single threaded but can still run faster than real time up to levels limited only by ram. I did not run out of ram on my PC per se, but the method of allocating ram in the sox rescaler could not allocate larger than 4GB (a common 32 bit limitation.) Nonetheless, this hit a limit at quite obscene levels, with a brick wall filter of 99.999996% bandwidth and impulse recreation (over 22 bits) and a rejection of 204dB coming to a total of 78 million taps. The difference, however, is I'm only doubling the sample rates to either 88.2 or 96, making the resultant files much more usable. Whilst it is possible to start with higher sample rates and go to any levels (such as the MScaler does), I can't feed those into my DSP since it would just downsample them to 88 or 96 again, and I can still use the ridiculous number of taps with just the one doubling of sample rate, unlike the MScaler.

 

So what's the audible advantage? Note that I'm running into an MSB Reference DAC which is a ladder type DAC, and interaction between device and source could make for very different results. None of these are earth shattering improvements that would make you drop everything and try to do this ASAP, but on a very resolving system are appreciable. There is a focusing and recession of the sound stage back, the bass tends to be more focused, the top end sweeter, but with more bloom around it so there's more natural sparkle and presence to cymbals and high frequencies. Voices and midrange instrument timbres have a hard edge taken off them and added warmth. There's an extra depth to detail - vibratos sound somehow more present as though they're doing it more vigorously. String instruments which have certain strident notes just sound warmer and more listenable.

 

I briefly experimented with doing it on the fly with my existing files but that particular code was very unhappy and will need a lot more attention to make it work. The other thing is when I first start the conversion, there's a 4 second startup time as it fills buffers and allocates ram, even though later on it proceeds much faster than real time, which would need a workaround in the real world. The media player would likely dump a ton of music into the buffer rapidly and not know where it's really up to so that would need to be accounted for in the playback. I'm not actually sure that this would work as a standalone "device" in the real world because most players assume that what they're streaming is being played with no to minimal latency and wouldn't dump many seconds worth of music happily. This is the advantage of pre-converting files and then storing them upscaled. These changes were of enough benefit that I've run a script through all my lower resolution files to upscale them for my own use.

 

If any of you have a short 44 or 48kHz reference wav or flac file they would like to try it on, and have somewhere to upload it to, I'd be happy to upscale it for you. Just message me. These files get unwieldy and large so it has to be short, and most files will need to have their volume lowered by 2dB during the conversion to prevent them clipping, which you'd need to account for when doing comparisons.

Edited by Ittaku

Share this post


Link to post
Share on other sites

I have locked in my Dac to a R2R dac, so this intrigues me to try upsampling in software. If anyone releases a m scaler type product for USB, I would sure like to try it.

I was playing around with HQPlayer but really unimpressed with the interface. (Scaling of the options interface is so hard to read). I use a 65" TV and scale fonts to the recommended 130% and all my software works perfect, except for HQplayer. Even all my free software, Foobar, Aimp etc... no problems. But a $200+ bit of software, no. I take it is being ported from another OS, but still think its been around a while? 

I could not hear any difference with initial use of HQPlayer. Will read up more on it and try again some time.

 

Edited by rocky500

Share this post


Link to post
Share on other sites

Many thanks for going down this experimental path - and offering to do a test upsample!

 

I have just PMed you - hope the track is not too long at 3 mins.

Share this post


Link to post
Share on other sites

I read most of the MScaler thread and now this new one. I have some (maybe dumb) questions.

One question I have is if you are upsampling and using a filter the file will no longer be bit perfect with the original will it?

Another area I don't understand is if you apply a filter to the file and then input it to your DAC the DAC will also be applying a filter/s as well so what is going on.

Share this post


Link to post
Share on other sites
9 minutes ago, a.dent said:

I read most of the MScaler thread and now this new one. I have some (maybe dumb) questions.

One question I have is if you are upsampling and using a filter the file will no longer be bit perfect with the original will it?

Another area I don't understand is if you apply a filter to the file and then input it to your DAC the DAC will also be applying a filter/s as well so what is going on.

That's correct. We're screwing with the bits. You're left with a different file with different bits, and extrapolated bits to make up the 24 bits and higher frequency sample rate. If you try to convert it back to its original format you will never get the same file. One thing you have to understand is that most DACs will oversample it anyway before playing it back at a higher frequency, so doing this step in software is (theoretically) moving the most critical part of the filtering into a separate upsampling that takes a lot more time and computing power than can be done 'live' on a DAC. The DAC will then (depending on design) almost certainly oversample it further to whatever sample rate it likes running at, but any filtering it then applies happens at a higher frequency and bit rate which has almost no impact in the audible range. It's fair to say that my DAC is extreme in its approach and its oversampling is (in my opinion) very good, and regular upscaling that I did previously didn't sound as good as sending it the native format. However that's not the case when I upscale it with this ridiculous approach (and an 80 million tap filter is quite ridiculous, and unusable in real time.)

Share this post


Link to post
Share on other sites

@Ittaku

 

Did this a while ago in an earlier thread. Getting the frequency up as far as possible as obvious time domain effects which can be advantageous depending on the material. Some DACs are setup to run as such natively (e.g. Phasure etc).

 

Would probably be not too hard to implement this to some limited degree on a RasPi, plenty of DSP solutions exist if you're happy handling all the extra work involved. Piping SoX isn't too hard.

Share this post


Link to post
Share on other sites


1 hour ago, Ittaku said:

That's correct. We're screwing with the bits. You're left with a different file with different bits, and extrapolated bits to make up the 24 bits and higher frequency sample rate. If you try to convert it back to its original format you will never get the same file. One thing you have to understand is that most DACs will oversample it anyway before playing it back at a higher frequency, so doing this step in software is (theoretically) moving the most critical part of the filtering into a separate upsampling that takes a lot more time and computing power than can be done 'live' on a DAC. The DAC will then (depending on design) almost certainly oversample it further to whatever sample rate it likes running at, but any filtering it then applies happens at a higher frequency and bit rate which has almost no impact in the audible range. It's fair to say that my DAC is extreme in its approach and its oversampling is (in my opinion) very good, and regular upscaling that I did previously didn't sound as good as sending it the native format. However that's not the case when I upscale it with this ridiculous approach (and an 80 million tap filter is quite ridiculous, and unusable in real time.)

I've got HQPlayer and have tried many different filters and settings. I tried converting to DSD.

All in all I think the native file straight into my Accuphase DP-560 sounds the best. i.e. not using HQPlayer.

Is the Accuphase doing this type of upsampling? It apparently has a FPGA chip in it.

Share this post


Link to post
Share on other sites
1 minute ago, a.dent said:

I've got HQPlayer and have tried many different filters and settings. I tried converting to DSD.

All in all I think the native file straight into my Accuphase DP-560 sounds the best. i.e. not using HQPlayer.

Is the Accuphase doing this type of upsampling? It apparently has a FPGA chip in it.

That was also my experience with regular PC upscalers, even on the most extreme settings. However I've hacked it to do ludicrous things the upscalers don't normally do, and find the sound better this way. It is likely to be system and or DAC dependant. No DAC upscales the way I'm doing here, and couldn't even if they wanted to for lack of processing power, ram, and the massive latency it would add (about 10 seconds). The chord upscaler is what does a smaller version of this and inspired this experiment.

Share this post


Link to post
Share on other sites
17 minutes ago, rmpfyf said:

@Ittaku

 

Did this a while ago in an earlier thread. Getting the frequency up as far as possible as obvious time domain effects which can be advantageous depending on the material. Some DACs are setup to run as such natively (e.g. Phasure etc).

 

Would probably be not too hard to implement this to some limited degree on a RasPi, plenty of DSP solutions exist if you're happy handling all the extra work involved. Piping SoX isn't too hard.

Interesting. How would you go about handling

80 million taps on an RPi?

Share this post


Link to post
Share on other sites
12 minutes ago, Ittaku said:

Interesting. How would you go about handling

80 million taps on an RPi?

 

I wouldn't! Hence 'limited degree'. 

 

DSP job, though the necessity of so many taps somewhat extreme, would suggest much of the effect has much to do with output sample rates. 

 

PM if interested!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×