What would be the benefit of upsampling

Support questions for Neutron Player only (http://neutroncode.com/apps/player).
blaubär
Posts: 3639
Joined: Tue Apr 02, 2019 6:48 am

What would be the benefit of upsampling

Post by blaubär » Sun Jan 17, 2021 9:49 am

For the general meaning see upsampling.
For a general discussion see Upsampling vs. Oversampling for Digital Audio .
An introduction can be found at Introduction.

Let's say you play a file with a sampling rate of 88.2 kHz. That means there's a upper limit of 44.1 kHz for the frequency which can be handled by the player. If you come near that boundary the processing will get worse. If you increase the sampling rate with which Neutron processes the data, you can mitigate these effects. As an example here's a sweep ( sine wave that starts at low frequencies and increases the frequency uniformly ) from 0 to 44.1 kHz. I played it on my phone, recorded the analog output and displayed it in Audacity. Here are the last two seconds before and shortly after it hits the peak :

waveform-0.jpg
waveform-0.jpg (21.53 KiB) Viewed 7002 times
spektrogramm-0.jpg
spektrogramm-0.jpg (36.86 KiB) Viewed 7002 times
spektrum-0.jpg
spektrum-0.jpg (35.63 KiB) Viewed 7002 times
And this is a comparable view where I had the sampling rate increased :

waveform-4.jpg
waveform-4.jpg (21.96 KiB) Viewed 7002 times
spektrogramm-4.jpg
spektrogramm-4.jpg (39.14 KiB) Viewed 7002 times
spektrum-4.jpg
spektrum-4.jpg (30.2 KiB) Viewed 7002 times
Without upsampling we see frequencies about the limit of 44.1 kHz, which hadn't been in the sweep that was played. Upsampling removed these disturbances.

blaubär
Posts: 3639
Joined: Tue Apr 02, 2019 6:48 am

Re: What would be the benefit of upsampling

Post by blaubär » Sun Jan 17, 2021 9:54 am

As to the question of how best to achieve upsampling in Neutron see the following discussion :
blaubär wrote:
Thu Feb 13, 2020 4:38 pm
Some things about the sampling rate that I found out in the meantime :

1. If Neutron resamples, it resamples the output of the decoder and feeds the DSP with the new sampling rate, so the DSP will work with the new sampling rate, and deliver data with this rate to the output.

2. If the firmware resamples, it will do so only after the DSP and only if it doesn't support the sampling rate delivered by the DSP. If the DSP delivers a supported sampling rate the firmware won't resample.

3. If you activate Audio Hardware > Oversampling then Audio Hardware > Frequency will be ignored.

4. Audio Hardware > Oversampling sets the sampling rate to an even multiple of the input. This is a good thing on its own, better than a non-even multiple. But if the resulting sampling rate isn't supported by the device the firmware will resample again after the DSP to the best suitable rate.

5. Audio Hardware > Frequency will set the sampling rate to a value supported by the device. This is a good thing on its own. But it might force Neutron to resample to an non-even multiple, which isn't as perfect as resampling to an even multiple.
It seems that in recent versions Neutron doesn't use non-supported sampling rates at all. So "Oversampling" means something like follow-source-frequency-multiplied-by-n. And should the device not support high-res-audio at all then Neutron will resample to 48 kHz no matter what else has been set.

blaubär
Posts: 3639
Joined: Tue Apr 02, 2019 6:48 am

Re: What would be the benefit of upsampling

Post by blaubär » Thu Jan 28, 2021 5:42 am

Another reason for upsampling : Dither with noise-shaping might work better with a higher sampling rate, because then it can shift the noise to higher frequencies. See the following example, two spectrums from dithering with different sampling rates:

ups-spek.jpg
ups-spek.jpg (154.93 KiB) Viewed 6904 times

Krzychu____
Posts: 18
Joined: Wed Aug 23, 2017 7:04 am

Re: What would be the benefit of upsampling

Post by Krzychu____ » Sun Mar 07, 2021 6:21 am

on which DAC were the measurements taken?

blaubär
Posts: 3639
Joined: Tue Apr 02, 2019 6:48 am

Re: What would be the benefit of upsampling

Post by blaubär » Sun Mar 07, 2021 7:26 am

Krzychu____ wrote:
Sun Mar 07, 2021 6:21 am
on which DAC were the measurements taken?
Internal DAC of Samsung Galaxy S9 ( Exynos 9810 ).

Krzychu____
Posts: 18
Joined: Wed Aug 23, 2017 7:04 am

Re: What would be the benefit of upsampling

Post by Krzychu____ » Sun Mar 07, 2021 8:57 am

does this mean that Neutron used the internal Android system mixer? Are there any measurements with USB output and Android mixer bypass?

blaubär
Posts: 3639
Joined: Tue Apr 02, 2019 6:48 am

Re: What would be the benefit of upsampling

Post by blaubär » Sun Mar 07, 2021 10:28 am

Krzychu____ wrote:
Sun Mar 07, 2021 8:57 am
does this mean that Neutron used the internal Android system mixer? Are there any measurements with USB output and Android mixer bypass?
I don't know what the "mixer" is. And I don't use any USB DAC.

Krzychu____
Posts: 18
Joined: Wed Aug 23, 2017 7:04 am

Re: What would be the benefit of upsampling

Post by Krzychu____ » Sun Mar 07, 2021 10:54 am

It seems to me that only with USB you can bypass the Android audio driver's system limitation. typically 44.1 - 48 kHz. This is the audio specification of Android. Can a neutron without an external USB DAC transfer data over> 48kHz to the internal converter of an Android device?

blaubär
Posts: 3639
Joined: Tue Apr 02, 2019 6:48 am

Re: What would be the benefit of upsampling

Post by blaubär » Sun Mar 07, 2021 11:31 am

Krzychu____ wrote:
Sun Mar 07, 2021 10:54 am
It seems to me that only with USB you can bypass the Android audio driver's system limitation. typically 44.1 - 48 kHz. This is the audio specification of Android. Can a neutron without an external USB DAC transfer data over> 48kHz to the internal converter of an Android device?
Well, obviously it can :D. Also see Hi-Res Audio for Android devices.

Julius Decimus
Posts: 25
Joined: Fri Feb 19, 2021 10:47 pm

Re: What would be the benefit of upsampling

Post by Julius Decimus » Sun Mar 07, 2021 12:23 pm

These are very interesting topics. Very good.

I am curious how this would look with upsampling to DSD. How far are the disturbances moved. With the best settings that there are Neutron now, 64bit processing + DSD128. Or meybe better with DSD64 as most people are saying it has huge noise introduced above 23khz and will be more interesting for someone that can read the forum later.

Based on this: https://www.theregister.com/2018/04/13/ ... mp/?page=3

Had a look what DAC is probably in this phone, seems to be this: https://statics.cirrus.com/pubs/proData ... 131_F1.pdf

At the very beginning says is 32bit sigma-delta type with max 384khz PCM. And max. DSD256.

Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests