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: Resampler plugin (Read 486392 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: Resampler plugin

Reply #575
Would you please add one more configuration setting, which do upsample 4x for [0, 48]kHz and 2x for (48, 96]kHz source.

Thanks.

You can do this with SoX_resampler_mod.

Just add 2 resamplers to DSP chain. First makes 4x upsampling and passes 64000,88200,96000 unmodified. Second makes 2x upsampling and passes 128000,176400,192000 unmodified.

Wouldn't it be simpler do resample 44100,48000,64000,88200,96000,128000,176400,192000 to "UP to 352k/384k"?
And if I want it in two steps I would put
1st 44100,48000,64000,88200,96000,128000 to "UP to 176k/192k"
2nd 176400,192000 to "UP to 352k/384k"

What is the benefit of going into the up-sampling in two steps and not straight forward?
I am still playing with this plugin as I am not 100% sure I can hear any difference in audio so may it all be just placebo. :-)

Re: Resampler plugin

Reply #576
Do I understand correctly that in the case of SoX, the following settings are optimal for downsampling?

• Join our efforts to make Helix MP3 encoder great again
• Opus complexity & qAAC dependence on Apple is an aberration from Vorbis & Musepack breakthroughs
• Let's pray that D. Bryant improve WavPack hybrid, C. Helmrich update FSLAC, M. van Beurden teach FLAC to handle non-audio data

Re: Resampler plugin

Reply #577
@seventhstart, I use the settings you mentioned.

Of course, I'd like to better understand things like
a) minimum vs linear phase in the resampler and
b) TPDF with highpass vs noise-shaped dithering.

The knowledge about sound that travels from article to article is often a set of slang words like a ringing artifact — a rare expert tries to build a bridge to the common people with the help of vernacular language and clearer metaphors (think Carl Sagan, a popularizer of astronomy).

But no doubt, our current conversion setup produces good results.

• Join our efforts to make Helix MP3 encoder great again
• Opus complexity & qAAC dependence on Apple is an aberration from Vorbis & Musepack breakthroughs
• Let's pray that D. Bryant improve WavPack hybrid, C. Helmrich update FSLAC, M. van Beurden teach FLAC to handle non-audio data

Re: Resampler plugin

Reply #578
@lvqcl Please add “Upsample x8” to your SoX Resampler (mod) plugin. This will be useful for true peak scanning.
• Join our efforts to make Helix MP3 encoder great again
• Opus complexity & qAAC dependence on Apple is an aberration from Vorbis & Musepack breakthroughs
• Let's pray that D. Bryant improve WavPack hybrid, C. Helmrich update FSLAC, M. van Beurden teach FLAC to handle non-audio data

Re: Resampler plugin

Reply #579
Of course, I'd like to better understand things like
a) minimum vs linear phase in the resampler and
b) TPDF with highpass vs noise-shaped dithering.

Ken Pohlmann's 'Principals of Digital Audio' has all the answers you seek, required reading for anyone serious about digital audio. Could do with another update though, a lot changed in the last decade!

https://www.amazon.com/Principles-Digital-Audio-Sixth-Video/dp/0071663460/ref=sr_1_2?crid=1CXRFT0P6IMNT

Re: Resampler plugin

Reply #580
@darkflame23 Thank you for the recommendation. I got the 6th edition of that book from Library Genesis and my head was about to explode on the very first page after reading the following paragraph: “Sound is propagated by air molecules through successive displacements that correspond to the original disturbance. In other words, air molecules colliding one against the next propagate the energy disturbance away from the source. Sound transmission thus consists of local disturbances propagating from one region to another. The local displacement of air molecules occurs in the direction in which the disturbance is travel­ing; thus, sound undergoes a longitudinal form of transmission”. On the second page, it was joined by the imperial units of measurement (miles, feets, pounds, Fahrenheit, etc), which I cannot imagine, and on the third I was overwhelmed with logarithms and negative powers in fractions. In my opinion, this approach may tell someone something, but it will not make the sound field more accessible to a wider range of readers.
• Join our efforts to make Helix MP3 encoder great again
• Opus complexity & qAAC dependence on Apple is an aberration from Vorbis & Musepack breakthroughs
• Let's pray that D. Bryant improve WavPack hybrid, C. Helmrich update FSLAC, M. van Beurden teach FLAC to handle non-audio data


Re: Resampler plugin

Reply #582
Of course, I'd like to better understand
So, what is stopping you from doing this?

I indicated the reason immediately after the fragment you quoted.

Quote
The knowledge about sound that travels from article to article is often a set of slang words like a ringing artifact — a rare expert tries to build a bridge to the common people with the help of vernacular language and clearer metaphors (think Carl Sagan, a popularizer of astronomy).

Are you aware of the sound field popularizers like Carl Sagan? You have to look for them in the daytime with a flashlight. For example, here's a practical question: why Foobar2000 uses dither with noise-shaping (Shibata profile, I guess), which saturates the high-frequency region, if MP3 encoders often cuts off above 16 kHz? Alas, it's off-topic right here, but I hope you understand that pushing complex math formulas to answer this question is an overkill. Many professionals lack the ability to communicate using accessible analogies like packaging cheese, as if they were afraid that by answering in an accessible way they would lose the mysterious aura of professionalism that allows them to feel superior.
• Join our efforts to make Helix MP3 encoder great again
• Opus complexity & qAAC dependence on Apple is an aberration from Vorbis & Musepack breakthroughs
• Let's pray that D. Bryant improve WavPack hybrid, C. Helmrich update FSLAC, M. van Beurden teach FLAC to handle non-audio data

Re: Resampler plugin

Reply #583
So, what is stopping why Foobar2000 uses dither with noise-shaping (Shibata profile, I guess), which saturates the high-frequency region, if MP3 encoders often cuts off above 16 kHz?
hi
sorry my poor enlish , my mp3 audio songs are in  lame 320kb or v0 and they  don't cuts off above 16kHz , they do show in foobar even 20kHz
does foobar2000 use always noise-shaping ? could be disabled?
thanks

Re: Resampler plugin

Reply #584
@francesco, English is not my first language as well. LAME settings that you use barely cut the high frequencies, but not everyone uses these settings or even LAME. For example, I also use Helix MP3 encoder, which pays less attention to the high frequencies by default, because they are at the limit of hearing for most people. Also, look at the spectrogram of AAC-compressed music on YouTube — you can clearly see the shelf. Foobar2000 dither options are available at Output page of its Converter, it does not use dither by default, but when it does, you get dither with noise-shaping.

• Join our efforts to make Helix MP3 encoder great again
• Opus complexity & qAAC dependence on Apple is an aberration from Vorbis & Musepack breakthroughs
• Let's pray that D. Bryant improve WavPack hybrid, C. Helmrich update FSLAC, M. van Beurden teach FLAC to handle non-audio data

Re: Resampler plugin

Reply #585
Was just trying to be helpful. I found it an incredibly informative text, and there's a reason it's the standard reference text on a lot of digital audio graduate courses. If you wanna really grok this stuff I'm afraid there's often no simplification possible.

Re: Resampler plugin

Reply #586
I indicated the reason immediately after the fragment you quoted.
This is not the reason, this is an excuse. Ever heard about self-education?

As for dither/noises-haping have you seen my answer here - https://hydrogenaud.io/index.php/topic,108321.msg1035196.html#msg1035196 ? No need to be "expert" to convert and listen. Easy reading about noise-shaping with comparison and samples - http://audio.rightmark.org/lukin/dither/dither.htm

 

Re: Resampler plugin

Reply #587
...and about ringing.
Let me be your Carl Sagan  :D
Take single impulse with samplerate 8 kHz and resample it to 44100 kHz wit SoX command line tool using extreme bandwidth 99.7 and highest quality (-v). Because source samplerate is very low and bandwidth is extremely high (the higher bandwidth is, the longer ringing is, and bandwidth above 99 is not recommended to use at all in SoX) the ringing will be audible and very long. Also, the higher "quality" setting is, the longer ringing is (what a "surprise"!).
To go to full size image: Right click on picture->Open image (Open image in new tab) ans so on.
Original impulse spectrogram:


Resampled to 44100 with linear phase (-p 50) and -v -b 99.7:
What you can see on the sides of the main "column" is those infamous ringing artefacts.


Resampled to 44100 with intermediate phase (-p 25) and -v -b 99.7:


Resampled to 44100 with minimum phase (-p 0) and -v -b 99.7:


Resampled to 44100 with maximum phase (-p 100) and -v -b 99.7:


Resampled to 44100 with all other default settings (default quality, -b 95, linear phase):


Archive with files - https://www.dropbox.com/scl/fi/ql6juavjcee5uage6ybp5/Infamous-ringing.zip?rlkey=vub9as0n2vrudnxwv3kzl4lb8&dl=1
If you have good quality DAC, amp, headphones, you will be able to hear what differences are. DSPs better be be disabled.
Note: some DACs can switch output off on digital silence making noise on switch, making it hard to hear impulse itself. If this is your case, use some DSP that can add noise to signal, for example - https://foobar.hyv.fi/?view=foo_dsp_mdadither (Smart Dither DSP is NOT suitable in this case, because it doesn't touch digital silence).