Thursday, February 14, 2013

Lousy Sound

I have noticed a trend -- lousy sound. I have been a music lover and audiophile (not audiophool, which is unscientific superstition, like anthropogenic climate change) since high school.

Listening to Pandora, I was struck by a new kind of distortion. It's an obnoxiousness in the upper midrange, almost like a harsh, noise modulation being kicked up by things like electric guitars and vocals. It isn't harmonic, and it isn't normal intermodulation. And no, it's not this.

What a long strange trip it's been, getting to the bottom of it. At first, I figured it was Pandora's standard AAC bitrate. So I paid for the subscription version so that I could get the high quality feeds. No joy. Besides, AAC actually sounds really good at reasonable bitrates.

So then I suspected my speakers. Maybe they were just obnoxious, so I started listening with headphones -- three different ones. No joy. Next was the sound card, so I tried a number of different ones on various machines I have at my disposal. They all exhibited the same obnoxiousness.

Heathkit AA-1214
Crossover distortion in my amplifier? I replaced the finals in it a while back, because they went into Vce breakdown and burned up. I used the original part, but with a higher breakdown voltage that wasn't available in 1972. Did I get the bias wrong? It turns out, one of the bias resistors had changed value. So I re-biased both channels. Distortion measurements are well within their original spec. Besides, this amp has never sounded bad to me in the 40 years since I first assembled it. The obnoxiousness persists.

My ears? Maybe... I do have tinnitus... but no, it doesn't happen on every song. I don't notice it with my old personal CD or vinyl collections (although the distortion does sound somewhat similar to vinyl damage from a worn out stylus). But I have been familiar with that phenomenon since the early '70s, when my ears were brilliant. Although I miss with great anguish the acuity of my youth, I do know how to listen. This ain't it.

To reiterate: it doesn't happen on every song. I have heard of the loudness wars that CD producers have been engaged in. It's the same idiotic loudness wars that broadcasters have been engaged in for many years, except it's even more idiotic when we're dealing with a medium that so doesn't need any additional processing to sound good. There's more than enough headroom on a CD for the dynamic range of any music known to humans. There's no reason to pack it all into the top 6 dB of the 96 dB available.

Not only do they compress the snot out of it, they clip it too. If this clipping occurs before the A/D converters, the higher harmonics that would cause aliasing get filtered out. But if they clip after the A/D converters, it will cause aliasing, and aliasing sounds nasty.

Aliasing has no correlation with the harmonic structure of the music (in fact, it's inverted). But it will kick up as noise whenever the digital clipping occurs. I can't imagine that recording engineers and record producers would be so stupid as to clip in the digital domain (without using the proper anti-aliasing filters), but maybe they do. If anybody knows, please drop me a line, or post a comment here.

I would not expect this obnoxiousness to occur with the classics, but with so many classics being remastered and reissued, I expect that the new releases of old material are also getting the same treatment. It certainly sounds like it is. Even our proud legacy is being mutilated.

Thursday, February 7, 2013

Realtek Sound Improving?

A favorite pastime among gamers and audiophiles is to bash Realtek audio codecs. This may have been justified at one time. A build I did several years ago using an Intel D945GCCR motherboard with the Realtek ALC883 audio codec certainly deserved the drubbing. Even an old Sound Blaster 16 PCI was a dramatic improvement.

But a recent build using an Intel DH67BL motherboard with the Realtek ALC892 audio codec was a very pleasant surprise. In A-B listening tests, I was unable to discern the difference between the Realtek and the Asus Xonar DG (a very well regarded audio board).

It's possible that the ALC892 sounds better than the ALC883 chipset. However, the published specs of the two chipsets are too close to quibble, and frankly the horribleness of the sound of the D945GCCR motherboard would have made any specification pointless. The thing that curled my eyelids was the harsh upper midrange distortion, which if anyone measured it, would have pegged the needle. It was that nasty.

You want to know what I think? I think both Realtek chipsets are just fine. I think Realtek is a victim of industry-wide poor motherboard design. I think the problem is with the analog portion of the D945GCCR motherboard, which was designed by Intel. Intel are digital logic designers, not analog audio designers. I think they botched it with the D945GCCR, but they finally got it right with the DH67BL. The former requires an add-in sound card. The latter really is a pleasure to listen to.

I think Realtek's problem is that it's their face on the audio subsystem -- their volume controls, equalizers, effects controllers, media players (if you use them). If Realtek were smart (or a bit smarter anyway), they would let the motherboard manufacturers put their logo on those apps. Then the blame (or praise) for the sound quality would go to the board manufacturer, which actually has more to do with the sound quality anyway.

The sound really depends on the board layout, the analog design and choice of components, whereas if you get the audio codecs right, they're right -- period, end of story. It really isn't any more expensive to make a good audio codec than a poor one, so might as well make a good one. If you get a justifiable reputation for making poor audio codecs, your bottom line will suffer terminally, regardless.

Now, having said all that, I should point out that the Realtek chipsets are not as quiet as the Xonar (with noise levels in the -90 dB range, the Realteks are comparable to 16-bit conversion), whereas the Xonar approaches -120 dB, which consistent with 20 ~ 24-bit conversion. They all claim 24-bit resolution, but only the Xonar approaches actual 24-bit performance.

Make no mistake though, unless you're using this for professional studio work, 16-bits is far more resolution than you'll be able to discern with your naked ear in anything but an anechoic recording studio. As a point of reference, the noise level of a good vinyl analog recording corresponds to about 8 ~ 10-bit resolution.

Saturday, January 26, 2013

Windows 8: Designed by Idiots, for Idiots

Now that I have your attention... I don't really think Windows 8 users are idiots, nor do I think the Microsoft Windows 8 designers and developers are idiots.

But Windows 8 is moribund. DOA. Stillborn. It reminds me of something one of my most respected colleagues once said, "If you make something foolproof, only fools will want to use it". Microsoft has acknowledged that Windows 8 is not as successful as they had hoped. They're blaming everyone but themselves.

I am a software engineer by trade, and one of the most fundamental principles is, "Don't remove features!" The corollary is, "Try not to force users into a particular way of doing things". I've watched Bill Gates for thirty years. I know that he understands these principles. Under Gates' direction, Microsoft understood. But with Windows 8, they threw both of them under the bus. Bill Gates would be spinning in his grave, but he's not dead yet.

Windows 8 offers a new start screen, optimized for touch screens, such as the ones found on tablet computers and phones. Windows 8 needs to support these new technologies. But Microsoft still has many millions of customers who use traditional desktop machines. People with jobs that require them to sit at a desk and type on a keyboard.

I believe Windows 8 would have been much more successful if Microsoft had done two simple things:
  1. Don't remove the Start button! It would have been fine if the Start button had been disabled by default, but give us the option to re-instate it if we want. The total removal is dictatorial, pure and simple. People want control of their lives. They don't like dictators. 
  2. Don't force us to use the Start screen! If someone's job involves desktop apps, don't make them have to dismiss the big green screen just to start working. Put the Start screen on the same footing as the desktop. In fact, the Windows behavior could change based on the computer's capability, and/or the docking state of the main computing unit. 
Microsoft used to understand this. For four Windows generations, users could still use the Windows 95 look and feel. Many of my co-workers still use this, because it gives higher performance, and they just like the old design. 

People are asking Microsoft to re-instate the Start button, but I'm afraid that ship has left the barn. That cow has sailed. Even before Windows 8 hit the streets, at least two (now six) independent software vendors introduced products designed to replace the Start button functionality in Windows 8. If Microsoft were to restore that feature in the OS, they would be in direct competition with these very popular products. Maybe MS could license them, but really Microsoft doesn't need third party software to implement something as simple as a pop-up menu on the task bar. To avoid lawsuits, they'd probably have to pay the Start button ISVs for damages. 

Sorry Microsoft, it was an idiotic move. We're your customers. You're not the boss of us. You're just another OS vendor, in competition for our dollars. Customers vote with their dollars. I am typing this on a shiny new computer that I just built. I had a choice of purchasing Windows 7 or Windows 8. Guess which one I chose. I thought Windows 7 was the best Windows ever. It was Vista done right. Windows 8 could have been a continuation of that theme, but noooo...

Update: Microsoft is reportedly re-instating the Start menu in Windows 8.1. It is also reportedly going to add a "boot to desktop" feature. I won't say, "I told you so", but those were the two things I was ranting about.

Update: Um, no. I just installed 8.1. Microsoft did not re-instate the start menu. They merely re-instated the start button. It takes you to the Metro screen. Whoopee. No dice, M$. I didn't like your shiny new schizophrenic OS, and I still don't. I'm running Start Menu 8, and will continue to do so until M$ pulls their heads out. Why a company would alienate an installed base of millions is beyond me.

One last update: Microsoft got one thing right with the reinstated start button: you can right click it, and get a menu of some fairly useful stuff.
  • Programs and Features
  • Power Options
  • Event Viewer
  • System
  • Device Manager
  • Network Connections
  • Disk Management
  • Computer Management
  • Command Prompt
  • Command Prompt (Administrator)
  • ----------
  • Task Manager
  • Control Panel
  • File Explorer
  • Search
  • Run
  • ----------
  • Shut Down or Sign Out > (the usual options)
  • Desktop (cancels the menu?)
Okay, so that's almost useful. Worst case, I'll be right clicking for the run dialog all the time.

Monday, January 14, 2013

Windows: Choppy Audio and Poor Performance

A computer system running Windows XP (yes, it's that old) had been running fine for several years, when all of a sudden it started feeling really sluggish, and most annoying, the audio playback became very burbly. The audio buffers were not getting filled as fast as the sound card emptied them. As a result, the sound card was looping sporadically on the same buffer. This happened mainly when disk activity was occurring.

After trying several time-consuming and pointless exercises to fix the problem, I happened on the solution more or less by accident:


You can see that the Current Transfer Mode is Ultra DMA Mode 5. This is what you want. What I found was PIO Mode. PIO stands for "Programmed I/O", and it is the slowest transfer mode, which requires the processor to stop what it's doing (like playing audio), and move the data from the drive controller to memory and vice-versa. DMA stands for "Direct Memory Access", which allows the processor to set up the transfer, and then allows the DMA controller to actually move the data from the drive controller to memory and vice-versa, so the processor can keep working on other things.

When your disk drive performance suddenly seems sluggish, and especially if multimedia performance becomes jerky and choppy, check your IDE channel properties, and make sure it's running in DMA mode. In Windows XP (and on Vista and Windows 7 as well), select Computer Management/Device Manager, and expand IDE ATA/ATAPI controllers, and make sure they're running in DMA mode.

How does the controller get into PIO mode in the first place? Several reasons. The most common one is that there have been too many drive read errors, and after several of these, Windows reverts to a "fail safe" mode. Unfortunately, it doesn't alert you about it. So yes, you might have a disk drive failure looming. Other reasons include a faulty or improperly plugged drive cable or power cable. After you have verified that everything is connected properly, and maybe run chkdsk, use Device Manager to uninstall the lobotomized controller and then restart Windows. Windows will re-install the controller automatically. In the process, it should revert to DMA mode if the drive is responding properly.

Sunday, September 16, 2012

Weather Station Back Online

I gave the entire 1-Wire network a complete going-over. RF is a big problem around here, since there's a 50KW AM transmitter within a mile of here. The new 1-Wire adapter is optically isolated from the computer's USB circuitry, and the adapter power supply is isolated from the house wiring, so presumably, there's no RF path to ground, and thus no current can flow.

However, the system had been working reliably for several years, before it began its downward slide. Maybe a lightning strike damaged the old 1-Wire adapter. I'll do some diagnostics on it when I get a chance.

Sunday, September 2, 2012

Weather Station Going Dark For a Few Days

I'm going to take my weather station offline for a few days for much needed repairs and improvements. My humidity sensor has been flaky for the last several weeks, and my attempts to fix it have been unsuccessful. So I'm going to take the whole thing down, and replace all of the RJ-11 and RJ-45 connectors, rearrange the wiring layout, and clean and oil the wind sensors. I'll probably bring the sensors back online one at a time, as I dial in each one before adding the next.

Friday, March 16, 2012

Classic Amp -- Updated PCB, and Why Not?

Ok, so I updated the PCB yet again. Check it out:
Classic Amp PCB - Click to Enlarge
What did I do? Well, I flipped the transistors Q7, Q9, Q11 and Q13 on the bottom half the board, so that they're a mirror image of Q6, Q8, Q10 and Q12 on the top half. It is now beautifully symmetrical, and the positive and negative pulling devices will have as similar a layout as is physically possible. There's just one problem: Q12 & Q13 are facing opposite directions. Too bad the transistor manufacturers didn't consider this when they made complementary devices - duh! I have it figured out, though: I'm going to sandwich both devices between two heat sinks. Pure symmetry, Captain! You'll just have to wait for the snapshot of the prototype to see what I have planned.