Sunday, 3 July 2011

Good point - its called freedom

Open will win.

The future of government is transparency.

The future of commerce is information symmetry.

The future of culture is freedom.

The future of science and medicine is collaboration.

The future of entertainment is participation.

So we need that governments tell us everything, the good and the bad and power doesn't go to their heads, and corruption raise its ugly head. Commerce will go better if all parties, finance, suppliers, makers and customers have a symmetrical balance to success. We can move forward as a race, the human race, if we push determinedly for freedom, in all ways, religious, speech, business, let's be happy. And you can't say that we should not collaborate in medicine, that knowledge should be shared, this doesn't prevent pharmaceutical companies from a return on investment, but it should encourage academics to share.

And finally in the area of entertainment we have to participate, not allow business models to exploit exclusivity, this is an area of current high dudgeon as the internet takes over delivery and this means more than physical product sales.

Think about it today in what you do.

Friday, 1 July 2011

Greeks down, is anyone listening?

The Greeks have capitulated, the urgent money they need will be paid. Their politicians have passed the enabling law and people will get paid, for a couple of months at least. But the people are not with them, and it remains to see if the measures can in reality be implemented, not only sackings, but wage cuts, tax collection improvements, and asset sell-offs. What a bunch of agony to inflict on everyone. OK it has a cause, the Greek top managers have cheated, but to a large extent this was inevitable, they screwed the system because they could get something out of it, because the system was weak and badly managed. The euro does not, and will not work unless every country that uses it has an interest and deep responsibility to maintain it as a viable currency.

Postponing is not solving

And now we have postponed the problem but not solved it. We can all no longer live on ever increasing debt, national and personal. Seems to me that banks have been allowed to simply create money, due to their very low capital holding ratio to lending (German banks have 32:1, UK 24:1 and USA 12:1). But the lending is not secure, who can say whether some of the complex contracts that have been struck have little or no risk. They do, they have lots of risk as the sub-prime collapse has shown. And the way we are going is a terrible one, governments take our money, or print money or borrowed in our, the tax payers, name and bail out the casino banks. No!

It has been made much worse by the ridiculous lending of banks of one country to governments of another, France and Germany lent Greece huge amounts. Do they really think they will get paid back? I am sure they knew very well that their loans were not safe, but they continued to prop up a financial system that was institutionalised and weak. OK so blame the banks, but it is the laws under which they operate that have to be better. Our dumb politicians have to shape up and improve things. The weak Greece actions that have been taken are just to give some vague assurance to the casino banks that their lending is somehow safe. Huh! Non ci credo!!

This is all a stack of cards.

We have to find some principles for the euro zone, and some principles for the way the our financial system works. At the moment the bankers and the ECB are carrying on as before, and it is the people who are suffering. We are getting a raw deal. Our money is becoming more and more just casino gambling chips. And never let us forget that it IS our money, printed by the state and provided to US to trade with, not to bankers to gamble with. It is sovereign money.

We have been forced to mortgage ourselves up to the hilt to have a house to live in, at ridiculous prices; forced to accept worse pension arrangements - now even in the public sector in UK, since the private sector has already been raped. Real disposable incomes are falling, financiers and economists demand growth just to sustain the unworkable financial model.

We need leadership.

The UK is able to insulate itself a bit from the euro crisis itself, but things are pretty bad here too. I don't see any moves on the part of the UK politicians to grab the bull by the horns and give us our money back.

I have no solution

I do not have a solution, the situation is too complex for me. But I do know things are not right and have to be changed. Who will do it?

Great piece of software, audio analysis

I have to post this screen shot of the program Spectre. It is the best audio analysis program I have ever seen. It lets me see the signal levels, in three different monitors, and the audio spectrum. I have always been convinced that for good HiFi reproduction you have to have an audio bandwidth larger than the usual 20-20kHz that everyone quotes - based on that's what you can hear, so that's all you need. To reproduce the actual sound of many instruments you have to have a much wider bandwidth. Here you can see the signals way above 20kHz. Screen shot 2011 07 01 at 09 22 56 Spectre is running on my MacBook which is a great computer for audio and sound production, or reproduction. Have a look at these two recordings, on the left the BBC studio "Live" show from iTunes AAC download, on the right a 24bit/96kHz studio HD recording from Linn Audio, see the harmonic content above 20kHz! on the right recording. This is another reason why CD and iTunes AAC is an obsolete technology and needs to be upgraded.... Screen shot 2011 07 01 at 12 51 09Screen shot 2011 07 01 at 12 53 32

Thursday, 30 June 2011

My FLAC vs AAC hobyhorse

I know I go on a lot about the huge use of lossy compression for audio music. That is MP3 and AAC. In the days when we had smaller broadband pipes and very limited download caps, and we had cheap MP3 players, and expensive iPods, these file formats grew exponentially. Threatening the CD for music sales. They enabled marketeers like Apple and Amazon to sell individual tracks, rather than an album CD, with perhaps one or two songs that were any good and a load of rubbish tagged along.

The problem

But the problem is that these file formats have worsened the audio quality and downgraded the public's appreciation of audio quality. The CD has balanced this by maintaining its uncompressed file format, and audience, but even it unfortunately often limits the audio (boosting soft sounds and cutting loud ones) to match the poor performance of domestic, cheap HiFi equipment, and young people's desire to have everything just plain loud. But the popularity of downloads and the iTunes store has promoted an explosion in AAC track sales.

Loss of quality

One thing must be made very clear, lossy formats like AAC spoil the audio quality - often in an unacceptable way. AAC works by what is called psycho-acoustic compression. Which means removing some of the information in the audio file which, in theory, the human ear cannot detect. It is a continuance of the false idea that to reproduce a music instrument it enough to capture only those dynamics and frequencies that humans can detect.

But have a look at these two spectra of music, from Wikipedia, one the original and one a compressed AAC file.

Original file The original file shows dynamics plus a wide spectrum of sound up to above 20kHz.

AAC compressed file This AAC lossy compressed file has lost the high frequencies, they have been cut off by a sharp filter at about 19kHz, but worse than that the dynamics of the sound have been compressed with a flat top and many individual peaks enhanced to the top. This is distortion.


If you believe you can't hear that then you should do two things, buy a better HiFi system and stop using iTunes. Buy CDs or better download HD audio 24bit/96kHz files from companies like Linn audio, HDTracks, etc

Consumers revolt

It is time to revolt and ask the record companies what the hell they think they are doing? Prices of tracks and albums have fallen through the floor, but they seem to have no quality strategy to build a more lucrative market. They even make things very much worse for themselves by selling their product through streaming sites like Spotify, which has a dreadful audio quality. Spotify may have 9million tracks and iTunes 18million, but who needs this much? The amount of tracks available is not the way to boost profits for artists. Better quality is.

They need to focus on offering a better product. That means better recordings, less limited and less compressed, in lossless file formats like FLAC or Apple's Lossless, with a wider dynamics from 24bit recordings and wider bandwidths from 96kHz sample rates (the CD is only 16bit/44.1kHz and it was invented 30 years ago).

Addendum

I found this explanation of lossy compression which seems appropriate:

Since small file size is so important on the Internet, practically all of the formats we're interested in employ lossy compression. Here's how it works. First, the client player decompresses the audio file as it downloads to your computer. Then it fills in the missing information according to the instructions set by the codec. To illustrate why lossy compression is so crucial, consider the phrase, "Now is the time for all good men to come to the aid of their country". One way to compress this would simply be to remove all the vowels and spaces: "Nwsthtmfrllgdmntcmtthdfthrcntry".

That cuts the message from 71 characters to 31, a 56% file savings, but of course our compressed message is unintelligible. Imagine that our codec, however, has appropriate rules for decompressing this message with minimal distortion. The conversion likely wouldn't be perfect, but it would be good enough to understand the message, something like, "Now's tha ti'm for oll gudm en to com to the aad of their country".

Wednesday, 29 June 2011

Digital audio, clearing the air

Go on the web and google "digital audio" and you will find hundreds of thousands of hits. There is an enormous amount of discussion going on about the topic. I would say that 90% of it is people coming from the analog era who simply don't understand digital audio. This is really a big surprise as the CD has been around since 1978 - seems we are slow learners.

