Live data from Hacker News

Low THD PWM audio amp, DIY friendly

diyclassd.com

21–30 of 49 posts

Re: Low THD PWM audio amp, DIY friendly

#21
There are quite a few very, very good class D amplifier designs out there. “Very good” means highly efficient and with good enough fidelity (noise, distortion, etc) that no one will ever be able to distinguish them from perfect.

But, IMO quite annoyingly, these things generally have analog inputs. This means you need a good DAC (which exists and isn’t terribly expensive) and a good connection from the DAC to the amp. You can make a good connection out of inexpensive cables, but you still need to worry about ground loops and possibly signal levels.

So why aren’t there comparably good amplifiers with digital inputs and a DAC integrated directly? Fancy preamp features are unnecessary — if the input resolution is 24-bit, then volume control and such can be done digitally with effectively no loss.

Re: Low THD PWM audio amp, DIY friendly

#22
post #21

There are quite a few very, very good class D amplifier designs out there. “Very good” means highly efficient and with good enough fidelity (noise, distortion, etc) that no one will ever be able to distinguish them from perfect. But, IMO quite annoyingly, these things generally have analog inputs. This means you need a good DAC (which exists and isn’t terribly expensive) and a good connection from the DAC to the amp.…

Searching for "plate amplifier module" you can find integrated digital/amp/crossover units suitable for DIY builds.

Re: Low THD PWM audio amp, DIY friendly

#23
post #21

There are quite a few very, very good class D amplifier designs out there. “Very good” means highly efficient and with good enough fidelity (noise, distortion, etc) that no one will ever be able to distinguish them from perfect. But, IMO quite annoyingly, these things generally have analog inputs. This means you need a good DAC (which exists and isn’t terribly expensive) and a good connection from the DAC to the amp.…

Given that it's just phase-correct PWM, you'd think feeding the bits you'd stuff into a DAC directly into the PWM counter would do the job nicely.

You could probably do that with a fast microcontroller these days. Some golden-eared audiophool pillock would complain they could hear jitter caused by the pins not being gold-plated or something, but who cares?

Re: Low THD PWM audio amp, DIY friendly

#24
post #17

I'm both an IT and audio geek, does HN likes audio geekery? I'm not affiliated with the company behind this website BTW..

> does HN likes audio geekery Only if scientifically backed.

Hahaha! I can't imagine discussing the finer points of optimization on here.

"the electromagnetic signal of course rides half outside the wire in a world increasingly filled with RF/EMF noise. Be sure to keep your cables off the floor or there WILL be impedence changes. Also, the Frequency Response is largely not relevant as 95+% of audiophiles don't have effective bass traps or ways to remove excess energy from the room. Intelligibility is the better metric, and no one uses it because it requires bass trapping and that's just to ugly and expensive."

Are you ready to rip my head off yet for all these largely unknown but completely true scientific facts? :)

Re: Low THD PWM audio amp, DIY friendly

#25
post #6

Earlier quoted context omitted.

I assume you meant "audiophile", not audiophool, right? If so, I wonder what makes an amplifier to be an audiophile amplifier in your opinion? Objective and measurable parameters of the amplifier in question are phenomenal.

I assumed it was intentional, as in “fool”. It’s a shame because Class-D has come a long way, there seems to be a natural opposition to anything digital. Class-A is great but is expensive, heavy and a big electricity bill.

It's also free in the winter if used in place of a space heater

Re: Low THD PWM audio amp, DIY friendly

#26
post #17

Earlier quoted context omitted.

> does HN likes audio geekery Only if scientifically backed.

Hahaha! I can't imagine discussing the finer points of optimization on here. "the electromagnetic signal of course rides half outside the wire in a world increasingly filled with RF/EMF noise. Be sure to keep your cables off the floor or there WILL be impedence changes. Also, the Frequency Response is largely not relevant as 95+% of audiophiles don't have effective bass traps or ways to remove excess energy from the…

Of course science would also require a blind perception test ...

Re: Low THD PWM audio amp, DIY friendly

#27
post #6

Earlier quoted context omitted.

I assume you meant "audiophile", not audiophool, right? If so, I wonder what makes an amplifier to be an audiophile amplifier in your opinion? Objective and measurable parameters of the amplifier in question are phenomenal.

I assumed it was intentional, as in “fool”. It’s a shame because Class-D has come a long way, there seems to be a natural opposition to anything digital. Class-A is great but is expensive, heavy and a big electricity bill.

> It’s a shame because Class-D has come a long way, there seems to be a natural opposition to anything digital.

The funny thing being that Class D has nothing to do with digital. A Class D amplifier is say to a class A one what a switching power supply is to a linear one, although the amplifier works on current rather than voltage, but the principle is essentially the same: they're 100% analog, and sound wonderful.

Re: Low THD PWM audio amp, DIY friendly

#28
post #10
post #6

Earlier quoted context omitted.

I assume you meant "audiophile", not audiophool, right? If so, I wonder what makes an amplifier to be an audiophile amplifier in your opinion? Objective and measurable parameters of the amplifier in question are phenomenal.

There is a picture of special, braided IEC power cable on there.

Geometry. Rigidity. It's POTENTIALLY legit. Here is a pretty science based primer on some of the things going on in the cable world.

https://www.gcaudio.com/tips-tricks/why-power-cords-are-impo...

One thing to understand about this niche high end cable market is that intellectual property just isn't a thing. There isn't enough money to fight lawsuits and wage war against copycats. Everyone loses throwing money away.

The end result is that only large companies like AudioQuest can afford to "give away" the science behind their products by patenting them. Other companies have to talk around and obscure what ACTUALLY makes their cable sound good. This is a pretty raw deal for consumers who are left exposed and vulnerable to bad designers, fraudsters, and tricking themselves into thinking something sounds better when it's not. And that's not even getting into value judgements about what a cable is worth based on how much closer to perfection it gets the user!

The system does seem to be working as intended by small niche cable makers who spend lifetimes accumulating arcane knowledge and handbuilding quality cables while keeping the bar for entry to the market high.

Another neat tidbit about cables is that the product lines and price points are not linear. They just can't be in reality from a design perspective. The people that say a cable is a cable are half correct. It's impossible to have a cable lineup of 7 levels and improve on the induction, capacitance and resistance all at the same time in each level. So there are tradeoffs, and occasionally a cheaper cable from the same company will sound better than a more expensive cable because one or two of the parameters were improved while another got worse. Depending on the interactions between the connected equipment and their deviation from perfect, if the parameter that took a step backwards in a more premium cable happens to be the weak point of the equipment as well, then an objectively better and more expensive cable can sound the same or worse.

Re: Low THD PWM audio amp, DIY friendly

#30
post #21

There are quite a few very, very good class D amplifier designs out there. “Very good” means highly efficient and with good enough fidelity (noise, distortion, etc) that no one will ever be able to distinguish them from perfect. But, IMO quite annoyingly, these things generally have analog inputs. This means you need a good DAC (which exists and isn’t terribly expensive) and a good connection from the DAC to the amp.…

Given that it's just phase-correct PWM, you'd think feeding the bits you'd stuff into a DAC directly into the PWM counter would do the job nicely. You could probably do that with a fast microcontroller these days. Some golden-eared audiophool pillock would complain they could hear jitter caused by the pins not being gold-plated or something, but who cares?

It takes a lot of computing power to reconstruct an audio sample well. Once reconstructed it takes massive massive amounts of storage.

It's all about the Shannon Nyquist sampling theorum.

"Strictly speaking, the theorem only applies to a class of mathematical functions having a Fourier transform that is zero outside of a finite region of frequencies. Intuitively we expect that when one reduces a continuous function to a discrete sequence and interpolates back to a continuous function, the fidelity of the result depends on the density (or sample rate) of the original samples. The sampling theorem introduces the concept of a sample rate that is sufficient for perfect fidelity for the class of functions that are band-limited to a given bandwidth, such that no actual information is lost in the sampling process. It expresses the sufficient sample rate in terms of the bandwidth for the class of functions. The theorem also leads to a formula for perfectly reconstructing the original continuous-time function from the samples." [1]

But, HOLD ON: "Practical digital-to-analog converters produce neither scaled and delayed sinc functions, nor ideal Dirac pulses. Instead they produce a piecewise-constant sequence of scaled and delayed rectangular pulses (the zero-order hold), usually followed by a lowpass filter (called an "anti-imaging filter") to remove spurious high-frequency replicas (images) of the original baseband signal." [1]

In case that was too verbose.....

"sample rate that is sufficient for perfect fidelity".... "such that no actual information is lost in the sampling process"... "theorem also leads to a formula for perfectly reconstructing the original continuous-time function from the samples"

PERFECTLY!!! Zero information loss between sampling and reconstruction. Still WTFs me to this day.

So yeah, you can feed bits to a PWM. But that not music.

[1] https://en.m.wikipedia.org/wiki/Nyquist%E2%80%93Shannon_samp...

Post reply on HN