IAN LANG ELECTRONICS
When I first started doing electronics, radio was the usual gateway for beginners. You took a heap of either valves or more commonly then transistors, some resistors and capacitors and lots of copper wire and de-soldered the circuit that you'd just made because it didn't work and remade it into one that did. Building radios was alternately very easy and very hard, depending on what you wanted to do. Except if you wanted to pick up Radio Moscow. Radio Moscow was very easy to pick up as it came through on all sorts. Even stuff that wasn't a radio.
Picking up foreign stations was known as DXing and there weren't many you could get. All were AM and most were on the long wave and subject to all sorts of atmospheric conditions. Radio has come a long way since then. Many broadcasters now have an accesible internet stream which comes through as an MP3 stream. Some of them (Radio 3) are better than FM quality. None of them are subject to noise caused by amplitude or phase interference. You still need to know how to make a receiver though.
And that's the rationale behind this article. I don't know whether this is a good thing or a bad thing. On the good side it means that radio is now available to everyone everywhere with an internet connection and in any language you like, with a great deal more choice and specialisation in channels. On the other, it's sad that all the old techniques you had to master to build succesful receivers are slowly being consigned to history as many of them stand you in good stead for making other things too. Then again, there's a whole range of new techniques to master to build a Windows receiver. Hmmm.
Well, I'll leave the question of whether it's a good thing or bad thing to the philosophers because the fact is that whether it's good or bad it is a thing that exists and as technical people and makers we need to do something about it. Ladles and Jellyspoons, we proudly(ish) present the internet radio player:
And as you can see it's got a clock on it as well. That clock is going to be important as it's got sleep timers and a radio alarm clock function too. (Ooooooooooooh!!!).
Up above you can see it's "tuned" to Classic FM which if you don't live in the UK is a station that broadcasts popular classical music. So, before we delve in to the design and coding, let's have a look at what it does. Here's the startup:
The red text is warning you that there's no list of stations to play. So let's chuck one in there:
Clicking on the Populate List menu item leads to this:
On my computer I have a folder on the desktop called "Dump Bin" and where I stick all the stuff I want to find easily later on. Setups, datasheets, drawings, other interesting bits I find from time to time all go into a sub-folder in the dump bin. In this case the file that populates the station list is in a sub-folder called IRP as you can see at the top of the dialogue box there, and the file I want is stationlist IRP. I can either double-click on it or highlight it and click open, and when I do either the radio player reads the list and populates a list box with the station names. There's another list box which is never visible; that contains the relevant URL for the radio station concerned.
For those who don't know, a URL is a uniform resource locator and it gives the address of the internet location from where the stream is coming. Here's what the file looks like in the raw:
BBC Radio 4
BBC Radio 3
BBC Radio 2
BBC Radio 1
BBC Radio 4 Extra
BBC 5 Live
BBC World Service
BBC Radio Sheffield
French Radio London
NDR Kultur (German)
M2 Classique (French)
RFI Monde (French)
B5 Aktuell (German)
There are in fact three pieces of data for each radio station. Let's break a couple down:
NDR Kultur (German)
First up is the station name which is NDR Kultur, a Hamburg station similar to Classic FM but in German, of course. The second line is the URL for the stream which always begins http:// and usually they have extensions at the end such as m3u or pls or asx which means they are an audio stream. The last line is either a zero or a one. This indicates whether or not the player should add it to the favourites box. NDR Kultur is added to the favourites box.
BBC Radio 1
Radio 1 most certainly is not on my favourites list.
If you want to build something like this or if you just want the URLS the station list is available as a text file that you can download here:
Since March 2015 the BBC has moved its streams to Shoutcast MP3 format. The new URL list is here: