This is my cyberhome!

February 10, 2006

How to rescan a folder in iTunes and keep song ratings.

Filed under: Apple, Audio — Manish Bansal @ 11:13 am

How to update/rescan your iTunes library if you have:-

Added new songs:
This was one of the most frustrating thing about iTunes. I would add a few songs to a folder which had already been added to iTunes but there was no way to tell iTunes to rescan that folder and pick only the updated songs. Every other jukebox software I know has this feature. Winamp even lets you schedule when you want to rescan the folder!
What did I know. This is actually simpler in iTunes. Just add the folder again to iTunes. If you have not moved the existing files from their previous location, have not renamed them, or done anything else to them, they would be ignored and only the new files would be added. All the old songs would maintain their playcount and rating etc. I regularly point iTunes to my top-level song folder and they get added just fine.

Updated tags outside iTunes:
I use GodFather to edit ID3 tags for my mp3s but since iTunes maintains its own database, the changes are not visible in iTunes. You can clean your iTunes library and add those songs again but you’d lose playcount and rating. The correct way to make those changes visible in iTunes is to select all files (using ‘Ctrl-A’), click on ‘Get Info’, and click ‘Ok’. iTunes will pick up all the tag changes without losing playcounts or ratings. Do NOT check any of the checkboxes for any of the tag fields. You’d nuke all your tags. Just click ‘Ok’ and it’d be done.

Get WinBackup for free.

Filed under: Marketing — Manish Bansal @ 8:45 am

Found via Download Squad.

WinBackup is offering the version 1.86 of its software for free whereas the latest version 2.0 costs $49.95. This is a great move. This shows the great confidence they have in their product. They are standing up to the their claim that version 2.0 is actually worth $49.95 over the free product even though version 1.86 itself is pretty good. I wish more companies would do the same.

November 8, 2005

How to fix iPod Eq distortion.

Filed under: Apple, Audio — Manish Bansal @ 6:36 pm

The Problem:
iPod gives a somewhat harsh and metallic sound when the equalizer is turned on. It does not matter which preset you choose (except Flat). If you don’t keep the equalizer off, the sound comes out distorted and is not pleasant to listen to. It happens on all the iPod models, even on the latest 5G one which has the best sound among hard disc based models. The 5G fixes lot of problems with the earlier iPods like Noise Defect and comes with a number of improvements, especially in bass performance but the sound still clips with the equalizer.

The Reason:
There is nothing wrong with iPod. Really.

It has as good a sound as any other player. Though it sounds a little bright, the sound has lot of detail and really insignificant amount of distortion. Even the equalizer is well designed and behaves as it is supposed to. But that metallic sound? That clipping? Well, it’s a classic case of “garbage in garbage out".

It’s those damn mp3s. Or rather the original CDs themselves.

In a race to sound louder and louder, the CD mastering engineers push the recording level to its limits. This is especially true for mainstream pop/rock music. Somehow the producers think that the CDs have to be really loud to make a better impression.

Now when these hot mastered CDs (or mp3s made from them) are played with the equalizer on, the total loudness level goes beyond what an iPod can produce. Some of my mp3s had a loudness level of 99.6db!! Yikes! What can the poor iPod do when presented with this crap? Say I choose Dance preset which would typically apply a boost of 6 db. Add this to 97db (a typical figure) and you get a level of 103 db. Most players have an upper limit of about 95db, some even going till 100db but that’s it. No wonder the sound comes out distorted and harsh.

The Fix:
All we need to do is bring down the loudness level of the mp3s down so that we get a little headroom to apply the Eq. The generally agreed upon loudness level for this is 89db.

Download mp3gain. It’s an open source freeware program. Add the folder containing the mp3s. Choose ‘track gain’ and click on the ‘track analysis’. It will calculate and display the loudness level for each song and also how much correction needs to be applied. When this analysis is done, just hit ‘track gain’ and it will apply the required correction to each song.

Mp3gain does not re-encode or otherwise modify/degrade the file in anyway. All it does is set a flag in the file. When a player reads this flag, it knows how loud to play this song.

This whole correction process is a little slow. It took about one hour per GB on my Pentium 4 machine, 30 hours total for my entire collection. It’s the analysis part that is slow. The correction is instantaneous. So instead of hitting the analysis and waiting for 30 hours to do the correction, a better way to do this is to hit the track gain directly. It will analyze and correct in one step.

After all this is done, erase all the songs from your iPod, resync, and enjoy!

Notes:

  1. You can directly point mp3gain to iPod_control folder on the iPod but it is not recommended. You don't want that tiny hard disc on your iPod to be spinning continously for 30 hours. Moreover, if you do it on the PC, other mp3 players can also use this info.
  2. You can stop/cancel the track gain process anytime you want. Mp3gain will pick up from where it left when you start it next time.
  3. Mp3gain is more accurate at doing normalization than SoundCheck feature found in iTunes/iPod. Mp3gain is based on ReplayGain standard which takes into account the mechanism of how humans perceive loudness. Turns out that human ears use average energy over time to perceive how loud a certain sound is. So mp3gain divides each file into 50ms blocks and calculates the RMS energy value of each of these blocks. These values are then used to arrive at the overall RMS energy of the entire song. This is the value which is then used to normalize the song file.
    SoundCheck works in similar way but it seems to take much longer blocks (fewer samples) to calculate the average RMS energy. This makes it less accurate (but a lot faster) than mp3gain.

August 12, 2005

Best values for digital camera settings!

Filed under: Photography — Manish Bansal @ 9:31 pm

Back in the days of film, I used to own a Yashica MF-2 camera. It was as simple as a camera could get. There were no menus to fiddle with, no knobs to turn, and just one button to release the shutter. It didn’t even need the batteries if you didn’t want flash. And I should mention, it has never given me a technically bad shot - ever. All you had to do was press the button. How could you go wrong with that?

Then came the digital cameras and the question became - how could you ever get it right? My digital camera, an Olympys C-760, has more than 50 different settings! As Scot Adams said in Dilbert - we have come from simple tools like pointy wooden sticks to convolulted things like computers but our brains have not evolved at the same rate. And looking at my digital camera, I can personally vouch for that.

There are two type of settings in a digital camera. Ones that are same for each shot and ones that vary from shot to shot. Image quality (jpeg compression) is a fixed type of setting. You don’t want a lower quality for one shot and higher quality for another, assuming you don’t have any kind of strange fetish related to images. White Balance, on the other hand, has to be changed from shot to shot. Actually I don’t change it that often but all the pros say that they do. So there must be something to it. Here is what I do for fixed settings:

Sharpening:
Keep it ‘Off’. If your camera doesn’t have an explicit ‘Off’ setting, keep it to a minimum. I always used to keep it at 0, thinking that this would turn the sharpening off. It was only later I found that the scale was actually from -5 to +5. There is a reason people recommend to RTFM. A few reasons why in-camera sharpening is bad -

  1. Different photos need different type and differnt amount of sharpening. Digital cameras usually employ Unsharp Masking but the only thing that you can vary in that is the amount, not the radius, or the threshold. And that’s where the trouble lies. A tree shot with lots of leaves needs lower threshold than a Facial close up. Even if you could vary those other parameters, it would be too tedious to adjust it for shot to shot. So just turn it off and use your judgement later instead of leaving it to the camera.
  2. The sharpening should always be assessed at 100% size. Those tiny 2″ LCDs just don’t cut it. And you have to fiddle with the sliders a lot before you get the look you want.
  3. USM is not the best technique to sharpen photos. There are lots of other techniques which are More flexible and result in less artifacts. This alone mandates that you use PC to sharpen your images.
  4. Sharpening should be the last step in the workflow, after all the levels/curves/saturation etc corrections have been done. And then too it depends upon the intended use of the picture. Web only images need different sharpening than the ones which are to be printed. Usually you shouldn’t apply sharpening until it’s absolutely needed. Just save your edited file in PSD or XCF format without sharpening and sharpen just before using it.

Contrast:
This should be set to its minimum possible value. This results in a wider dynamic range which allows you to capture more detail. Increasing the contrast in-camera is like applying levels correction to the photo. A pixel which was 240 would now read 250 and the pixel which was 252 would be lost. Same applies to the shadow details too. So keep the contrast to a minimum and make sure that your histogram stretches from end to end. Even if the histogram is bunched up, it’s always possible to strech it later in photshp but there is no way to get back the details that got lost during capturing itself.

I always check the histogram right after taking the shot. Generally I end up shooting the same thing 3-4 times before I get it right but that’s ok. Good shots are worth this much trouble.