But digital audio is very different from analog, and the conversions back and forward from analog to digital and back are not well understood. Lots of audiophile talk about "bit perfect", about jitter, about what is best USB, Firewire or optical SPDIF interconnects, without understanding the fundamentals. These are minor issues compared to the fundamental use of CD or HD audio.

So lets have a look at these and bust a few myths. I must comment that I and most audiophiles use Apple Mac computers as they have a well implemented set of audio core functions that provide very good performance, as we shall see.

Bit depth and volume controls

The Apple Mac "Core Audio" software has 32bit processing, any 16 bit CD tracks are converted to 32bit where the 16bit occupies the MSBs of the 32bit data. If a volume control is applied by shifting the data towards the LSB then the full 16bit info is retained for up to 16 shifts, or around 95db. One shift however represents a large drop of 6db in volume (more on this later).

What matters is the conversion, or not, back to 16bit with a simple DAC. If a 16bit DAC is used then the 32bits are converted back to 16 bits and bits 17-32 are thrown away. If the volume has been reduced digitally then the result is going to be a few more '0's at the MSB end, and the LSBs will extend below bit 16, so if a 16bit DAC is now used then these bits below bit 16 will be cut off. If a 32bit DAC is used then there is no loss of resolution down to the full range of the CD capability.

The Mac using OS X provides 32bit processing, and provided you hook up a 32bit, or more likely a 24bit DAC, any changes to volume or any effects applied, will be correct. The volume control in iTunes works this way for 16bit recordings (CD rips and the awful lossy AAC tat that Apple iTunes peddles).

On the other hand the iPod, iPhone and iPad (and Apple's Airplay) using iOS software do NOT work well, because iOS supports only 16bit audio processing. So their volume controls or Airplay transmissions always lose resolution when the volume is turned down. Which is why they sound so poor at low volumes. If you use a combination of an iPad, AAC compressed files, and the iPad/iOS digital volume control then you get very poor quality. Apple's Airplay is also just a 16bit pipe, so any 24bit tracks are down sampled. Airplay can carry the 16bit output from an iPad perfectly, but not the 24bits from an HD recording in iTunes. At least Airplay/Apple TV supports 48kHz so downsampling from 96kHz to 48kHz is relatively simple and accurate. But 24bit to 16bit clipping is not a good idea. Time for Apple to introduce 24bit/48kHz ALAC files as standard in iOS and on iTunes.

Mathematics and bit perfect

Volume is reduced not by simply shifting the data towards the LSB, which would reduce it in large 6db steps, but by mathematic computation of gain x signal input. To get a smooth volume control the gain number has ideally to be also a 24 or 32bit number, thus requiring a processor or maths unit capable of 24x24 or 32x32 calculations. The Mac OS X software actually uses floating point 32bit audio representation and fast enough processors so its calculations do this easily.

Remember here that all the arguments about bit perfect transmission are immediately destroyed by any gain calculation, the bits out are not the same as the bits in except when the volume control is set at one of the 6db steps represented by a one bit shift of the data. Multiply a number by a fraction and you more than likely will get a remainder. The only way to get bit perfect is not to use a digital volume control, but an analog one between DAC and the power amplifier leaving the digital part of the chain to always run at full resolution.

Limits and levels

Screen shot 2011 06 30 at 11 00 28 Remember also that normally the analog 0db level is equal to -12dB (14bit resolution) on a CD, leaving a 12db overhead up to the full 16bit capability (you cannot get more than all '1's in the 16bit word!). So most music is only 14bit dynamics (pop music limits or compresses music to use up this overhead, and even reach just 3dB below digital clipping to have "punch" so essential to the teenage ear). 12dB leaves an 84dB range for a standard CD linear PCM. For 24bit recordings the 0db level is set to -18db leaving 21bits for recordings, with an 18db overhead. Clearly 24bit is essential for HiFi systems. 21bits gives a 126db range, not enough for a full orchestra range of about 135db, but way better than 16bit/84dB of the CD.

The solution for audiophiles?

1 Use an Apple Mac and OS X which does all audio processing at 32bit floating point
2 Use a 24bit DAC, and Firewire or SPDIF optical connection
3 Adjust the gain of the analog power amplifier so that max DAC output (corresponding to full 24bit digital input level) is equal to the amplifier's max output peak output capability, so the DAC output can never cause it to clip.
4 Use true 24bit HD audio recordings, if you can get them!

On this last point it is worth saying that record companies seem distinctly unwilling to release music at 24bit/96kHz. I can see NO sensible reason why they would not do this, it would stimulate a new interest in music and audio reproduction, and mark a new turning point in the offering of higher quality music which has not happened since the CD was invented. The recent moves to AAC and streaming audio are very retrograde steps for the industry. In today's world with fast broadband speeds delivering tracks in 24/96 using lossless FLAC or ALAC compression is a no-brainer. A typical track is about 80-120MB, or in my calculations just 160secs to download across a 5Mbps ADSL line.

Use of available range

Screen shot 2011 06 29 at 09 34 21 Imagine a range of sound from the smallest (silence) to the loudest peaks. This has a certain range. Now where do we fit this range into the capability of a 16bit CD (which has a total range of 96dB) or a 24bit HD recording (with a total range of 144dB). If we put the range at the bottom LSB, then for the CD the highest volume peak can only be 96dB above this level, not enough for classical music. If we use 24bit then we can have up to 144dB, more than enough for any sounds in the world (except perhaps the space shuttle taking off).

We have been accustomed in the analog world to a concept of 0db as a reference level, with headroom above this for peaks. When it comes to digital recording we have to chose to put the peak of the range of sound at a level when all bits are full (all 1's), it can go no higher, this is the equivalent of analog clipping. But where then do we put 0db to give an acceptable headroom? The 16bit CD uses a 12dB overhead (only!), but 24bit HD audio uses 18dB (still a bit low but better than CD). Remember that 1bit of a digital signal = 6dB analog level, so a CD 0db corresponds to 14bit and HD audio 0db to 21bit. The 14bit of the CD is a rather poor resolution as it represents too few analog steps in the digitisation and leads to an inaccurate restoration of fast moving audio signals.

Mixing and effects

What we have also to take into account is that recordings are not made with a single microphone yielding 16 or 24bit of audio. Use more inputs or apply effects or EQ and you have to do some digital mathematics to mix the sounds. 24bit x 24bit mathematics can yield more than 24bit results! So the audio digital signal processing or mixing, equalisation, volume control or anything else needs more bits. Typically 32bits are used, and in Mac OS X floating point 32bit is the standard for the internal CAF audio format for Core Audio software. Hi end studio mixing equipment can run up to 32bit and 768kHz!

Sample rates, 44.1, 48, 88.2, 96, 176.4, 192...

The other matter that remains is what sample rate to use. Common rates are either multiples of 44.1kHz or 48kHz. (By the way there is no technical reason for choosing the 44.1kHz rate for a CD, other than the historical use of video tape recorders to capture the first digital recordings, would be great if the first engineers had chosen 48kHz instead...!). Our objective is to reproduce the sound of the original instrument, not the human perceived sound! The incredible fallacy of the argument that we only need a bandwidth that the human ear can hear (chosen as 20-20kHz) has provoked the acceptability of 44.1kHz sample rates of the CD giving a bandwidth up to around 21kHz (sharp low pass filters must be used before analog to digital conversion in the studio to avoid distortion), and even worse is the second argument that the human brain cannot distinguish between some sounds which has led to psycho-acoustic lossy MP3 and AAC compression disaster. With stupid claims that "AAC is CD quality" and "anyway you can't hear above 15khz or so".

The fact is some musical instruments generate sounds or harmonics over 90khz or so, the simple rattle of a bunch of keys shows a spectrum up to 50-60kHz. Nyquist mathematics says this will need a digital sample rate of 2x the highest frequency, or at least 180khz. So an obvious choice is 24bit/192kHz recordings. However 24bit/96kHz are more common, and are a fundamental improvement over 16bit/44.1kHz of the CD, giving a bandwidth up to 45kHz. They much better capture the dynamics and timbre of instruments and vocals. Thus giving a much better listening experience - more breathy openness, more dynamic oomph, etc. And lossless compression avoids the loss of phase information and stereo imaging that lossy formats like AAC suffer from.

Of course using a 24bit/96kHz digital system means you need a very good analog poer amplifier with bandwidth of 50khz or so and sustainable Low Frequency output, say down even to DC. Anyway the weakest link in the chain is the loudspeakers and this is where to spend your money.

Even CDs are no good

Clearly the 16bit of the CD, with a limited headroom of only 12dB and a silence-to-0db range of 14bit or only 84dB is not enough to record live music, classical or pop. So all recordings are compressed or their volume adjusted to fit in this 84dB range, or they are limited to avoid hitting the 16bit maximum level possible, pumping up the apparent volume. What is also clear is that digital volume controls in 16bit only systems are a disaster and that AAC or MP3 lossy compression is also a step backwards in audio quality...

HD audio at 24bit/96kHz in non-lossy compressed files such as FLAC or Apple's ALAC get a deal closer to what we need giving 18dB overhead and 144-18 = 126dB silence-to-0db range. This is enough for most classical and pop music.

You will be amazed at the improvement in audio listening pleasure if you move to HD Audio. Go try it out!

My setup

My setup: Apple MacBook, WiFi router, Appel iPad and iPhone, Apple Airport Express (analog or digital output), Apple TV (digital output only), home built amplifier with quad chip DAC, two Hypex Class D amplifiers, Spendor loudspeakers. All audio is stored on the MacBook in ALAC format files and streamed to the Airport Express or the Apple TV (Preferred). I have also a Firewire 24/96 DAC for direct connection to the MacBook for critical listening.

Monday, 27 June 2011

Hey guys, super news 3Mbps brodband

Well is has taken me 9 months of arguing with first Orange and then BT and then Plusnet to get my broadband sorted out. The event line is something like this;

1 We have free broadband from Orange under a mobile phone contract
2 But it is only 600Kbps at best
3 So I call them and ask why they cannot deliver the 20Mbps they offer...
4 They are obstructive and unhelpful, they refuse to contact BT to report a fault
5 I quit Orange and sign up with Plusnet
6 They take over my broadband and manage to give me 1.2Mbps, way below the rating of my exchange of 8Mbps and way below their publicity of 20Mbps
7 I complain, they start to check it out, making some tests and get me also to run some tests. These are inconclusive, no one knows what the problem is.
8 They take over my phone connection later, and the broadband rops to 0.6Kbps, like it was with Orange. Back to square one.
9 But I don't give up, I ask them to look into it, and they eventually agree it must be a fault on the line and call in BT to investigate
10 A BT engineer calls and tests the line, he also re-wires me to the exchange! There is no improvement. Now that puzzles him.
11 A couple of days later I get a note from Plusnet to say they have found my broadband was restricted !!! I could have told them that!!!
12 They remove the restriction and the speed goes up to 3Mbps, whoopee.

A very sad and exhausting story of poor customer care, but I got there is the end. Here's the recent history of my connection speeds.
11-05-29 12:25 1216Kbps 366Kbps
01-06-11 14:06 1216Kbps 301Kbps
05-06-11 09:56 1216Kbps 341Kbps
07-06-11 12:22 1232Kbps 308Kbps
10-06-11 09:25 624Kbps 318Kbps (phone number active on Plusnet)
14-06-11 10:03 696Kbps 369Kbps (line "reset")
17-06-11 09:00 784Kbps 259Kbps
20-06-11 14:54 696Kbps 366Kbps
22-06-11 17:02 696Kbps 306Kbps (after BT visit and line changed… awtg line reset)
23-06-11 11:04 688Kbps 319Kbps (msg to say I was CAPPED, they will remove it)
25-06-11 11:10 3274Kbps 294Kbps (wow!)

New contest: Germany 1 ECB 1 Greece 0 Banks 0

Well now some light is dawning. France is getting its bank to reschedule the Greek loans (the credit agencies say this is tantamount to a default, but there...). The ECB is asked to take over the loans. Now that's a good idea. In fact what I suggest is that every country's loan above 60% of GDP is taken over by the ECB, who then raises money from other countries, or prints it... (60% is the figure everyone was supposed to respect when the euro was launched, but which a few, most notably Greece totally ignored). That may even the score and underline that the future of the euro is more important than the impact of profligate countries to exceed their borrowing capacity. It may also make the stupid banks sit and think as they are way over extended in their sovereign loans.