Set Oversampling Threshold / Limit

Submit your proposals and ideas here.
WitzyZed
Posts: 59
Joined: Fri Nov 22, 2019 8:49 pm

Set Oversampling Threshold / Limit

Post by WitzyZed » Sun Nov 22, 2020 9:13 pm

I don't know enough of the logic going on behind the hood of Neutron as far as Oversampling and sample rate switching goes, but I hope it could be feasible to do the following:

Have any content with sample rate of less than or equal to 48 kHz undergo oversampling by the chosen multiplier.

Have any content with sample rate greater than or equal to 88.2 kHz not undergo oversampling.

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

Re: Set Oversampling Threshold / Limit

Post by blaubär » Mon Nov 23, 2020 4:57 am

As to oversampling generally also see
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.

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

Re: Set Oversampling Threshold / Limit

Post by blaubär » Mon Nov 23, 2020 5:00 am

So want an upper/lower limit for oversampling ... well, you could just tell Neutron to use a certain frequency, say 192 kHz. I rather doubt that there's a real problem with non-even upscaling.

WitzyZed
Posts: 59
Joined: Fri Nov 22, 2019 8:49 pm

Re: Set Oversampling Threshold / Limit

Post by WitzyZed » Mon Nov 23, 2020 6:31 am

I’d prefer to not to use non-even upsampling to some fixed rate. If something is above the chosen threshold, I’d like it to be played as is. If it is 44.1 or 48, I would like it to be over sampled to 88.2 and 96 respectively. Reason behind wanting this feature is tied to behavior of spectrum display and waveform widget. As sampling rate increases, visibility of either visual effect suffers unnecessarily. (I’m going to follow up sometime shortly with a recorded video of what I mean)

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

Re: Set Oversampling Threshold / Limit

Post by blaubär » Mon Nov 23, 2020 7:34 am

WitzyZed wrote:
Mon Nov 23, 2020 6:31 am
Reason behind wanting this feature is tied to behavior of spectrum display and waveform widget. As sampling rate increases, visibility of either visual effect suffers unnecessarily.
You can switch that off for the spectrum analyzer :

sa1.JPG
sa1.JPG (10.81 KiB) Viewed 713 times
sa2.JPG
sa2.JPG (20.48 KiB) Viewed 713 times

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

Re: Set Oversampling Threshold / Limit

Post by blaubär » Thu Nov 26, 2020 6:38 pm

I moved this to support ... any problems with spectrum analyzer or rms widget won't be solved by oversampling or not oversampling ...

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

Re: Set Oversampling Threshold / Limit

Post by blaubär » Tue Dec 15, 2020 11:28 am

WitzyZed wrote:
Sun Nov 22, 2020 9:13 pm
I don't know enough of the logic going on behind the hood of Neutron as far as Oversampling and sample rate switching goes, but I hope it could be feasible to do the following:

Have any content with sample rate of less than or equal to 48 kHz undergo oversampling by the chosen multiplier.

Have any content with sample rate greater than or equal to 88.2 kHz not undergo oversampling.
Thought a bit about this ... and moved it to Development ... might indeed be useful if you want to have at least a certain miminum sampling rate ... but not to much ... and would prefer oversampling

WitzyZed
Posts: 59
Joined: Fri Nov 22, 2019 8:49 pm

Re: Set Oversampling Threshold / Limit

Post by WitzyZed » Wed Jan 13, 2021 1:00 am

I'm going to detail the most absurd workaround to my issue, just stay with me...

(I know my example ventures into MQA territory, but not for the reason one might expect at first)

https://www.mediafire.com/folder/u4og2u9efefzh/Test
(Folder containing 8 otherwise identical audio files, just with different permutations of metadata)

The test file itself is 16bit/44.1kHz.
Its ORIGINALSAMPLERATE tag, i.e "pre MQA" sample rate is "44100".

In all but the first test file iteration, ORIGINALSAMPLERATE tag has been edited in Mp3Tag to value of "88200"

Oversampling Ratio in Neutron has been set to 2

Encoder tag and MQAENCODER tag in test file are identical:

MQAEncode v1.1, 2.3.3+800 (a505918), F8EC1703-7616-45E5-B81E-D60821434062, Dec 10 2017 07:43:32

Test File #1 appears as MQA, playback at 44.1kHz
ENCODER tag (untouched)
MQAENCODER tag (untouched)
ORIGINALSAMPLERATE tag (untouched)
**Whenever 'MQA' is recognized by Neutron, Oversampling Ratio is ignored and ORIGINALSAMPLERATE tag is obeyed**

Test File #2 appears as MQA, playback at 88.2kHz
ENCODER tag (untouched)
MQAENCODER tag (untouched)
ORIGINALSAMPLERATE tag (88200)
**By changing ORIGINALSAMPLERATE tag, with an MQA encoded track, sample rate can be defined by user.**

Test File #3 does NOT appear as MQA, playback at 88.2kHz
ENCODER tag (removed)
MQAENCODER tag (untouched)
ORIGINALSAMPLERATE tag (88200)
**So with the ENCODER tag removed, MQA is NOT recognized!**

Test File #4 appears as MQA, playback at 88.2kHz
ENCODER tag (untouched)
MQAENCODER tag (removed)
ORIGINALSAMPLERATE tag (88200)
**Yet, with the MQAENCODER tag removed, MQA IS recognized, and ORIGINALSAMPLERATE tag is obeyed**

Test File #5 appears as MQA, playback at 88.2kHz
ENCODER tag (truncated)
MQAENCODER tag (untouched)
ORIGINALSAMPLERATE tag (88200)
**With Encoder tag truncated to "MQAEncode v1.1", MQA is recognized, and ORIGINALSAMPLERATE tag is obeyed**

Test File #6 appears as MQA, playback at 88.2kHz
ENCODER tag (untouched)
MQAENCODER tag (truncated)
ORIGINALSAMPLERATE tag (88200)
**With MQAENCODER tag truncated to "MQAENCODE v1.1", MQA is recognized, and ORIGINALSAMPLERATE tag is obeyed**

Test File #7 appears as MQA, playback at 88.2kHz
ENCODER tag (truncated)
MQAENCODER tag (truncated)
ORIGINALSAMPLERATE tag (88200)
**With truncated ENCODER and MQAENCODER tags, MQA is recognized, and ORIGINALSAMPLERATE tag is obeyed**

Test File #8 appears as MQA, playback at 88.2kHz
ENCODER tag (truncated)
MQAENCODER tag (removed)
ORIGINALSAMPLERATE tag (88200)
**With ONLY truncated "MQAENCODE v1.1" ENCODER tag, MQA is recognized, and ORIGINALSAMPLERATE tag is obeyed**

So hypothetically, one could place* this dummy "MQAENCODE v1.1" text to ANY file's ENCODER tag metadata, as well as add ORIGINALSAMPLERATE tag metadata equal to the original sample rate for any files in their library that are greater than 88.2kHz.

(*I am assuming that one does not particularly care about any original ENCODER tag metadata to any great degree)

In doing so, oversampling would be obeyed for files of 44.1kHz and 48kHz sample rate, and original sample rate would remain for 88.2kHz files and above.

WitzyZed
Posts: 59
Joined: Fri Nov 22, 2019 8:49 pm

Re: Set Oversampling Threshold / Limit

Post by WitzyZed » Wed Jan 13, 2021 2:35 am

Here is the follow-up video I had said I was going to share, finally went about recording my thoughts on this matter, as trivial as they may be. I hope this does help explain my request for such a feature, or illustrate why I or my device's settings could be at fault.

WitzyZed
Posts: 59
Joined: Fri Nov 22, 2019 8:49 pm

Re: Set Oversampling Threshold / Limit

Post by WitzyZed » Fri Jan 29, 2021 8:16 pm

For what it's worth, adding ENCODER and ORIGINALSAMPLERATE tags only trigger "MQA" override of oversampling settings if the file is FLAC. No dice for my m4a/ALAC files.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest