Election results—read all about them

This morning, 10th February 2017, the UK Independence Party is boasting, waving its flags in fact, about winning a district council by-election in the Great Oakley and Little Oakley ward of Tendring, Essex. Tendring District, we note, contains two of England’s ten most deprived areas*.

The winning party is singing about its majority being 7.7% with a 36.8% share of the vote. But the voter numbers, as opposed to proportions, tell a different story. Within the turnout of only 35% of the electorate, the party won by 45 votes out of the 587 cast. That margin is only half the number of players in my local darts league in this small Sussex town.

Furthermore, apart from this result, UKIP’s vote has dropped in every single council election since October 2016 in a ward where it had previously stood (except Swanley, Kent)†.

Just up the road from the three villages in this ward, in the town of Harwich, the candidate with the 45-vote majority had opened a shop promoting his party. The word ‘Independance’ (sic) was mispelt on its signs‡.

Statistics, when kept, can be comforting. But the work outside this echo-chamber must carry on.

* UK Government, Department for Communities and Local Government, Index of Multiple Deprivation 2015

Statistics compiled by Association of Liberal Democrat Campaigners and Councillors

Essex County Standard 4th February 2017

Is home audio moving forward?

The other day, a friend asked a Facebook group how developments in domestic audio might shape up in the future.

Nothing, not even Dolby Atmos, beats the revelation I experienced, in the early 1980s, of

  1. being able to leave behind the distortion and interruptions of vinyl by using CD or tape; and
  2. being able to build better loudspeakers.

The story goes back fifty years, at the time of writing. In 1967, my father bolted a rescued Garrard AT6Garrard AT6, the autochanger based on the SP25, into a polished brown radiogram cabinet and wired the crystal cartridge to the input of the built-in valve radio/amplifier. The cabinet had a richly toned single speaker underneath, and this system of glowing radio dial and filaments played his classical LPs, the 7-inch singles my mother inherited from her DJ brother, and my children’s records, together with some shellac 78s from second-hand shops and relatives, played by turning the crystal cartridge over in its headshell.

Amid the clunks and whirs of the mechanism, I was hooked on music of all kinds, Radiogram circa 1955and speech recordings too from companies like Saga and Delysé. On command, even a child could make dramatic magic happen in that warm-sounding loudspeaker. The amp with its lethal HT anode kicks was IC10replaced in 1969 by a black box into which my father had installed a Sinclair IC10-based 10W amp, which lasted through the replacement of the cartridge with a ceramic item in 1971, then he built (with me holding the circuit-boards steady sometimes) the Practical Electronics Gemini stereo amp set in 1972. In the years of mass-market stereo LPs on “Music for Pleasure” among others, we played this amp into mis-matched speakers rescued from Army surplus shops. Gemini preamp“But it was a stereo hi-fi to US” (to misquote Eric Idle), and the leap forward into “sound sculpted in space” was never regretted.

A Goldring magnetic cartridge followed, and a tuner, and other improvements here and there; but, as a musician-in-training, even when young, it maddened me that the music didn’t sound like it did on the radio or in the schoolroom when we played. There were ticks and pops that you didn’t get from instruments nor did you hear radio3-1967them on the Radio 3 concerts. Sometimes the pitch wavered slowly. Nearly always the sound had a ‘fuzz’ with it toward the end of a side, particularly on French horns, muted brass and sopranos. None of this happened when I taped a cassette off the radio, and it was a crying shame that all recorded music for the masses had this gauze of dirt, this veil in front of it. I learned where every scratch was in the quiet passages of the symphonies and chamber music on the shelf, and was almost surprised when those noises didn’t occur where expected on radio performances. My parents didn’t mind the interruptions, but I knew this rubbish was not music, even though the frequency response ran smoothly from bottom to top and the amplifier’s distortion was almost below measurement. And it was sad that one poorly set-up pickup or arm could damage a precious recording for ever.

Later, in my early teens, the record-making process was unveiled to me, and it seemed strange that good tape copies of the masters were not sold to music-lovers. ella-cassette“Musicassettes” too often sounded muddy, though we rescued a reel-to-reel deck to play home-recorded tapes well; but no decent tapes were available unless recorded from Radio 3 concerts or the Big Band shows on Radio 2 which were superbly presented. As you can tell, I had no idea of the economics of producing tape versus vinyl LPs.

But soon after that I was engineering or producing my own student recordings of good concerts or bands in our departmental studio at Surrey University; and almost simultaneously with my leaving home, 1982 Sony CD playerthe CD came along. Teenagers (as I was then) can tell where 20kHz brickwall filters harm music, but at last, at long last, the music was almost completely pure. It did not waver or wobble. It was not interrupted by ticks and pops, nor by fuzz. Its quality was identical from beginning to end. There was no mourning that the beautiful passages of “En Saga” were harmed by being close to the end of the LP side. There was silence between the tracks or in the rests. Just like in the concert hall or recording session. And, later, it became clear that the recorded sound did not need to be sanitized (albeit, in the hands of a mastering engineer, very sympathetically and musically indeed) to survive the transition from tape to vinyl groove. After this, all else was candlelight. We didn’t have gas in the village where I grew up. (Note to the youngest readers: find Karajan’s statement on digital audio.)

Apart from the gradual increase in amplifier efficiency and very occasional leaps forward in speaker technology (my main speakers are twenty years old, though a better sub was added recently), to answer the original question, I have heard nothing since the advent of interruption-free recordings, whether digital or analogue, that improves my enjoyment of music or drama, except for one thing. The ability to compress the music to suit my listening environment is my primary nod to convenience. Where necessary, my in-car or ‘party’ music on memory sticks has broadcast-style processing added so I never touch the volume control anywhere on the road or while people are chatting over the guacamole (home made) and Cava.

What’s left? Convenience; curation; accessibility, discovery; that’s all, really — and a means of paying musicians properly, of course.

As I become older, one thing intrigues me. If I become thoroughly deaf, and need a cochlear implant, could I tune my computer, as a musical instrument, to the frequency channels and be able to hear (or compose) music arranged especially for those channels? Could that be a thing? Can there be music composed or arranged specifically to be heard at its best through the limited-pitch channels of a cochlear implant, so that permanently and profoundly deaf people might choose to try experiencing music in this way too?

I’d like to thank Mike Brown, very senior audio engineer and radio presenter, for asking the question that provoked this ramble. His website is http://www.originalsound.co.uk/, and you can read about his many regular radio shows here: https://www.facebook.com/mikeonthewireless/

Illustrations are not mine; but are similar items seen on eBay or other websites

Free audio display with FFmpeg and MPV

Just for fun, I wondered what useful stereo audio displays could be placed on a Windows desktop using a single open source suite. Using my binary distribution, here is a promising start.

Audio Meters with FFmpeg

Here, within the MPV player, FFmpeg libraries produce two kinds of spectrum, a phase indicator, an EBU R128 measurement tool, a display showing the musical pitch of incoming sounds, a display of coherence between channels with an average indication, and a volume meter. I’ve started calibration. The PPM is referenced to the BBC’s transmitted levels, and it therefore reads 5dB high. On the spectrum displays, the vertical intervals occur every 5kHz.

Use the MPV player, which can take full advantage of OpenGL acceleration in Windows and other OSes. Then it’s easier to change the stereo source on the end to anything you like. In the example below, I use the 320kbit/s AAC stream of BBC 6Music, which you can hear in the UK. Alter it to your own preferred stereo source.

Please ignore line breaks in what follows… (a straight copy-and-paste into Windows Powershell works perfectly).

mpv --lavfi-complex="[aid1]asplit=7[a][b][c][d][e][f][g];[a]avectorscope=size=480x480:zoom=2:draw=line:r=25,drawgrid=240:240:color=gray[z];[b]ebur128=video=1:meter=18[q][x];[q]scale=480:480[y];[z][y]hstack[w];[c]showfreqs=fscale=lin:win_size=w4096:cmode=separate:size=480x480:minamp=1e-009,drawgrid=x=0:y=479:w=100:h=60:color=gray[u];[d]showspectrum=size=480x480:overlap=1:slide=scroll:scale=5thrt:mode=combined[t];[t][u]hstack[v];[e]showvolume=r=25:w=960:h=50:t=0:f=0.9,drawtext=font=Arial:fontsize=24:text='1':x=47:y=40:fontcolor=white,drawtext=font=Arial:fontsize=24:text='2':x=77:y=40:fontcolor=white,drawtext=font=Arial:fontsize=24:text='3':x=128:y=40:fontcolor=white,drawtext=font=Arial:fontsize=24:text='4':x=206:y=40:fontcolor=cyan,drawtext=font=Arial:fontsize=24:text='5':x=330:y=40:fontcolor=white,drawtext=font=Arial:fontsize=24:text='6':x=528:y=40:fontcolor=red,drawtext=font=Arial:fontsize=24:text='7':x=842:y=40:fontcolor=pink[s];[f]showcqt=size=960x180:r=25:bar_g=7:timeclamp=0.5[r];[g]aphasemeter=size=960x40:mpc=red[h][p];[h]anullsink;[v][w][r][p][s]vstack=inputs=5[vo];[x]anull[ao]" http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/sbr_high/ak/bbc_6music.m3u8

Television spectrum bandwidth

At the height of analogue television, how much spectrum bandwidth was allocated to the magic rectangle?

Radio frequencies are precious natural resources. There are only so many to go around. Now, it is true that, in many cases, frequencies are reusable (e.g. a tv station in Glasgow can be on the same frequency as a transmitter in London, without causing mutual interference), but frequency bands are generally given over to one or two uses each.

So how much spectrum is taken up by one use: broadcast television to households? When I was younger, and we had only a few television channels, big programmes in the UK would routinely attract 17 million viewers, or thereabouts. One night in 1990, when I appeared on the popular consumer report programme “That’s Life” playing a telephone accompanied by the musically-talented Howard Leader on accordion, the figures that evening indicated that 11 million people tuned in to view. How much of that valuable radio-frequency spectrum did television occupy?

A simple answer is to add together the bandwidth taken up by the four bands used for television broadcasting in Europe, called Bands I, III, IV and V.

Their total bandwidth? 471MHz.

When I was younger, no radio frequency above 1GHz really mattered to the average consumer at home. So, until the advent of PCN mobile telephones in 1995, up at about 1.8GHz, the range of spectrum occupied by broadcast television was very nearly one half of all radio frequencies. Everything else, including all radio, ship-to-shore messages, radio amateurs, weather services, early cellphones, time signals, radio teleprinters, was in the other half.

With the advent of satellite broadcasting, the usable spectrum has expanded; but so has the use of television. All that precious bandwidth, used for entertainment, news and education? Still roughly half.

That’s either a disappointment, or a great responsibility.

HTTP Redirects in PHP

Here’s a really quick and simple example of an HTTP redirect using PHP.

The British Geological Survey publishes live data from its seismographs, located in many parts of the UK. The URL for the latest data changes daily, and is derived from the calendar. So it’s easy to reconstruct the URL. But I’d like to access the current day’s data for my local area from an unchanging, static URL.

Therefore, the static URL needs to create an HTTP redirect to the current day’s data from the location I want to use, my local seismograph at the former Royal Observatory at Herstmonceaux, Sussex. Here is the code to do that. The method ought to be self-explanatory. To be precise, this code causes the Apache webserver to instruct a client (your web browser) to follow a 302 Redirect.

You can give this page of PHP any name you like. My URL is http://johnwarburton.net/did-the-earth-move.php

$DIRECTORY = "http://www.earthquakes.bgs.ac.uk/helicorder/heli_dir_shz/";
$PREFIX    = "HMNX_SHZ_GB_00.";
$timestamp = date("Ymd");
$SUFFIX    = "00.gif";

$redirectUrl = $DIRECTORY.$PREFIX.$timestamp.$SUFFIX;

header("Location: ".$redirectUrl);
exit;