Jun 052014
 

There are many different ways to listen to music, and many different ways to listen. The old way to record music is on huge discs containing an analogue recording of the music on both sides – what is now called the Long-Playing record (or LP). It’s called long-playing because it is an evolution of other disc-based formats that were capable of holding less music.

The not quite so old method of holding music is the Compact-Disc (or CD) which uses stores the music digitally rather than in analogue form.

The newest method is the “digital download” and is itself as complex as all the previous methods put together. Because the playback of digital music recordings is basically software, it is possible to introduce new “formats” every so often – so we have MP3, Ogg, FLAC, etc. Most of these formats compromise on music quality in favour of smaller file size so they can be downloaded quicker and you can fit more of them on the average portable music player.

However for the purposes of comparing with LPs and CDs, I will only consider high-resolution FLAC files which do not compromise on quality over file size. Specifically FLAC files with a better than CD quality, and yes they do exist.

When considering music playback, it’s worth remembering that good music always sounds better than bad music; an improved playback merely makes good music sound better. And there are diminishing returns.

Having said that, which of the three is better: LPs, CDs, or digital downloads? The answer is complex, and depends upon the what you want to get out of an album. It also depends on the manufacturing quality – a poorly pressed CD on inferior materials does not compare well with a good CD; and perhaps even more so for an LP.

The Physical Experience and Longevity

In terms of an object to be appreciated in addition to the music nothing beats the LP. Excluding the disc itself, the album art is large enough to be fully appreciated. This is for many an important consideration, but personally I buy recorded music for the music and not for the object d’art that it comes on.

In terms of longevity, nothing lasts forever, but a DRM-free digital download is perhaps somewhat surprisingly in the lead here. Providing that you have a good backup regime, there is no reason why a digital download cannot be passed on to your off-spring.

On the other hand, LPs are subject to various forms of damage that can occur by chance every time you play one – even the playback causes a very tiny amount of damage unless you use a laser-based record player. And every bit of damage (or dust) causes a deterioration in the quality of the playback.

CDs have certain advantages in this respect because it is digital and there is built-in error correction so smaller errors get corrected.

However neither physical medium will last forever, and a poorly treated LP is likely to deteriorate significantly in a relatively short amount of time.

Analog vs Digital

very strongly suspect that the preference that some people have for analog has nothing to do with the fact that it is analog. If you play back a quality LP through a high-end system, it may seem to sound slightly better than a CD. But I have listened to very high quality digital rips of LPs played back on a high quality digital music player, and have heard the same effect – even including the added “warmth” that LP playback supposedly gives you.

analog-digital

The graph above is a very exaggerated demonstration of the difference between a “perfect” analog signal (which frankly doesn’t exist) and a very rough and ready digital signal. The distance between the green lines is representative of the sample rate – how many times per second a digital value is measured. The vertical scale of the green lines is representative of the number of bits used to measure each sample – in this case it is far too few leading to a dramatic staircase effect.

The digital version can be improved by increasing the sample rate and increasing the number of bits for each sample. Increase it enough, and it is impossible to distinguish between the digital and analog versions.

But increase the sample rate to 192KHz and the resolution to 32-bits, and you are talking about some really rather large files. Which is why CDs are just 44KHz and 16-bits; at the time CDs were developed, it was felt to be a reasonable compromise between quality and the need to keep storage requirements down.

One thing that is often overlooked is that CDs contain a lot of error correcting data – 20% of the storage capacity is error correction data. This allows the CD player to correct any read errors that occur (up to a certain level). Nothing else has this level of error correction with the exception of a digital download if it is held on an error-correcting file system (such as ZFS).

This section implies that analog is “perfect”. In case anyone believes that, try reading up on wow, and flutter. And indeed the full details of analog vs. digital. Whilst analog in general is no worse than digital, the specific analog method used for LPs is inherently less detailed than the amount of detail available in CD quality audio and indeed high-resolution digital downloads.

The interesting thing about the so-called “warmth” that LPs provide is that this is effectively making a virtue of the weakness of LPs. The old terms for LP warmth are “muddy bass” and “rolled off high end”. Listening to the warmth of LPs may well be a better experience but that does not make LPs better for music playback.

Digital Compression

Judging by some of the snake oil around digital music, compression is not very well understood – for example. there is a fairly popular myth that the audio from FLAC can be improved by uncompressing into WAV format and then playing it back. There is possibly a very tiny advantage in doing that if you happen to have very poor quality digital equipment, but the advantage would be miniscule. That advantage would be simply down to the hardware/software being unable to uncompress and play back the audio stream at the correct speed all of the time.

There are essentially two different forms of digital compression – lossless and lossy. The former can be uncompressed to produce a digital stream exactly the same as the original, and the latter does not. Lossy compression is much smaller in size, so it is better suited to small portable music players, although there is no reason why small portable music players have to have such small capacities for storage (my current portable player has 256Gbytes of storage and my previous portable player had 240Gbytes of storage).

Because lossy compression loses some of the original data, it approximates the original data – ideally in a way that is indistinguishable from the original. However it is possible that extreme compression – as found in 128kbps MP3 files – will introduce artifacts that sound “wrong”.

Summary

When you come down to it, music is not about digital or analog, it is about the music. And to many quality is also a desirable aspect. This can be obtained with analog or digital, but to a great extent digital is more convenient.

If you are after quality, there is no need to switch to analog to get it – digital music can be just as filled with quality as analog providing that you do it properly.

But most importantly, enjoy the music!

May 272014
 

Time to eat humble pie seeing as the results for the European elections show UKIP leading the race – which was not what we were seeing in the local elections. But having admitted I was wrong about the UKIP earthquake, the way it happened is rather curious.

The massive increase in votes for UKIP is only apparent with the European elections. Could it be that voters are happier voting for UKIP when they think the votes don’t matter? It will be interesting to see how next year’s national elections pan out … but I suspect that UKIP will fade away to a certain extent. I wouldn’t be surprised to see them get an MP or two, but not into double figures.

But perhaps I should prepare some custard for the forthcoming humble pie.

Having said that, if the UKIP voters don’t take European elections very seriously, then Europe needs to fix that. Partly by increasing the power of the European parliament at the expense of the European Commission, but also by taking credit for all the good work that Europe does.

May 232014
 

In my opinion, there is one clear thing from the local election results: Lazy journalism. UKIP merrily announced before the election that they were expecting to cause a political earthquake, but the results have been nothing like that at all. Lazy journalists picked up on the earthquake phrase and misused it to talk about the results.

UKIP has done quite well; they’ve even exceeded their internal prediction of getting 100 councilors. But they have not done nearly well enough to cause a political earthquake. That would be more along the lines of getting enough councilors to push one of the big two into third place (or lower).

The numbers aren’t all in yet, but UKIP looks to have won 155 council seats which is still less than half of the next biggest party (the Liberal Democrats on 399 seats), despite the fact that the Liberals were slaughtered – they’ve lost more councilors that UKIP has yet are still in third place. In fact both the Tories and the Liberal Democrats lost more councilors than UKIP gained, and Labour gained a lot more than UKIP.

And UKIP controls not a single council. It’s still an “also ran” party.

Ignoring the fact that UKIP is the kind of party that nobody with more than two brain cells wants to see in power, UKIP is in the position of being a minor party. A single-issue party that has yet to break into the mainstream. If they continue to progress at the rate they are doing (unlikely in the extreme), they may start winning councils in another decade.

No earthquake in sight.

May 192014
 

So there I was, contemplating whether I could produce a nice and simple bar chart showing the number of films I’ve watched per month. Using just MySQL.

I knew it was easy to produce a simple numerical count with count(*) and a group by clause, but a bar chart? Turns out it was easy with the repeat string function.

mysql> select date_format(whence, "%Y-%m") "Month", 
          repeat('*', count(*)) "Number of Films" 
          from films group by date_format(whence, "%Y-%m");
