The sound of silence – briefly

Yesterday we packed our middle daughter off to a week of pony camp. She’s only an hour away, but it’s the longest she’s been away from us. We were suitably apprehensive.

But when we arrived we were met by a lovely set of event leaders, who helped “A” settle straight in. She’s bunking with loads of other horse-mad girls, and even as we were walking away, she was heading straight for the stables.

I think she’s going to have a good time!

But back at home the house has been surprisingly quiet. “A” loves her music, and whenever she has a spare second, tends to be practicing on either the piano or flute. Recently she and “J” have been vying for who can master the Michael Nyman piece, “The Heart Asks Pleasure First”, and the sudden silence around the house is somewhat unnerving.

But to counter that, “P” has managed to prove that she really does know her multiplication tables off by heart, and earned herself her longed-for saxophone.

So tonight the house was echoing to the sounds of the saxophone instead. And boy is it loud!

Advertisements

Upgraded study music system

Like a lot of people, I sometimes work from home. In general it’s a day or two a week, and I’m lucky enough to have a small (2m x 2m) study dedicated to that. And since it’s the one room in the house that is genuinely “mine” and no-one else’s, it’s something of a refuge as well as a place of work.

My need for music while I work has meant that over the years I’ve moved from a pair of earphones plugged into the laptop, to a Joggler acting as a DIY Squeezebox Touch. This fed a pair of powered computer speakers from its headphone socket, which produced some basic noise, but wasn’t exactly high fidelity.

For some time now I’ve been watching the discussions around Gainclone and T-class amplifiers on the internet with interest, and this month I decided to spend some of my “toy fund” on improving my study music system. In the end, I was somewhat limited by the Joggler (which I wanted to keep) in my choice of improvements, as the only analogue audio output available is a low-quality headphone output. Which meant I needed to move into the digital domain, and flow my music over the USB output into an offboard DAC and amplifier.

I looked at various options (mostly involving second-hand DACs) but then I discovered this review of the Topping TP30, which is a combination T-class amplifier and USB DAC in a conveniently small package. Further investigation led me to this further (and more detailed) review.

At this point I was pretty much convinced, especially as I was able to get one delivered from a UK Ebay supplier for only £63. My only concern was that as the output is only 10watts RMS per channel into 8 ohm loads, the speakers need to be reasonably efficient, even in as small a room as mine.


Fortunately I had an old pair of speakers from a Sony micro hifi, which looked like they might be good candidates – and were helpfully only 6 ohm loads too.

So, what does it sound like?

Surprisingly good. It’s no match for my old Audiolab 8000A and KEF reference speakers in the lounge, but it’s a massive step up from the old set of 2.1 powered speakers that I was using. It produces a very pleasant sound, tending towards the lean and analytical – which is the sound I prefer anyway. With a good recording, it can be quite revealing, and with the right track it happily grabs the beat and rocks along nicely. Volume levels are (as Rolls Royce would say) “adequate”; half volume is as much as I would ever want in this size room. My only criticism would be that it doesn’t have the reserves of power to provide sudden big slams of bass; but then I wasn’t expecting that it would.

What’s interesting to me from having done this is the minimal cost of creating a very impressive sounding system; the TP30 was £63 delivered. Speakers like mine are about £25 on Ebay. Jogglers are £50 on Ebay. Admittedly I already had the NAS with the Squeezeserver software & music store … but many people have a spare computer these days, or you could equally well feed the amplifier and speakers directly from a laptop. Hard to imagine a better value-for-money set up for a student. It’s even relatively portable.

Joggler Squeezeboxes (part iv)

Since finally getting the BBC iPlayer listen again streams to work by switching over to the AAC streams rather than the WMA streams, it appears that the BBC have broken the AAC streams at their end. I’ve (temporarily) switched back over the to WMA versions, which work, but that I (still!) cannot seek within.

Sometimes it really does feel like life is a constant case of 2 steps forward and 1 step back…

Joggler Squeezeboxes (part iii)

After quite a lot more experimentation, I’ve completely failed to get seeking within iPlayers WMA-based “listen again” streams to work. Although I’ve yet to prove it definitively, it seems that the Squeezebox Server code doesn’t support seeking within such a stream – flagging my transcoding command line as being capable of seeking, and then using the GUI to attempt to actually seek in the stream doesn’t result in the Squeezebox Server passing the seek location to my transcoding command.

More research into WMA streaming seems to indicate that passing the seek command from a client to the server is not trivial on non-Windows platforms, and appears to be based on a collection of proprietary and less-than-well-documented dataflows.

So my (completely unsubstantiated) suspicion is that Squeezebox Server running on a non-Windows platform (like mine) doesn’t support seeking within WMA streams.

However, there is always another way. And in this case, it transpires that not only do the BBC stream their iPlayer radio streams as WMA, but also as AAC, which is a codec that is significantly better documented and supported on Linux. So by simply changing the preferences within the iPlayer plug-in it’s possible to switch to using the AAC streams, which are supported by both my Jogglers and my Classic player. Better yet, it’s possible to also seek within the “listen-again” versions of those streams. In short, it all now “just works”.

Although I’m now using AAC streams for iPlayer access, the work that I put into getting WMA streaming to work with the Jogglers hasn’t been wasted, as there are other Internet Radio stations out there that do only broadcast in WMA, and this transcoding solution allows me to access them too.

And finally, unlike the Jogglers build-in Internet Radio application, the Squeezeplay application buffers enough content (irrespective of codec) to completely avoid skipping and audio drop-outs. Perfect!

Joggler Squeezeboxes (part ii)

After a lot of trial and error, I now have the Jogglers able to cope with WMA streams, which is to say that they can now play the BBC iPlayer Internet Radio streams. There are a few limitations, but I finally feel like I’m getting somewhere with the problem.

The solution is (as expected) to transcode at the Squeezebox server, converting WMA streams destined for the Jogglers into PCM streams. However, working out exactly how to do that has involved quite a lot of trial and even more errors. Ultimately, on my Ubuntu based server, I only needed to create a single file – /etc/squeezeboxserver/custom-convert.conf.

The content is as follows:

#
wma pcm * 00:0E:8E:22:9B:52
   # FR
   [mplayer] -really-quiet -vc null -vo null -cache 128 -af volume=0,resample=44100:0:1,channels=2 -ao pcm:nowaveheader:file=/dev/fd/1 $FILE$
#
wma pcm * 00:0E:8E:25:09:ED
   # FR
   [mplayer] -really-quiet -vc null -vo null -cache 128 -af volume=0,resample=44100:0:1,channels=2 -ao pcm:nowaveheader:file=/dev/fd/1 $FILE$

That may be hard to read due to the formatting, but this is really 2 sets of 3 lines, where each set of 3 lines relates to one of my two Jogglers; those lines describe:

  1. the transcode that I am describing, and the device for which this must take place. So, WMA to PCM, for a device with a given MAC address.
  2. the capabilities of the external transcoding application described in line 3. Refer to the comments in the convert.conf file in the same directory for what the codes mean; in this case, that this transcoder can cope with both files and remote streams.
  3. the command line to do the actual transcoding. The syntax is a little odd, as mplayer has no obvious way to write PCM to stdout (which is what is required), but using /dev/fd/1 as the output file achieves this admirably. $FILE$ is substituted with either a filename or a URL depending on the source of the WMA that needs to be transcoded; either is acceptable to mplayer.

The only issues I’ve found so far are that:

  1. Squeezebox server doesn’t seem to correctly clean up the transcoding processes, and leaves them running in the background. It’s not clear to me when (or even if) they ever get terminated, and if so, by whom?
  2. It seems to me that when playing back a “listen again” stream, I ought to be able to seek backwards and forwards in it. Unfortunately, this doesn’t work. The stream simply restarts from the beginning, which is frustrating. Adding the additional substitution code into the custom-convert.conf file to enable start time offsets to mplayer doesn’t improve the situation, and in fact, seems to usually break the (currently working) transcoding of the WMA streams. I’ve exhausted my debugging of this, and posted for assistance on the Squeezebox server forums – I’m beginning to suspect that it may be a limitation.

For reference, here are the same lines as above, but with what I think are the correct substitution lines to enable seeking. They don’t work for me under Ubuntu 9.10 and Squeezebox Server 7.5.1:

wma pcm * 00:0E:8E:22:9B:52
# FRT:{START=-ss %s}
[mplayer] -really-quiet -vc null -vo null -cache 128 $START$ $DURATION$ -af volume=0,resample=44100:0:1,channels=2 -ao pcm:nowaveheader:file=/dev/fd/1 $FILE$
#
wma pcm * 00:0E:8E:25:09:ED
# FRT:{START=-ss %s}
[mplayer] -really-quiet -vc null -vo null -cache 128 $START$ $DURATION$ -af volume=0,resample=44100:0:1,channels=2 -ao pcm:nowaveheader:file=/dev/fd/1 $FILE$

Joggler Squeezeboxes

Having lived with with a Joggler in my study for about a week now, I’m starting to get a feel for its strengths and weaknesses. In theory, it’s a great little tool to have instantly available, with instant access to Internet radio, my audio collection, the traffic conditions, news headlines etc.