Image Size:
Use the biggest size your camera can capture. I always shoot at 2048×1536, the highest my camera can go. It’s all the more important if you shoot in jpeg. If you shoot at a lower resolution, the camera does not use less pixels to begin with. It can not do that. It would always capture the image at its native (highest) resolution and then resize it. And camera’s resampling algorithm are no match for photoshop’s bicubic resampling. So just use photoshop to resize later if you feel you don’t need the full resolution but always capture the image at the highest resolution possible.

Another reason to use full resolution is if you intend to print your shots. Digital images are typically printed at 300 ppi. So if you shoot at 1024×768, you can make a print of only 3×2.5 inches. Sure you can print this upto 4×6″ but it won’t look as good or as crisp.

Image quality:
Again, use the highest quality setting possible. JPEG is already a lossy format and further compression makes it even worse. The lower the quality (higher compression), the lesser the details in the image. That’s why most of the amateur flower shots have petals made of pure color, without any detail. At a resolution of 3 megapixels, the lowest quality JPEG file out of my camera is about 100 KB and highest quality file is at 1.5 MB! Those extra pixels count for something. The quality settings are generally named as fine, superfine etc and vary from camera to camera. Make sure you know that the setting of ‘High’ is really higher than fine or was it the other way around??. With storage being so cheap, there is just no excuse to throw away all that information. Get a higher capacity card if you have to. I use a 512 MB card which captures about 270 shots at highest resolution.

July 22, 2005

The ultimate Winamp setup guide!

Filed under: Audio — Manish Bansal @ 2:58 pm

When we call someone an "audiophile", we generally mean that the guy spends insane amounts of money on the audio gear. This is a wrong defintion, and a derogatory one too. To me, an audiophile is someone who is passionate about music. Who cares about music enough to invest in high quality gear. But it does not mean that we can't be audiophiles if we don't have all the high-end stuff. All it takes is right set of tools and a little bit of fiddling around.

A typical audio path looks like this:
CD –> Encoder –> Winamp (Decoder) –> DSP –> Kmixer –> Soundcard –> Headphones
Let's see what we can do to optimize each stage.

Encoder:
If most of your music comes from internet and other sources in MP3 form, there is nothing you can do about its quality. But if you rip the CDs yourself, read on. MP3/OGG/AAc sound great but why lose quality when you can rip to a lossless format. These lossless formats are really lossless. These are like winzip for audio. You get back the exact same data, with each and every bit intact. The lossless formats do take more space (5 MB for MP3 vs 25 MB for FLAC) but with harddisk space being so cheap, there is no reason to lose quality. The best and most popular foramt for lossless audio is FLAC. I use Yahoo music engine to rip the CDs to FLAC and this plugin to play it in Winamp. Even though a few of the portable audio players support this format, it is not yet widely available on DAPs. So if your player does not support FLAC and if DAP is your primary source of music, you'd be better off with MP3. Just make sure that you use a high enough bitrate (192 kbps or greater) and LAME to encode. Some people claim that AAC has better quality at same bitrates but I can't vouch for that. These are more like Nikon vs Canon debates.

Decoder:
The built-in MP3 decoder in winamp has been licensed from FhG which is pretty decent but not the best sounding one. We need something that can do dithering and noise shaping. I would use foobar but iZotope Ozone does not work with that. Fortunately, there is MAD plugin which does all this and it is free too. I must say that the difference in the decoders is very subtle and for the most part, insignificant. It is more of a purist thing. You should be ok with stock Winamp decoder.

DSP:
The next step in the chain is signal processing. This includes things like equalizer, normalizer, and other sound enhancing plugins. It takes a really good understanding of audio fundamentals to not screw up the sound with these things. You can either read tomes on this subject and try to play around with the settings yourselves. This is like using layers and masks and whatnot in photoshop to sharpen the picture where Photokit Sharpener can do a much better job at the press of a button. In other words, leave it to the pros. And the best DSP plugin for Winamp is by iZopte called Ozone. The basic plugin is free but it is so good that you'd never miss the pro version. I brings out the details in the music that you never even knew about. Especially in the mid and high frequency range. The music sounds more lus and the instrument separation improves to a remarkable degree. Listen to a well mastered CD like Gladiator or "The passion of the Christ" with and without this plug-in to fully appreciate it.

You don't need any other plugin with this, not even Winamp equalizer. I just leave the settings at default for both headphones and speakers. If you start experiencing listening fatigue on headphones, try switching to headphone preset. This mode adds a little crossfeed and HRTFs to make you feel as if you are listening to speakers. Or if you don't like too much zing in your music, try the preset with less sparkle. I found that default mode gives me the purest sound. Just play aroud with different presets and see what you like.

To use iZotope Ozone with foobar, you can use bridge DSP plugin for Winamp. This allows you to use DSP plugins written for Winamp in foobar.

Kmixer:
The signal coming out of DSP goes into a Windows component called kmixer. All it does is mix different audio streams so that two or more applications can play back audio at the same time. It does something else too. It resamples everything to 48 KHz (the native audio data is at 44.1 KHz) which results in a slight loss of quality. We can bypass this thing by using an output mode called 'Kernel Streaming'. It is more of a hack (experimental feature) to support applications that need very low-latency. This plugin does not support buffering (as of now) so the music might skip if you use your PC too heavily while Winamp is running. It should be fine for normal use though. In case you are not happy with KS, use directsound for Win 2K and XP and waveout for Win98/ME.
Update(Mar 04, 2005):
The updated version of kernel streaming plugin can be found at Steve Monk's homepage. It supports buffering for both input and output now.

Soundcard:
This is one of the most misunderstood pieces of hardware. Everyone knows that a Geforce4 is better than Geforce2 video card. You get much better frame rates and almost realistic texture. But a better soundcard? What could a better soundcard do? Play music faster?

Explaining what a good soundcard can do is like explaining color to a blind person. You have to listen to a good setup to really appreciate it. Try not to buy a Creative soundcard. These cards have been optimized for gaming with EAX effects and other 3-D trickery. You want a card built specifically for audio. Chaintech AV-710 and M-audio revolution cards are cheap and one of the best in this category.

If nothing else is available, Creative Soundblaster is a pretty decent solution. Just make sure that you turn off all the so called sound enhancing settings in the soundcard driver.

Headphones:
Much of what has been said about soundcards applies to headphones too. In fact, having a better headphone is more important than having a better soundcard because ear drums are a precious thing. Once damaged, they stay that way. Better buy a decent headphone and treat them nice.

A word of caution: Do not go overboard in trying to get better sound. Do not give the term audiophile its common misunderstood meaning. Listen to the music for music and become a real audiophile.

Peace!

June 15, 2005

How to simulate speakers on the headphones.

Filed under: Audio — Manish Bansal @ 12:24 pm

One of the reasons that we have two ears (or two eyes) is that it allows us to experience this world in three dimensions. We can see just fine with one eye but we need two eyes to gauge the depth of the scene. Similarly, two ears allow us to have spatial hearing. I.E we can localize the source of the sound. We can figure out whether the sound is coming from left or right, from up or down etc.

Say we are listening to some music being played on a speaker. Typically, the sound from the speaker would reach one of the ears earlier than the other (far) ear. This is because our ears are separated by about 10 inches and sound has a finite velocity. This time difference is called Interaural Time Difference (ITD) and is generally in microseconds. And the ear closer to the speaker would receive the sound waves directly, making the signal level at this ear slightly stronger than the far ear. This difference in level is called Interaural Level Difference (ILD). Together, ITD and ILD allow us to localize the azimuth (angle in the plane) of the sound source. These are also called binaural cues since these involve both the ears. We cannot determine the elevation of the sound source using just these cues though.

The sound that comes out of the speaker and the sound that we hear are not the same. Several things affect the sound before it can be heard by us. The distance of the speakers from the ear, shape of our head, the structure of our outer and inner ear, the angle at which the sound waves strike the ear, indirect sound from reflections off the walls etc. All these influences on the sound waves are collectively called as head related transfer functions (HRTFs). Mathematically, HRTF is the impulse response of the medium that carries the sound. These HRTFs allow us to determine the elevation of the sound source. These are also called monaural cues.

But what happens when both ears receive the same level of sound at the same time and there are no external influences on the sound? Since both ITD and ILD are zero and HRTFs are absent, there is no information to localize the sound. So the sound seems to come from the center of the head. This is what happens with the headphones. Our brains loses all its localization clues and constantly tries to figure out where the sound is coming from. This results in fatigue and uneasiness, the extreme case of which happens when we listen with only one headphone (right or left). Speakers, on the other hand, sound much more natural and pleasant since brain has all the information needed to figure out the spatial location of the sound. And all the music itself is recorded in such a way that it would sound most plesant when played back on speakers only.

So if we have to simulate the speakers on the headphones, all we have to do is make ITD and ILD non-zero and introduce some HRTFs and we are set. One of the best Winamp plug-ins to do this is Speakers Simulator by Vladimir Kopjov.

Interaural level difference (ILD):
When listening to speakers, both ears receive the sound from both the speakers. But in case of headphones, left ear receives the sounds only from the left channel and right ear receives the sound only from the right channel. To simulate this on headphones, we have to take a bit of left channel and send it to right ear and vice versa. This is called ‘crossfeed’. Its value varies from 0 to 80% in the above plug-in, default being 70%. The higher the crossfeed, the stronger the localization but lesser scene width.

Interaural time difference (ITD):
The sound coming from, say, left speaker would reach the near ear earlier than the far ear. To simulate this in headphones, the signal that is cross fed is also delayed by a small amount, the delay being roughly equivalent to what would be realized in practice. In the speaker simulation plug-in, the default setting for delay is 113.38 microsecond. More delay gives more scene width but less focus. If increased too much, this delay can cause some sound artifacts.

Head related transfer functions (HRTFs):
This is one of the most difficult parameters to measure because of interaction of so many different factors and different head/ear structures in different people. Lord Rayleigh modeled it assuming our head to be a perfect sphere and using wave propagation equations along a curved surface. The results show that the high frequencies get attenuated much more as they travel than the low frequencies.
Though they are mathematically complex, the HRTFs are really easy to simulate. All we have to do is make the high frequencies roll off gradually and we’ll get the same effect as the speakers. And unless your headphones cost $500 or more, it already has this desired frequency response (it is not so by design but rather from a desire to keep the costs down). So just make sure that the equalizer in winamp is flat for high frequencies. My Winamp equalizer looks like this.

The effect of speaker simulation plug-in is very subtle. It doesn’t seem to have much effect in beginning, but after a few hours of listening, the difference is clear as day and night. And, of course, it is much more pleasant this way and you can listen for longer periods of time without having any fatigue.

Credits:

  1. Sound Localization Using Head Related Transfer Functions
  2. Speakers Simulator plug-in
  3. Sound localization on Wikipedia
  4. Comments by Chris on HydrogenAudio forums

Update:
After trying out various other plug-ins, I have finally settled on 4Front Headphones. It does not apply as much equalization as Speaker Simulator so the sound is more or less unchanged. It also gives much better stereo imaging and puts the sound directly in front of you. The default setting of 30% gives a very distorted and artificial sound but at 10%, it sounds superb.

May 25, 2005

What is a Parametric Equalizer and how to use it on Rio Karma.

Filed under: Audio — Manish Bansal @ 11:46 am

In it’s simplest form, a speaker is just an energy conversion device. It converts electrical signals to sound waves of various frequencies. Ideally, all the frequencies in the speaker output should be at the same level of loudness. If we plot the frequency repsones curve of such an ideal speaker, with frequency (in Hertz) on x-axis and loudness (in Decibals) on y-axis, it would be a flat line at 0db. But such ideal speakers don’t exist. It’s really really difficult to construct such an ideal device. Even if it could be built, it would be too expensive to be practical. That means that we are stuck with ordinary speakers that don’t sound so great, atleast not without some tuning.

The frequency response of an ordinary speaker looks like the outline of a mountain. I.e. the low and high frequencies are not amplified as much as the middle ones. My Sennheiser MX500 headphones have this frequency response, taken from Headroom:

The sole purpose of an equalizer is to compensate for this bias in the speakers. It brings all the frequencies to the same level of loudness. In other words, it equalizes them and hence the name “Equalizer”.

Equazliers on sotware based players (Winamp, iTunes etc.) are typically 10-band and those on digital audio players are typically 5-band. A typical 10-band equalizer:

The frequency shown under each bar is called the center frequency. Just as there are no ideal speakers, there is no ideal equalizer either. I.e. instead of being a straight vertical line, each of these bars is more like a bell. And the range of frequencies falling under this bell is called a frequency band. So a 10-band equazlier can amplify/attenuate 10 separate, but overlapping, frequency bands. Because these bands extend to some distance on either side of center frequency, boosting the center frequency actually boosts this whole band, with the effect being maximum at the center frequency.

In a normal equalizer, the only thing that a user can control is the amount of amplification for each band. But in a parametric equalizer, in addition to the amplification, you can also change the center frequency and the width of each band. This additional level of control comes in handy when matching a pair of headphones to a particular device. I have set the Equalizer on my Rio Karma as:

Center frequencyuency Gain Width
12000 Hz +6.0 db 4.0 octaves
2500 Hz +0.0 db 4.0 octaves
500 Hz -2.0 db 4.0 octaves
150 Hz +6.0 db 4.0 octaves
40 Hz +8.0 db 4.0 octaves

This setting makes MX500 give an almost flat response when used with Rio Karma. The nice player that the Karma is, it offers 3 custom equalizers. So I have set the other one to match my Philips HP800 cans (Based on subjective tests, since I could not find the frequency response curve for it).

To match your headphone to Rio Karma, you need the frequency response curve of Rio Karma and a way to see how your headphone and Rio karma interact at various equalizer settings. This is exactly what John M has done with his KarmaEQ application. But the headphone response curve given by headphone.com is not usable as it is. It has to be converted to a text file having frequency-gain pairs. There are many examples of this on John’s site. I created a file with 30 sets of frequency-gain pairs for Sennheiser MX500. The values don’t have to be highly precise. Just a simple eyeballing would do.

Now all that you have to do is import your headphone response file in the KarmaEQ and start experimenting. The idea is to have the resulting curve as flat as possible. When you are satisfied with the results in KarmaEQ, try that in Rio Karma and see how it sounds. Since sound quality is a subjective thing, the flat curve may not be up to your liking. But take that as the starting point and explore from there on. Happy EQing.

Update:The HydrogenAudio thread on this post contains lot of interesting points on the differences between listening on headphones and listening on speakers. A highly recommended reading. Also my Rio Karma is dead :-(. I did everything I could but it just won’t boot. Well..

May 12, 2005

Why iTunes worked and why Yahoo music would work too!

Filed under: Audio, Opinions — Manish Bansal @ 11:27 am

Yahoo annoucnes it’s music store.

Way back in 1998, when I started collecting digital music, I used to use Windows Explorer to organize my music and Winamp to play it. It was not the best of setups but I didn’t know any better; Until i got an iBook.

The organization scheme used by iTunes completely blew me away. I actually spent 3 days cleaning up all my ID3 tags just so that I could use iTunes. It was that good. Just type a few letters and the song is there. No more mucking around with folders here and there and remembering where you put what. When iTunes for Windows was released, I made it my default player. Even though Winamp 5 has it’s own media library which works similarly, it’s no match for iTunes’ interface.

Now, iTunes for windows is a 20 MB download but I didn’t mind in the least. I just had to have it. The fact that I could buy songs through it was last thing on my mind. And that’s exactly why iTunes music store is such a success and so would be Yahoo music. If you want to buy songs from any online music store, you need a special software, which is different for each store! Imagine Amazon.com and BN.com each asking you to download 20 MB big software just so that you could buy books from them! Whereas you can buy books online using just your browser, you can’t buy music that way. No special software, no music. So how do you get people to download your special software? You do it the Apple way.

You make it so damn good that they start using it for their personal use, without any obligation to buy any stuff from you. The keyword here is “good”. I didn’t download iTunes to buy music. I downloaded it to organize the music that I already had. And that’s where Real and other stores fail. Their software is designed to make it easy for you to buy music, not to organize your existing collection. You can, of course, use it for that purpose but it is torturous to use. And this is where Yahoo gets it right (as did Apple). Infact, their music player is almost a copy of iTunes but with certain new features. It can play and encode OGG and FLAC, in addition to AAC and MP3. It has a UNIX-style shell. It supports open XSPF playlist format. How much more geeky can you get? It lets you share music through Yahoo Messanger and burn CDs. It even supports iPod for non-DRM files.

Being a beta release, it is missing a few things like an Equalizer and is quite slow to load. The best thing that I personally like about Yahoo music engine is that it supports FLAC format (playing and encoding) right out of the box. Since I rip all my CDs in FLAC and iTunes does not support it, I an switching over to YME. But I’ll keep Winamp around just in case and, of course, my trusty foobar2000.

Update 1:
I just ripped a few CDs using YME to FLAC format and the tags it fetched for those songs were the best I had ever seen. All the fields (song title, singer, album etc) were nicely formatted, with proper cases. I tried the ripping the same CDs in EAC and the freedb tags just made me cringe. All CAPS, wrong titles, and incomplete information. I guess YME fetches the tags from its own database instead of freedb. Well, one more reason to use YME.

Update 2:
I am really disappointed at the pace at which YME is being developed. There is still no equalizer, there are hardly any plugins, and there are some weird bugs in it. It cannot “see” an audio CD unless I login as Administrator. iTunes can read the same CDs just fine with a normal user account. It also shows Nero CD burning plugin as a removable device!

The weirdness does not end here. Turns out that YME uses Windows Media Player (or a part of it) in the background to play music. I think it is limited to just protected WMA files but I am not sure. The problem is that it even uses the graphic equalizer settings of Windows Media Player! So if you are not happy with the sound, YME help pages recommend to turn graphic equalizer off in WMP. How much more un-intuitive can you get?

Update 3:
Even though there is no built-in equalizer for YME, you can still use the equalizer on your soundcard. Some on-board soundcards (mostly found in corporate PCs) may not have one but otherwise every decent soundcard should have it. My Creative Soundblaster has a really good 10-band equalizer. And the nice thing about using soundcard EQ is that it is not limited to a particular player. It would work the same whether you use Winamp or Yahoo Music Engine.

Update 4: (Feb 13, 2005)
A new version of YME is out. Still no luck with CDs. Still no equalizer. It is now taking 77 MB of memory even if I am not playing anything! It does have some new features but nothing of interest to me (I do not buy songs from them). Disappointment again.

April 13, 2005

Getting the best sound out of your PC.

Filed under: Audio — Manish Bansal @ 4:46 pm

This article originally appeared on Osnews.com.

Chesky records, a small record label, produces what is called audiophile friendly music. To learn how to create music with this high detail and how to play it right, just read some of their articles. There is a lot of talk there on tube amps and stereo mics and horn speakers etc. Forget the high-end gear, there is one complete article on how to set up your power supply for best audio experience. But mere mortals like us listen to the music on our PCs. Though it does not even begin to compare with all that exotic gear out there, it can be set up to deliver a surprisinlgy good quality sound.

This is a highly simplified diagram of how the music flows:
mp3 file –> mp3 decoder –> processor –> soundcard –> speakers –> Ears

Each one of these stages has to be optimized if you want the best quality sound. If the mp3 file is low-bit rate to begin with, no amount of tweaking can make it sound lush and full. Or if you are using tin boxes for speakers, even a SACD would sound crappy on them. One weak link in the chain and there goes your listening experience.

Input:
MP3 technology was developed by Fraunhoffer Institute in Germany. They also provide software to encode/decode MP3 files and that is what is used in winamp by default. But these official decoders are not the best sounding ones. That honor goes to an open source (surprise! surprise!) decoder called mpg123. It supports ReplayGain and 24-bit output, both of which are lacking from the official decoder. The difference in quality may not be that apparent on ordinary songs but this plugin really shines when the MP3 file contains a lot of detail.

To use this plugin, Just copy the file 'in_mpg123.dll' to 'C:\Program Files\Winamp\Plugins' and launch winamp. Then under Preferences->input, choose mpg123 and double click on it to set its properties. Under Decoder tab, check 'Enable' and choose output format as '16 bit' (or '24 bit' if your sound card supports it). Under Replay Gain tab, check 'Enable', choose 'Album gain', and choose 'Hard Limiter'. ReplayGain will make sure that all the songs play back at the same loudness, thus freeing you from changing the volume for different songs which had been mastered at different levels. No changes are made by ReplayGain to the original MP3 file. It just puts a tag on the file which is used by the decoder to decide whether to amplify or attenuate.

An alternative MP3 decoder called MAD also has a lot of following. There is no conclusive evidence that it is better than mpg123 but arguments go on.

PS - The official mp3 encoder is also not the best one out there! That honor goes (again) to an open source encoder called LAME.

Processing:
After a mp3 file gets decoded, it is fed to a Windows component called kmixer. It does exactly what its name implies - it mixes all the audio streams being fed to it and sends them to the soundcard. This is how we can hear those annoying Windows event sounds alongwith "sweet home alabama". If this were the only thing that kmixer was doing, it won't be so bad except that the kmixer resamples everything, just to make it easier for it to mix all those audio streams. It also fiddles with signal to noise ratio and does many other undesirable things. The end result is that the audio stream comes out sounding very flat and dull. So we need to find a way to bypass this mixer thing and send the audio stream directly to the soundcard. Enter kernel streaming.

Download this plugin and just copy it to 'C:\Program Files\Winamp\Plugins'. Then choose 'kernel streaming' under Output preferences. There are no settings for this plugin (as yet). Since it bypasses the kmixer, the winamp volume control won't work with this plugin. You have to use that little speaker icon in the task bar. This is also way too loud at normal volumes, so keep the volume to a minimum when you try it for the first time. In some cases, when you double click on a file after choosing kernel streaming, the winmap might quit. This is normal. Just relaunch the winamp and it should run fine from there on.

Output:
This section applies only if you have Creative soundcard or a soundcard based on 10K2 chipset.
After a mp3 files gets decoded by winamp, it gets fed to soundcard drivers. These drivers make sense of this audio data and convert it to a format suitable for the soundcard to play. But the drivers supplied by Creative are a bit crappy and bloated. So head over to kxproject homepage and download these drivers. These drivers have a cleaner sound ouput and are much more stable than the stock ones. You also gain much more control over your soundcard settings.

Ears:
Finally, the most critical link in the sound quality chain - the ears. If you cannot tell the difference between an MP3 file and the original CD, don't despair. Most people can't. It takes time and practice and a really good audio setup to hone the listening skills. I leave you here with some commentary from an audiophile who does not just hear music, but actually listens to it. Be inspired!

Credits:
The article that made me interested in all this fiddling is here. It deals specifically with foobar2000 but the concepts are same. Infact foobar2000 comes with kernel streaming preloaded. If you can stand its UI, it is said to be the best audio player around.

December 23, 2004

In-camera sharpening

Filed under: Photography — Manish Bansal @ 7:30 am

When I got my digital camera, I used to shoot pretty much in auto mode. Later when I became a bit experienced and started reading photography books/articles, I started shooting manual.

I knew enough about f-stops and shutter speeds and but I didn’t know anything about some of the camera settings and I couldn’t find anything on the web either. Even the camera manual was of no help. Like should I increase the color saturation using settings on the camera or should I use photoshop? What about contrast? What about sharpening? How do I know whether the camera does a better job than post-processing software.

The most confusing setting among these is the sharpening. Some people say that setting the in-camera sharpening to low or normal is actually good. While some folks are dead against using any kind of in-camera sharpening at all. After searching on the internet for many days and getting nowhere, I decided to try it for myself. One fact that adds to the confusion is that the in-camera sharpening is applied before the file is converted to jpeg.

I have an olympus C-760 UZ, a variation of which, C-765, is sold in the US. It has sharpening settings of -5 to +5, in +1 increments. As part of this test, I made three exposures, one at sharpening set to -5, one at 0, and one at a setting of +5. All these pictures were taken at the highest resolution of the camera and then cropped using iPhoto. No other editing of any kind was done. The photos were taken in low light to boost the effect of the noise. Otherwise it would be very difficult to do the comparison. Here is what I found:

Sharpening set to 0
This first exposure was made at a sharpening setting of -5. There is little noise in the shadows, especially under the big center leaf. There is some noise in the highlights too but it is not so bad. Also notice that the part of leaf visible in the lower left corner (the pointed one) has no apparent halos around it. It actually has a little but it’s hardly visible.


This exposure was made at a sharpening setting of 0. Comparing it to the exposure at -5, the noise is much more visible all across the image. Also notice the halo around the leaf in the lower left corner. It is much more prominent now. This was the setting I used to shoot at and wonder where all that noise came from. In fact I did not know that the sharpening scale on my camera went from -5 to +5. I always used to think that 0 was the lowest until I read the manual. Well, that teaches me something.

Sharpening set to +5
This exposure was taken at +5 sharpening and clearly is the worst of the lot, but that was kind of expected.

After finding out what in-camera sharpening did to the photos, I wanted to find out But how much worse (or better??) was this than photoshop sharpening? I tried many settings in unsharp masking and found that in most of the cases, photoshop outperformed the camera. The only time when camera sharpening was better was when the amount was too high and the threshold was too low in photoshop USM. The camera just does not provide the level of control afforded by photoshop. Another reason to avoid in-camera sharpening is that it does not allow selective sharpening.

« Newer PostsOlder Posts »

Blog at WordPress.com.