+---------+------------------------------------------------+
| Month   | Number of Films                                |
+---------+------------------------------------------------+
| 2007-05 | ****                                           |
| 2007-06 | ******                                         |
| 2007-07 | ******                                         |
| 2007-08 | *****                                          |
| 2007-09 | ******                                         |
| 2007-10 | ***                                            |
| 2007-12 | ****                                           |
| 2008-01 | *****                                          |
| 2008-02 | ****                                           |
| 2008-03 | *                                              |
| 2008-04 | *****                                          |
| 2008-05 | *****                                          |
| 2008-06 | ******                                         |
| 2008-07 | ****                                           |
| 2008-08 | *****                                          |
| 2008-09 | *****                                          |
| 2008-10 | ****                                           |
| 2008-11 | *****                                          |
| 2008-12 | ***                                            |
| 2009-01 | ***                                            |
| 2009-03 | **                                             |
| 2009-04 | ***                                            |
| 2009-05 | **                                             |
| 2009-06 | ****                                           |
| 2009-07 | ****                                           |
| 2009-08 | *                                              |
| 2009-09 | **                                             |
| 2009-10 | ****                                           |
| 2009-11 | **                                             |
| 2009-12 | **                                             |
| 2010-01 | **********                                     |
| 2010-02 | **********                                     |
| 2010-03 | *************************                      |
| 2010-04 | *****************************                  |
| 2010-05 | ********************************************** |
| 2010-06 | ***********************                        |
| 2010-07 | ****************                               |
| 2010-08 | **********                                     |
| 2010-09 | ************                                   |
| 2010-10 | **********                                     |
| 2010-11 | ********                                       |
| 2010-12 | *********                                      |
| 2011-01 | *******************                            |
| 2011-02 | *************                                  |
| 2011-03 | **                                             |
| 2011-04 | ************                                   |
| 2011-05 | ********                                       |
| 2011-06 | ***                                            |
| 2011-07 | ****                                           |
| 2011-08 | *********************                          |
| 2011-09 | *                                              |
| 2011-10 | **                                             |
| 2011-11 | ***************                                |
| 2011-12 | ********************                           |
| 2012-01 | ********************                           |
| 2012-02 | *******                                        |
| 2012-03 | *******                                        |
| 2012-04 | *****                                          |
| 2012-05 | ******                                         |
| 2012-06 | *******                                        |
| 2012-07 | **************                                 |
| 2012-08 | ************                                   |
| 2012-09 | ***************                                |
| 2012-10 | *******************                            |
| 2012-11 | ****************                               |
| 2012-12 | *******                                        |
| 2013-01 | *************                                  |
| 2013-02 | *************                                  |
| 2013-03 | ******************                             |
| 2013-04 | ******************                             |
| 2013-05 | ********                                       |
| 2013-06 | ************                                   |
| 2013-07 | **************                                 |
| 2013-08 | ***                                            |
| 2013-09 | *************                                  |
| 2013-10 | ********                                       |
| 2013-11 | ***************                                |
| 2013-12 | ***********************                        |
| 2014-01 | *************************                      |
| 2014-02 | ********                                       |
| 2014-03 | *************                                  |
| 2014-04 | ****************                               |
| 2014-05 | ************                                   |
+---------+------------------------------------------------+
83 rows in set (0.02 sec)
Apr 302014
 

See: http://www.buzzfeed.com/lukelewis/24-agonising-british-problems

  1. I’m still waiting for the first person to hold a door open for me.
  2. If I can’t hear you, you ain’t talking.
  3. “Gerroff”
  4. There’s actually a better way to deal with unexpected visitors. First take all your clothes off, and then invite them in. It works especially well with Jehovah Witnesses.
  5. “The button is not lighing up … we’re trapped. We’ll die in here. Slowly.” in an increasingly panicy voice.
  6. Tea? What’s that?
  7. But “well this is fun” is supposed to be the way to announce that you’re having the worst time of your life.
  8. Well that’s no way to make someone nervous.
  9. And thus, never choose a first choice mug.
  10. Don’t get annoyed; just use the cricket bat.
  11. Do people really do that?
  12. “Do you come equipped with a mute button?”
  13. Never experienced this. Possibly because I refuse to speak to machines.
  14. But “that’s interesting” is supposed to be sarcastic.
  15. Not at all. It’s a great opportunity to tell people endlessly about my fascination with serial killers.
  16. A sandwich connoisseur would never trust someone else to make the sandwich.
  17. You do surprise me.
  18. Actually, I practice my odd pained grimaces. It takes effort to get them just right.
  19. Of course!
  20. Not at all. See #4
  21. Who am I?
  22. It actually translates as “Thanks a bunch for using this infernal instrument to interrupt me and ask me your trivial question when I was doing something important.”
  23. And of course it should never be used unless blood is spurting.
  24. Actually it’s a great opportunity to bite their neck and suck their blood.