But in practice I’m making very little use of any of the built in applications; the Trafficmaster-based travel application is kind of interesting, but the SatNav in the car does a better job at the point in time when I most need it. The RSS-based news reader is OK, but it’s based on what the Sky news people think will be of interest, and often I don’t agree with them. The weather forecast application is pretty enough, but can’t be sufficiently localised, and has a bug that means the upcoming days are sometimes out of sequence!

The Internet radio application is undoubtedly the one I use the most, usually for the national BBC radio stations, but unfortunately it doesn’t buffer enough content, and often stutters and falters. But it is very convenient and easy to use.

On the other hand, the Squeezeplayer application, which turns the Joggler into a Squeezebox, is a joy to use. The touchscreen is beautifully integrated with it, and the ability to rapidly “flick” through my music collection, along with their album art, is simply joyous. There are down-sides however. Integration between the Squeezeplayer application and the main O2 “Tango” GUI is basically non-existent. The Squeezeplayer application simply runs over the top of the rest of the GUI, taking over completely. This means that they run independently with different time-outs, screen-savers etc, which can be a little confusing. However, I can easily forgive it that when I get another Squeezebox for only £50.

However, the Joggler isn’t a perfect Squeezebox replacement. The Squeezeplay application doesn’t have the same support for native audio formats as the hardware players – so while it has excellent support for MP3, and supports PCM/WAV/AIFF & FLAC even at esoteric 24bit 96KHz rates, it cannot play WMA files/streams in any form. Which unfortunately means it doesn’t support the BBC iPlayer plug-in. This is frustrating, as I suspect that the Squeezeplayer will do a much better job of buffering Internet radio streams than the native Joggler application.

So the question is, how to enable WMA support?

My initial thought was to enable WMA support in the basic Joggler OS (which is just Linux), with the expectation that it would be possible for the Squeezeplayer application to trivially exploit that support. The problem with this approach is that Squeezeplayer is really an embedded application; it’s not designed to run on an operating system with varying capabilities, and expects instead a bare minimum, to which it must supply all the domain specifics – ie, the audio decoding. So even if I did supply WMA support in the OS, the Squeezeplayer application wouldn’t exploit it without me making significant changes to Squeezeplayer. It’s basically a non-starter (for me anyway).

The next option is based on the understanding that Squeezeboxes (and hence the Squeezeplayer application) do not directly talk to Internet radio stations. Instead, they talk to a Squeezebox Server, which acts as a proxy for the Squeezeboxes, and talks to the Internet radio stations on their behalf. Fortunately this allows us to apply transcoding to the Internet radio stream, decoding it from the original format, and re-encoding it into another format that the Squeezeplayer can process.

This has potential, except the documentation is poor, and all my attempts to date have resulted in the Squeezeplayer “hanging” at the point where it is starting to stream the Internet radio stream. Debugging information seems to be telling me that the right transcoding options have been identified by the server, and that the correct external programs have been located. What’s not clear is whether or not they are being correctly invoked. More work to be done!

Additional “Squeezeboxes”

As I mentioned in my last post, there was a period of time where I believed that my Squeezebox 3 audio player had terminally died. This seemed at the time to be a complete disaster, because Logitech no longer service, nor sell them. Fortunately, I was rescued by a colleagues superior electronics skills, but in the meantime I’d started investigating what options I had for replacing my Squeezebox. The obvious choice was to purchase either a new Logitech Touch, or Logitech Duet system, both of which are essentially plug and play replacements for my (older) Squeezebox 3. However, at more than £250 each, this would have been an expensive option, especially for a device that I was not terribly taken with.

A more interesting option was the discovery that it was possible to take the control system software from the Duet, and port it to a generic Linux computer. This would allow that computer to act like the Duet system, at least functionally.

The really interesting discovery was that people were running this on “hacked” O2 Jogglers creating their own Squeezebox Touch, but with a bigger touchscreen display. Given that Jogglers can be purchased second-hand on EBay for around £50, this proposition starts to look very attractive indeed. The only drawback is the lack of high quality audio outputs.

However, this can be easily resolved through the use of a USB DAC, which can be connected between the Joggler and an amplifier, to provide very high quality audio out – potentially much better than that provided by my existing Squeezebox 3. Something like this HRT Music Streamer II would be perfect.

In the end, I no longer needed another very high quality Squeezebox, but the opportunity to add a couple more “adequate quality” Squeezeboxes, at very low cost, was too good to miss. I acquired a pair of second-hand Jogglers, added the additional software to them and plugged some powered speakers into the headphone sockets.

The result is “good enough” music/video players for my study and the kids playroom, that can also do interesting things with various internet-based applications (calendars, news, weather, mapping etc). Result!