Tuesday, 21 October 2014

Adventures in AirPlay

I have been working hard on AirPlay to try to understand what it takes to get BitPerfect to work smoothly with it under the combination of Yosemite and iTunes 12.0.1.  Unfortunately I don’t have a definitive answer for you, but I am at least starting to get a handle on its behaviour.  I thought you might be interested to read some of this.

The problem is, it either works or it doesn’t, and I can’t figure out why.  There are two main modes of “doesn’t work”.  One is where BitPerfect’s menu bar icon stays black.  This one happens rarely and generally only at the first attempt.  It means that BitPerfect cannot access the AirPlay Device.  The other is where the icon starts green, goes briefly black, and then stays green but with no music audible.  This means that BitPerfect is streaming music to the AirPlay Device, which as far as BitPerfect is concerned is responding in the way it normally would.  I have been wrestling with every combination of the various settings and sequences that might impact AirPlay behaviour but despite some successes, nothing has proven to be the magic bullet.

My first potential “Aha!” moment was when I got to the point where iTunes would throw up a message to the effect that “I can’t find the Airport Express” and offers me two options, “Cancel” or “Continue using the Computer Speaker”.  The secret seems to be to select “Continue using the Computer Speaker”.  “Cancel” is the wrong choice.  I spent some time trying to determine what would cause this message to appear, but after a while I just stopped seeing it, and I haven’t actually seen it now since early yesterday.  So that remains a puzzle.

The next interesting observation is a significant deviation from the setup that we have been recommending since Mountain Lion and Mavericks.  iTunes has its own little AirPlay icon (next to its volume control) where you can select between the various AirPlay devices and “Computer”.  It used to be that it was necessary to select the desired AirPlay device, but now I am finding that AirPlay never works unless “Computer” is selected, and not the other way around.

Yesterday, using my Mac Mini, it appeared that the required solution was to select AirPlay as the default system output device using Audio Midi Setup, then launch BitPerfect, and have BitPerfect launch iTunes (whether automatically or manually), then select “Computer” as the output device from the iTunes AirPlay control.  But when I came to confirm my findings this morning, I found that it didn’t seem to matter whether or not I set the default system output device to AirPlay or to something else.  All that matters is that I set the iTunes AirPlay control to “Computer”.  You must select the desired AirPlay device (if you have more than one) in Audio Midi Setup.  I even experimented with connecting the Mac Mini to the network by Ethernet (its normal configuration) or by WiFi.  It didn’t make any difference.

While all this was happening, on my RMBP (which had Yosemite and iTunes 12.0.1 installed) it seemed that AirPlay would always work first time.  I have a second, older MBP and so I installed Yosemite and iTunes 12.0.1 on that machine also.  This morning I have added that to the mix.  It seems that both MBPs have no problems at all getting BitPerfect and AirPlay to work together, provided I set the iTunes AirPlay control to “Computer”.  For the most part the Mac Mini also works too.  However, it took three or four attempts, restarting BitPerfect and iTunes each time in between, before it started working consistently.  With each of these Macs, once AirPlay starts working, it seems to stay working until you stop playback for a while, or quit iTunes/BitPerfect.

So there you have a summary of a couple of days of intensive AirPlay experimentation.  Set the iTunes AirPlay control to “Computer” and it will either work or it won’t.  If it doesn’t, then quit BitPerfect and iTunes and start again.  Rinse and repeat as necessary.  You may be lucky in that you have a Mac which is pre-disposed to want to work well with AirPlay (like my two MBPs) or you may be unlucky that your Mac does not prefer to play ball (like my Mac Mini).  It’s all I have at the moment, I’m afraid.  I have no idea whether or not you will see the same behaviour.  I will continue my experiments, albeit at a less intense level, as I am (a) running short of good ideas, and (b) have other things piling up on my plate.

Monday, 20 October 2014

Yosemite / iTunes 12.0.1

We have been working on evaluating BitPerfect on the latest version of Yosemite / iTunes 12.0.1, and we are coming up with a mixed bag of results.  For the most part it is working quite well, but there are two areas of concern for us for the moment.

The first is with AirPlay.  I have two Macs right now that have been updated to the new configuration.  The first is a RMBP and the second is a headless Mac Mini.  I seem to have no problems getting AirPlay to work on the RMBP, but thus far not with the headless Mac Mini.  I have no idea what the problem is.  I am currently updating a second, older MBP, and will see what happens with that one in due course.

The second issue is with the Console App.  We use the Console Log as a valuable debugging tool, but unfortunately, under Yosemite, BitPerfect is flooding the Console with a raft of unhelpful messages.  In effect, this is amounting to a Denial-of-Service attack on the Console App!!  While this seems to have no obvious impact on BitPerfect's performance, it is rendering our primary diagnostic tool almost ineffective.

More on all this as developments arise ....

UPDATE 21 Oct 2014

Monday, 6 October 2014

Our Own League Of Nations

One of the useful things about Apple's App Store is that they give you some very detailed breakdowns of product sales, including by Country.  To date, BitPerfect has been sold in 71 different countries, which is pretty amazing when you think about it.  And it was just this week that our first customer from Pakistan joined the BitPerfect community, extending the list now to 72.  [Ask yourself - can you even name 72 Countries off the top of your head?]  So, whoever you are - if you are reading this - I would like to extend a warm welcome to the sole representative of Pakistan to the BitPerfect Community!

If you are interested, here are the 72 Countries:
Hong Kong
New Zealand
South Africa
Saudi Arabia
Costa Rica
... and ...

Monday, 22 September 2014

The Lucy Show

The Lucy Show

To the extent that I can claim to be a qualified anything, that would be a Physicist.  I am not a biologist, geneticist, anthropologist, or theologist for that matter.  But it doesn’t stop my mind from wandering into these areas from time to time.  And recently, I have been thinking a bit about evolution.

While working out on my cross-trainer I like to watch a TV show to alleviate the boredom.  Preferably something that will interest me sufficiently to extend my workout to the point where it actually does me some good.  Recently, I saw a show that made some unconvincing point or other about “Lucy” - the one who was supposedly an Australopithecus Afarensis who lived some 3-odd million years ago.  The gist of the program seemed to be founded on the notion that Lucy was a common ancestor of all humanity, and that we are therefore all her direct descendants.  It is all speculation, of course, but it got me to thinking about what it means to be descended from someone or something.  Because, unless you buy into some sort of creation theory, we all, ultimately, have to be descendants of something that first appeared in the primordial ooze.  And I got to thinking about that.

The first thing that strikes me is the notion of being descended from someone.  Usually, long-chain blood lines descend down from a given person, and not up to him or her.  This is because the historic record is light on the general, and heavy on the specific.  So, if you want to trace your ancestry, you probably won’t have to go back very far before you’ll strike out, with apparently no traces remaining of any records regarding certain individuals.  In my case, my family tree peters out after only three or four generations.  Perhaps not a bad thing, I sometimes think.

But one thing we can be pretty sure of, and that is that every human being who ever lived had one extant mother and one extant father (OK, all but one, if that is a point you want to argue).  So, starting with myself, I can say with certainly that I had two parents, four grandparents, eight great-grandparents, sixteen great-great grandparents, and so on.  I may never know who they all were, but I know they did exist.

You can imagine a hypothetical map of the world on your computer screen, with a slider that controls the date going back as far in history as you want.  As you move the slider, a pixel lights up showing the whereabouts of every one of your direct ancestors who was alive on the corresponding date.  If such a thing could ever exist, I wonder what it would show.  My father is a Scot and my mother Austrian, so I imagine that for the first few hundred years or so mostly Scotland and Austria would be lit up.

For all of my most recent ancestors, it is a fair assumption to suggest that they are all mutually exclusive.  In other words, that there was no cross-pollination (if I may put it that way) no matter how far removed the individuals were in my family tree.  Realistically, though, that approximation is going to falter if you include a sufficient number of generations.  Therefore, as we go further back in time the net number of my ancestors stops growing at an exponential rate.  But at the same time as the number of my ancestors has been growing, with the steady rolling back of the clock so also the total number of humans on the planet will be shrinking.  The growing ancestral base, and the shrinking overall population must surely meet somewhere.

It seems reasonable that the same line of logic should apply to us all.  In other words, if we go back far enough in time, we should find that we are all descended from the same group of humans, no matter how disparate geographically, culturally, or any-other-ally.  But this group would not comprise all of humanity at that point in time.  Some of those individuals will die childless.  Others will bear children who will die childless, and so forth.  So the entire human race at that point will comprise two groups of people.  Those who are the direct ancestors of every living person in the world today, and those whose bloodlines died out completely in the intervening millennia.

So the questions that I arrived at were these.  What would the expected ratio be of ancestors to non-ancestors?  Would we expect it to be a relatively large percentage or a relatively small percentage?  And in particular, if the latter, what would it take for that small percentage to actually be one person?  Is that even possible?  I have never seen this line of thinking expanded upon, but one thing I have learned is that whenever something like that crosses my mind, it has always previously crossed the mind of someone who is a proper expert in the field.  Maybe one day I’ll get to hear that expert’s opinion.  But, in the meantime, it seems highly improbable to me that the ancestral percentage would even be a minority, let alone a minority of one.

The next point concerns what you might term the crossing of the man-ape barrier.  This troubles a lot of people.  Scientists dig up ancient skeletons and fossils and assign them to categories such as human, proto-human, and ape.  Actually, they are lot more scientific about it, but you get my drift. The theory of evolution provides a mechanism or road-map for the development of ape into proto-human and proto-human into human, but has little to say on the specifics.  Meanwhile, all we have in our historical record are a seriously limited number of archaeological specimens that we can do little with other than to fit them into a timeline.

The transformation of proto-human into human took - I don’t know - let’s call it a million years.  Yet we only have specific archaeological specimens - for example the proto-human and the human.  Us ordinary folk look at them - and also at the artists renderings of what the original individuals may have looked like - and many people have a hard time grasping how it is at all possible for one to become the other.  Of course, if we had a perfect fossil record - say, one for every thousand years over the span of that million years - we might be able to understand and communicate convincingly how the development played out.  But we don’t.  And so we can’t.  We can just make guesses - albeit highly-informed and very well-educated guesses.

These things happened over timescales so vast that all of recorded history is just a blink right at the end.  It is wrong to think of evolution as a set of stable eras characterized by specific inhabitant species, separated by periods of transition.  Certainly major transformative periods did occur, such as the Jurassic/Triassic, Triassic/Cretaceous, and Cretaceous/Tertiary (K/T) boundaries, but in general, for the last 66 million years, evolution has been a continuous thing.  We are evolving today as a species as least as quickly as - if not orders of magnitude faster than - our ancestors did as they transitioned from proto-human to human.  We’ve just not been around for long enough to be able to observe it.

Lets close with my computerized ancestral map, and slide the time dial back to the age when proto-humans were evolving into humans.  Assuming that all humanity does not derive from The Lucy Show after all, my ancestral map will become a map of proto-human occupation.  Slide it back a bit more and it will reflect ape occupation.  Slide it back even further - and then what?  At that point as far as I can tell all science has to offer is speculative at best.  Apes date back to the cretaceous period.  So, although we pretty much certainly were not descended from dinosaurs, it seems likely that some of our ancestors will have been eaten by them (although if a T-Rex ate some of my relatives, it would perish from alcohol poisoning).  On the other hand, the well-known Dimetrodon - a lizard-like creature characterized by a spiny sail along its back, and recognized by five-year-olds everywhere - is quite possibly an ancestor of today’s mammals.

At the far end of its travel, my ancestral map ends up in the primordial soup, presumably as a population of bacteria.  But if it did, then so did yours!…

Thursday, 18 September 2014

OS X 10.9.5

While waiting for the results of the Scottish Independence referendum to trickle out, I installed the latest OS X 10.9.5 and gave it a quick workout.  So far so good.  I can see no reason why BitPerfect Users should not upgrade.

Of course, like the Scottish Referendum, it may not look so rosy by tomorrow. :)

Friday, 12 September 2014

Has DSD met its Waterloo?

In May of 2001, Stanley Lipshitz and John Vanderkooy of the University of Waterloo, in Canada, published a paper titled “Why 1-bit Sigma-Delta Conversion is Unsuitable for High-Quality Applications”.  In the paper’s Abstract (a kind of introductory paragraph summing up what the paper is all about) they made some unusually in-your-face pronouncements, including “We prove this fact.”, and “The audio industry is misguided if it adopts 1-bit sigma-delta conversion as the basis for any high quality processing, archiving, or distribution format…”.  DSD had, apparently, met its Waterloo.

What was the basis of their arguments?  Quite simple, really.  They focussed on the problem of dither.  As I mentioned in an earlier post, with a 1-bit system the quantization error is enormous.  We rely on dither to eliminate it, and we can prove mathematically that TPDF dither at a depth of ±1LSB is necessary to deal with it.  But with a 1-bit system, ±1LSB exceeds the full modulation depth.  Applying ±1LSB of TPDF dither to a 1-bit signal will subsume not only the distortion components of the quantization error, but also the entire signal itself.  Lipshitz and Vanderkooy study the phenomenon in some detail.

They then go on to characterize the behaviour of SDMs.  SDMs and noise shapers are more or less the same thing.  I described how they work a couple of posts back, so you should read that if you missed it first time round.  An SDM goes unstable (or ‘overloads’) if the signal presented to the quantizer is so large as to cause the quantizer to clip.  As Lipshitz and Vanderkooy observe, a 1-bit SDM must clip if it is dithered at ±1LSB.  In other words, if you take steps to prevent it from overloading, then those same steps will have the effect that distortions and other unwanted artifacts can no longer be eliminated.

They also do some interesting analysis to counter some of the data shown by the proponents of DSD, which purport to demonstrate that by properly optimizing the SDM, any residual distortions will remain below the level of the noise.  Lipshitz and Vanderkooy show that this is a limitation of the measurement technique rather than the data, and that if the signal is properly analyzed, the actual noise levels are found to be lower but the distortions levels are not, and do in fact stand proud of the noise.

Lipshitz and Vanderkooy do not suggest that SDMs themselves are inadequate.  The quantizer at the output of an SDM is not constrained to being only a single-bit quantizer.  It can just as easily have a multi-bit output.  In fact they go on to state that “… a multi-bit SDM is in principle perfect, in that its only contribution is the addition of a benign … noise spectrum”.  This, they point out, is the best that any system, digital or analog, can do.

The concept of a stable SDM with a multi-bit output is what underlies the majority of chipset-based DAC designs today, such as those from Wolfson, ESS, Cirrus Logic, and AKM.  These types of DAC upsample any incoming signal - whether PCM or DSD - using a high sample rate SDM with a small number of bits in the quantizer - usually not more than three - driving a simplified multi-bit analog conversion stage.

Lipshitz and Vanderkooy’s paper was of course subjected to counter-arguments, mostly (but not exclusively) from within the Sony/Phillips sphere of influence.  This spawned a bit of thrust and counter-thrust, but by and large further interest within the academic community completely dried up within a very short time.  The prevailing opinion appears to accept the validity of Lipshitz and Vanderkooy from a mathematical perspective, but is willing to also accept that once measures are taken to keep any inherent imperfections of 1-bit audio below certain presumed limits of audibility, 1-bit audio bitstreams can indeed be made to work extremely well.

Where we have reached from a theoretical perspective is the point where our ability to actually implement DSD in the ADC and DAC domains is more of a limiting factor than our ability to understand the perfectibility (or otherwise) of the format itself.  Most of the recently published research on 1-bit audio focuses instead on the SDMs used to construct ADCs.  These are implemented in silicon on mixed-signal ICs, and are often quite stunningly complex.  Power consumption, speed, stability, and chip size are the areas that interest researchers.  From a practicality perspective, 1-bit audio has broad applicability and interest beyond the limited sphere of high-end audio, which alone cannot come close to justifying such an active level of R&D.  Interestingly though, few and far between are the papers on DACs.

For all that, the current resurgence of DSD which has swept the high-end audio scene grew up after the Lipshitz and Vanderkooy debate had blown over.  Clearly, the DSD movement did NOT meet its Waterloo in Lipshitz and Vanderkooy.  Its new-found popularity is based not on arcane adherence to theoretical tenets, but on broadly-based observations that, to many ears, DSD persists in sounding better than PCM.  It is certainly true that the very best audio that I personally have ever heard was from DSD sources, played back through the Light Harmonic Da Vinci Dual DAC.  However, using my current reference, a PS Audio DirectStream DAC, I do not hear any significant difference at all between DSD and the best possible PCM transcodes.

There is no doubt in my mind that we haven’t heard the last of this.  We just need to be true to ourselves at all times and keep an open mind.  The most important thing is to not allow ourselves to become too tightly wed to one viewpoint or another to the extent that we become blinkered.

Thursday, 11 September 2014

iTunes 11.4

I have been testing the latest iTunes update (11.4) and it seems to be working fine. Initially I was concerned that it had caused my RMBP to grind to a halt and require a re-boot, but this did not repeat on my Mac Mini so I am thinking that was an unrelated issue. It has been working fine on both Macs since then.

It looks like BitPerfect users can install it with confidence.