I saw an ad for a new Marantz receiver that intrigued me. It features network connectivity, so it can play web media as well as home library media. Neat! But it added another remote to the coffee table, cost $2,500, and wasn’t actually available for sale yet.
So I set about finding a cost-effective receiver to cover our requirements:
- can play selected media streams, such as MPR Classical
- can play from our digital audio library which contains everything we’ve assembled over 50 years
- can accept Bluetooth streams from phones and such
- has the ability to select audio from computer, DVD or TV
- can be controlled by a phone
There were a few offerings from Pyle that came fairly close, but they all added another remote, and it was hard to find enough audio inputs. And Pyle is not exactly an audiophile brand. But given that a $25 amplifier today provides fidelity and power specifications unattainable by the finest equipment I grew up with (and loved), I find inexpensive equipment meets my current needs.
After some thought, I was able to simplify my requirements. Scratch Bluetooth – if my phone can play it, the media computer we already have can play it too. Scratch DVD and TV audio inputs – we haven’t used the TV or watched a DVD in years, why trouble to improve their audio? With those requirements gone, all we were missing is phone control – a feature present only on receivers for people with a budget unlike mine.
What are we trying to control? Our AV system consists of:
- some very nice bookshelf speakers we bought many years ago
- a 20W, generic power amplifier from Amazon
- a Behringer USB audio interface
- a generic Dell computer we use as our storage server, backup server and media computer
- A 30″ TV that can source broadcast channels, or the media computer
- An antique DVD player
Capability includes:
- streaming web audio media and movies using a browser (Firefox, in our case), using our great speakers for audio
- streaming local media using Microsoft Media Player, also with good audio
- watching TV and DVDs with terrible audio and a couple incomprehensible remotes
It’s straightforward to control our system using the connected TV and a wireless keyboard and mouse. It can also be controlled using remote access tool such as Microsoft Remote Desktop or AeroAdmin.
But it turns out that that having a login or two between you and music is enough nuisance that we don’t bother to turn on music that often. Mona demanded “just a radio I can turn on”, and reasonably so. In the end, a simple bit of software filled the gap, and allows us to easily control our audio system with our phones.
I wrote a simple PC app (“TCP Commander”) that bridges a connection from a smartphone to the PC. On the phone, a simple TCP terminal app implements a 1960’s text interface: you type a single letter command, and it types back a line telling you what you did. “H” lists the available commands. It’s not pretty, marketable or intuitive to any but those that worked with computers in the 60’s. But it was fast and simple to deploy – and I used the time I saved to make a 12 room martin house instead of a “pretty” phone app.
On the PC, TCP Commander watches for and implements the following commands:
- H: shows a list of commands
- +: volume up
- -: volume down
- X: toggle audio mute
- M: play MPR music (by running a batch file that opens a link in Firefox)
- N: play MPR news (batch file, Firefox, link)
- V: play KING FM Evergreen channel (batch file, Firefox, link)
- Z: play smooth jazz (batch file, Firefox, link)
- F: stop all streams
- E: start a playlist with evening selections (Media Player, our collection)
- J: start a playlist with jazz selections (Media Player, our collection)
- Y: start a symphonic playlist (Media Player, our collection)
- D: start a dinner playlist (Media Player, our collection)
- K: stop all playlists
To implement the app, the only complexity was handling the TCP connection. Chances are that one can get an off-the-shelf library for this, but I opted to scavenge and refine some code from some products my company (North Latitude Technology) used to sell. The actual logic of the bridge program was only 350 lines of code.
One unexpected challenge was to find links that will automatically start playback. Most web streams are so intent on selling you something (versus playing the media you want) that they require live interaction with a pair of eyeballs to start playback. But it turns out that under the hood, there still has to be a link that will start playback, no matter how much nonsense the user interface wraps around it. These links can be found by opening the busy playback page in your browser, and then selecting “inspect source”. After trying a few of the links that are evident in their page source, you’ll find the one that will actually play the media you want, with no eyeball interaction. (Thanks to “Uber fenestray” on Stackoverflow.com for this insight.) For example, you won’t find this link for MPR News on their website: “C:\Program Files\Mozilla Firefox\firefox.exe” https://nis.stream.publicradio.org/nis.aac
Does it help to be a computer technologist to implement an audio system like ours? Probably. Could you implement it with an ordinary level of skills with Windows computers and audio equipment? Probably. Let me know if you want a copy of TCP Commander and the configuration files it uses.
Components:
- Serial WiFi Terminal 1.26 for Android by Kai Morich
- Firefox Browser (latest)
- Windows Media Player (latest)
- TCP Commander (North Latitude Technology, LLC)
- Dell Vostro 3470 PC
- Behringer UFO202 USB Audio Interface
- Kinter 3118 Amplifier
- Mission bookshelf speakers