Android resampling
Feb 24, 2022 at 3:55 AM Post #91 of 124
there is never no losses. playing the original file at the original sample and bit depth will not be perfect. because nothing is. at least in the analog domain. even between 2 so called bit perfect streams, you can usually measure differences at the lowest level. not that it's very relevant when noises and distortions will surely swamp the all thing with much bigger differences(which is why we so easily disregard small errors). the idea of perfection in music playback is a fantasy. which is why people usually prefer to care about what's audible or not. which is something we demonstrate with listening tests.

now resampling can turn out to make some audible difference on some gears, because the resampling solution really sucks, or because maybe the extra high frequency content destabilized the playback rig a little. or maybe because the DAC's filter for 44kHz is rolling off the trebles a lot more than at other freqs. none of the effective cases really have anything to do with your idea that we're causing errors or loss in the redrawing of the analog sine waves. because those errors simply are so tiny in the first place that you shouldn't expect them to be audible.
in real life, anything is possible, but possible exceptions shouldn't be taken as the norm. as gregorio told you, the album you're playing has content that was most likely resampled several times(because many audio plugins work best at a specific sample rate, so they convert the signal to that rate before doing what they do. what you can deduce from that very common plugin behavior(and we're talking pro stuff used in studios), is that the guys making them considered that the resulting sound with resampling is going to be better than without. that should give you some idea about how destructive they consider resampling to be.
now that example is usually about taking a sample rate and increasing it. so we don't discard any information. taking a high sample rate file and reducing it to 44 or 48kHz means objectively discarding information and that is a fact. mainly we can treat that as discarding the frequencies at sample/2 and above. which begs the question, are you going to miss ultrasounds? most controlled listening tests suggest that you won't. but of course the best answer relies on taking your own gear, your own ears, and test it out under controlled conditions. then you have a reliable answer about your circumstances(which is probably all you really care about, and you wouldn't be wrong^_^).
your last question about something at 44kHz being turned into 48kHz, as pretty much any increase in sample rate it is probably not something to be concerned about. by going to 48kHz you now have a little extra room for the final low pass filter in the DAC, so even if it's some extremely cheap extremely badly implemented solution, by pushing it a little farther in the ultrasounds we reduce even more the chances to get some audible impact. so I'd argue that overall, it could be seen as an improvement because what you may lose, is outweighed by what you might gain(which is really the entire reasoning behind all resampling).
as for something at 48kHz being converted to 44 by a cellphone, again, the 2 concerns are:
the ultrasound range you discard. will you miss it? will you hear it? probably not.
and also the DAC's filter if it's one that is known to be audibly different at 44kHz(relatively rare nowadays, but could still happen).

now about resampling in general, any DAC worth something will apply massive oversampling to the signal before going to analog(for various good reasons). it has become very hard to act paranoid about resampling because of it, as it now kinds of equals being against digital audio. we still find that "a small village of indomitable Gauls still holds out against the invaders" in audio forums and keep purchasing NOS DACs(mainly for the wrong reasons). but the rest of the world has moved on about this matter.

as I was saying before, this in no way means that you shouldn't go for hires files and playback that respects the file's sample rate if that's what you want to have. objectively it's not a mistake, and some DACs will measure better when fed with a hires file(or a normal 16/44 converted to 24/96 before being sent to the DAC. my old ODAC is like that. I can't tell the difference by ear, but I can measure it. what to do of such an information is the user's prerogative. I'm surprisingly not interested in measured fidelity and always pick what's more practical over what measures best. but that's me. someone else may have other priorities. but you have to keep in mind how that desire for fidelity, and the notion of audible consequences, might not agree all the time(or if your gears do a proper job, ever).

Nice to see a patient and well considered reply amongst the impatient and patronising.

There is an aspect of re-sampling which has been ignored. While yes oversampling is an accurate re-sampling, where the sample rates are a multiple of the other, or at least a simple ratio, and the same master clock can be used on both, things can stay essentially transparent if the maths is done right. However when re-sampling across less synchronous sample rates such as 44.1kHz and 48kHz the in and out clocks are by their nature not synchronized. Agian, with enough maths bit depth, it can be excellent. But even in the same system, they will have different sample clocks. The jitter between the in and the out clocks needs to be compensated for. This can be mitigated in sophisticated ASRC (Asynchronous Sample Rate Converters) from AD and TI , and well coded DSP. The TI ASRC have graphs showing their THD and jitter suppression, at -140dB. (probably good enough!). But they cost a lot, and use quite a bit of power. However early ASRCs had no such compensation, and just turned jitter directly into distortion, just like a early DACs. Onkyo did this on CD player in the '90s. It turned out to be a completely pointless expensive marketing exercise.

There is no such information or proof in the android SoC systems, and you can bet they are designed for battery conservation not time domain resolution. This is why there are people who would like to use the DAC to read the original data, rather than have the Qualcomm IC, who is busy doing everything else at the same time.

However I guess as usual the OP has been bullied away by the usual suspects.
 
Feb 24, 2022 at 6:35 AM Post #92 of 124
1. There's a few obvious problems here:
A. You can NEVER be sure there really is an audible difference unless you blind test (as opposed to A/B test), REGARDLESS of how obvious/big the difference appears to be.
B. "Less volume on bitperfect" is an oxymoron; changing the digital volume changes the bits and therefore cannot be bit-perfect.
C. In addition to "A", the volume should be accurately matched, NOT more or less volume.

2. The cause is pretty important for two reasons. Firstly, you may make false assertions and blame entirely the wrong thing, and secondly, the cause might be something you can easily defeat, such as replay-gain, a limiter or something else.

3. As per "C" above, the volume should be accurately matched because a higher volume is not necessarily "in favour of Android".

G
1B iBasso DC04 has hardware volume control
1C I understand, just pointing out that the problem persisted even with lower volume on bit perfect.
2 indeed
 
Feb 24, 2022 at 6:37 AM Post #93 of 124
To reconstruct a circle, how many point you need?
3?
5?
And the same questions for a line?
2 point, right?

So, more means none when mathermatic proves it already.

44khz is enough to render 20khz tone - limit of normal teenage (not ave level of aldults).
I assume that 20k to 22k is inaccuracy zone for cut off curve is a slope with not perfect sharp.

Talking other than math, it is with tolerance -> if 96k sample was process badly compare to 44k sample, and assume that an individual can heard the difference. Then, what is BETTER? Can conclude 96 better with envidence?
I think no.
Not all waveforms are sine. You need more points on a curve to decode which one is it. Not to get too deep into this conversation :)
 
Feb 24, 2022 at 7:05 AM Post #94 of 124
Look guys, I'm not the kind that obsesses over bitrates or bit perfectness or resampling. I don't give a **** about it as long as it plays well. mp3 320 is a great high quality file for me as long as the recording is quality.

However it just so happens that I do hear undeniable obvious difference when using Android audio stack vs bitperfect to HiBy/iBasso drivers in HiBy's favor. The files i play are 320 mp3s so obviously all resampled, IDGAF about that. My headphones are not enough to hear the difference between 320 and a lossless FLAC even if I could. Lower res mp3s I believe I can hear but the difference is still subtle and I can't be bothered to blind test it yet so I just do my best to get at least 320 mp3s. I don't mind FLACs either.

So lower your guns here boys, I'm on your side, just reporting a not at all subtle difference between the two in hopes that someone can enlighten me as to why that is or how to solve it. Also just for the sake of bringing attention to the issue.
 
Feb 24, 2022 at 7:50 AM Post #95 of 124
There is an aspect of re-sampling which has been ignored.

Yep, we're like that in this sub-forum; We tend to ignore aspects of resampling which are not actually aspects of resampling! For example:

However when re-sampling across less synchronous sample rates such as 44.1kHz and 48kHz the in and out clocks are by their nature not synchronized.
What "in and out clocks"?
But even in the same system, they will have different sample clocks.
No they won't, they'll have the same clock.
The jitter between the in and the out clocks needs to be compensated for.
There is no different in and out clocks, there's only one clock. So, what jitter is there between one clock and why does it need to be compensated for? Reminds me of a bad old joke: What's the difference between a duck? Answer: One leg is both the same.
[1] This can be mitigated in sophisticated ASRC (Asynchronous Sample Rate Converters) from AD and TI , and well coded DSP. [2] But they cost a lot, and [2a] use quite a bit of power
1. Not sophisticated asynchronous sample rate converter! They may have been relatively sophisticated about 30 ago but these days they're completely standard and relatively basic/simple.
2. ~30 years ago when they were first released, they cost about $20 but today (and for many years) they cost peanuts, in fact they cost less than a packet of peanuts!
2a. Again, 30 year old ASRCs probably weren't very power efficient but then they didn't need to be, there were no smartphones in the early 1990's!
However early ASRCs had no such compensation, and just turned jitter directly into distortion, just like a early DACs.
It's true that jitter is turned directly into distortion, so where is all this distortion then? The earliest ASRC chip I'm aware of is the AD1890 from 1993: "Note that all distortion components are less than -115dB" - So, completely inaudible even then! (Analog Devices catalogue - AD1890 explantation and measurements)
[1] There is no such information or proof in the android SoC systems, and [2] you can bet they are designed for battery conservation not time domain resolution.
1. I haven't seen such information either and I'd be willing to change my position given reliable evidence to the contrary but until then, it's more than reasonable to assume that it performs as well or better than a 1st generation, 20bit ASRC from 1993!
2. I'd take that bet! Because you can bet that they are designed for BOTH battery conservation AND time domain resolution.
This is why there are people who would like to use the DAC to read the original data, rather than have the Qualcomm IC, who is busy doing everything else at the same time.
Again, a modern Snapdragon is hundreds of times more powerful than processors in 1993, plus the SRC algorithms are more efficient. High quality sample rate conversion simply isn't that demanding and hasn't been an issue for years.

G
 
Last edited:
Feb 24, 2022 at 8:54 AM Post #96 of 124
[1] Not all waveforms are sine. [2] You need more points on a curve to decode which one is it. Not to get too deep into this conversation :)
1. Yes they are. Or to be more precise, all recordable waveforms are sine waves or are comprised of sine waves. Therefore:
2. This point is incorrect.
However it just so happens that I do hear undeniable obvious difference when using Android audio stack vs bitperfect to HiBy/iBasso drivers in HiBy's favor.
This assertion is also unfortunately false, because the obvious difference you claim to hear IS deniable! I asked if you've seen any reliable evidence that android SRC isn't audibly transparent, you replied "Yes" but then presented a sighted test that wasn't even volume matched, which is NOT reliable evidence. In fact, it's one of the least reliable types of evidence. And, just adding the word "undeniable" doesn't make it reliable (or undeniable)!
So lower your guns here boys, I'm on your side, just reporting a not at all subtle difference between the two in hopes that someone can enlighten me as to why that is or how to solve it.
Again, biases and resulting errors of perception are perfectly capable of giving the (false) impression of a "not at all subtle difference". In which case I have enlightened you as "to why" and it might be solved by more listening training. In the case of it being a real difference though, then it's very unlikely to be due to SRC, there could be something else in the processing chain, as already mentioned, such as replaygain, a limiter, etc., that could be removed or defeated.

G
 
Feb 24, 2022 at 9:16 AM Post #97 of 124
1. Yes they are. Or to be more precise, all recordable waveforms are sine waves or are comprised of sine waves. Therefore:
2. This point is incorrect.

This assertion is also unfortunately false, because the obvious difference you claim to hear IS deniable! I asked if you've seen any reliable evidence that android SRC isn't audibly transparent, you replied "Yes" but then presented a sighted test that wasn't even volume matched, which is NOT reliable evidence. In fact, it's one of the least reliable types of evidence. And, just adding the word "undeniable" doesn't make it reliable (or undeniable)!

Again, biases and resulting errors of perception are perfectly capable of giving the (false) impression of a "not at all subtle difference". In which case I have enlightened you as "to why" and it might be solved by more listening training. In the case of it being a real difference though, then it's very unlikely to be due to SRC, there could be something else in the processing chain, as already mentioned, such as replaygain, a limiter, etc., that could be removed or defeated.

G
Oh, I thought you meant reliable for me (to me it was undeniable what I heard so personally very reliable evidence). Sorry I misunderstood you. Since your passion on the subject I might actually do a blind test :wink:

I don't know what a replaygain or a limiter is or how they work let alone how they could be removed or defeated. But it's good to know there is something that can be done. I might google it later.

As for your first two points they are very interesting, but I don't understand what you mean. Unless recordable is the keyword here. Im not exactly sure if microphones have the ability to record sawtooth waveforms and the like. But I was more talking about music files in general, not necessarily music files that have microphone recorded sounds on them.
I mean the point that I made is simple common sense, simple logic, not a fact that is to be argues upon or disputed.
 
Feb 24, 2022 at 12:29 PM Post #98 of 124
Not all waveforms are sine. You need more points on a curve to decode which one is it. Not to get too deep into this conversation :)
Fourier series suggest that all waveforms can be matched over a given period of time by simply adding the right sines. in a way a waveform is a bunch of sines. But yes, with higher frequency content, we do need to increase the sample rate(that one is from Nyquist and friends).

About your actual situation, just a few days ago, someone was giving a pretty similar report about sound difference between his computer and his laptop when plugged into the same DAC. The answer seems to be that on his laptop there's a kind of surround DSP from Waves that doesn't want to go away. Maybe you're in a similar situation.
Some years ago I used UAPP(usb audio player pro) to get around some internal mess. But I can't really say what was causing the default output to sound like crap(beside how horribly it would clip with a FS signal).
 
Feb 24, 2022 at 12:30 PM Post #99 of 124
Oh, I thought you meant reliable for me (to me it was undeniable what I heard so personally very reliable evidence). Sorry I misunderstood you. Since your passion on the subject I might actually do a blind test :wink:

Double blind tests are VERY illuminating and well worth doing a number of them. The experience teaches you a lot and can reduce some perceptual errors.

As for your first two points they are very interesting, but I don't understand what you mean. Unless recordable is the keyword here. Im not exactly sure if microphones have the ability to record sawtooth waveforms and the like. But I was more talking about music files in general, not necessarily music files that have microphone recorded sounds on them.
I mean the point that I made is simple common sense, simple logic, not a fact that is to be argues upon or disputed.

There's a basic rule to common sense and logic; they're easily defeated if you try to use them with incorrect or incomplete facts!

No, "recordable" isn't really a keyword here: All soundwaves are sine waves or comprised of sine waves, it doesn't matter how complex they are, and this statement also includes sawtooth and square waves. Joseph Fourier proved that almost 2 centuries ago. For example, a square wave is a combination of a fundamental sine wave frequency plus odd harmonics (sine waves) and a sawtooth is a combination of a fundamental freq plus all integer harmonics (even and odd). This animation may help you visualise this sine wave combination, "N" is the number of sine waves added together.

Synthesis_sawtooth.gif


A pure/perfect sawtooth or square wave is just a theoretical concept that can't exist as a sound wave. The X-axis is time and the highest and lowest point of a pure sawtooth or square wave occur at the same instant in time, this would require the air molecules through which it is travelling to be in two different places at the same time, which is against the laws of physics. Likewise to record or reproduce this sawtooth (or square wave) would require the mic diaphragm and speaker/HP driver to be in two different places at the same time, obviously the driver just moves in/out and also cannot break the laws of physics. And lastly, your ear drum also can only move in/out and can't be in two different places at the same time, so you couldn't hear a sawtooth or square wave even if it were possible for one to exist. In practice what actually exists (and what we can hear) is just a rough approximation of a sawtooth shaped or square shaped wave.

G
 
Last edited:
Feb 24, 2022 at 12:39 PM Post #100 of 124
Fourier series suggest that all waveforms can be matched over a given period of time by simply adding the right sines.
Yes, of course. Deep learning neural networks can in theory approximate any multidimensional function to almost perfect precision too even if it's just a bunch of linear functions. The case we are talking about obviously is a case of limited resolution and it's the extremes in particular that we are discussing and focusing on. Where one cycle is represented by a few points of information. Im sorry I don't have the best language for this, but I hope we understand each other.

Yeah, thanks for empathizing with my problem. Maybe I could try just getting another dongle and see if that solves it.
 
Feb 24, 2022 at 12:55 PM Post #101 of 124
Double blind tests are VERY illuminating and well worth doing a number of them. The experience teaches you a lot and can reduce some perceptual errors.



There's a basic rule to common sense and logic; they're easily defeated if you try to use them with incorrect or incomplete facts!

No, "recordable" isn't really a keyword here: All soundwaves are sine waves or comprised of sine waves, it doesn't matter how complex they are, and this statement also includes sawtooth and square waves. Joseph Fourier proved that almost 2 centuries ago. For example, a square wave is a combination of a fundamental sine wave frequency plus odd harmonics (sine waves) and a sawtooth is a combination of a fundamental freq plus all integer harmonics (even and odd). This animation may help you visualise this sine wave combination, "N" is the number of sine waves added together.

Synthesis_sawtooth.gif


A pure/perfect sawtooth or square wave is just a theoretical concept that can't exist as a sound wave. The X-axis is time and the highest and lowest point of a pure sawtooth or square wave occur at the same instant in time, this would require the air molecules through which it is travelling to be in two different places at the same time, which is against the laws of physics. Likewise to record or reproduce this sawtooth (or square wave) would require the mic diaphragm and speaker/HP driver to be in two different places at the same time, obviously the driver just moves in/out and also cannot break the laws of physics. And lastly, your ear drum also can only move in/out and can't be in two different places at the same time, so you couldn't hear a sawtooth or square wave even if it were possible for one to exist. In practice what actually exists (and what we can hear) is just a rough approximation of a sawtooth shaped or square shaped wave.

G
I see.
 
Last edited:
Feb 24, 2022 at 1:24 PM Post #102 of 124
Although I guess the DAC does always attempt to make everything into a sine wave one way or another.
No, a DAC reproduces whatever complex waveform is represented by the sample points. It doesn't try to make everything a sine wave although again, everything is effectively made-up of sine waves.
[1] Yeah, but of course I'm not even talking about a perfect sawtooth either, just the fact that a wave like sawtooth that doesn't even have a vertical drop sounds different than a sine wave and [2] both cannot be reproduced from a couple of samples at the higher frequencies. [3] Approximations are all nice and good, but in the upper frequency ranges it's simply no longer enough info to tell.
1. Yes, sine waves and complex waves made-up of multiple simultaneous sine waves (inc. sawtooth) do sound different.
2. Yes, both can be reproduced from a couple of samples at the higher frequencies because they're both effectively the same thing, sine waves (or combinations of sine waves)!
3. They're not "approximations", they're very accurate reproductions and it SIMPLY is "enough info to tell". Shannon proved that about 75 years ago and digital audio wouldn't exist if that wasn't the case. You're not really arguing that proven mathematics is wrong and digital audio doesn't exist are you? Not sure how that argument would line-up with your claim of common sense or logic!

G
 
Feb 24, 2022 at 1:31 PM Post #103 of 124
No, a DAC reproduces whatever complex waveform is represented by the sample points. It doesn't try to make everything a sine wave although again, everything is effectively made-up of sine waves.

1. Yes, sine waves and complex waves made-up of multiple simultaneous sine waves (inc. sawtooth) do sound different.
2. Yes, both can be reproduced from a couple of samples at the higher frequencies because they're both effectively the same thing, sine waves (or combinations of sine waves)!
3. They're not "approximations", they're very accurate reproductions and it SIMPLY is "enough info to tell". Shannon proved that about 75 years ago and digital audio wouldn't exist if that wasn't the case. You're not really arguing that proven mathematics is wrong and digital audio doesn't exist are you? Not sure how that argument would line-up with your claim of common sense or logic!

G
Re: 2 and 3

Interesting
 
Last edited:
Feb 24, 2022 at 3:00 PM Post #104 of 124
Could you please provide a proof that it's possible for a dac to differentiate a a sawtooth wave from a sine wave from a couple samples?

Sure, here's Shannon's proof published in 1948: A mathematical theory of communication.

The part of interest is at the bottom of page 34 but if you don't fancy reading through the whole paper, wikipedia gives an explanation of the proof:

If a function x(t) contains no frequencies higher than B hertz, it is completely determined by giving its ordinates at a series of points spaced 1/(2B) seconds apart.
A sufficient sample-rate is therefore anything larger than 2B samples per second. Equivalently, for a given sample rate F/s, perfect reconstruction is guaranteed possible for a bandlimit B<Fs/2.

In case you need further explanation: "Function x(t)" is any sine wave or combination of sine waves (such as a sawtooth or square wave), "completely determined" means EVERY detail of the waveform and "1/(2B) seconds apart" means the sample rate must be at least double the audio frequency (IE. "A couple samples" at the max audio freq)!

G
 
Feb 24, 2022 at 3:14 PM Post #105 of 124
Sure, here's Shannon's proof published in 1948: A mathematical theory of communication.

The part of interest is at the bottom of page 34 but if you don't fancy reading through the whole paper, wikipedia gives an explanation of the proof:



In case you need further explanation: "Function x(t)" is any sine wave or combination of sine waves (such as a sawtooth or square wave), "completely determined" means EVERY detail of the waveform and "1/(2B) seconds apart" means the sample rate must be at least double the audio frequency (IE. "A couple samples" at the max audio freq)!

G
I still don't understand your point, but this is something other than why I joined the thread, so I'm disengaging from the discussion for an open time period.

Peace ✌️
 

Users who are viewing this thread

Back
Top