I <3 Soundweb London

NOTE: This is most definitely not a tutorial, I’m mostly making it up as I go along.

So, yeah – recently my radio station has acquired a rather lovely BSS Audio London Soundweb BLU-100.  It’s a “sound management” device, which (on the main unit) has 12 inputs (6 stereo) and 8 outputs (4 stereo), as well as 12 logic inputs and 6 logic outputs.  You can also add break-in and break-out boxes to get even more inputs and outputs.  You can also hook two of them together with CAT5e and have 48 channels of audio going over it from one side to another.  Oh and did I mention it also has an Ethernet and RS232 interface?

But what does it do?  The question is rather what doesn’t it do.  What we’re going to be using it for is mainly routing audio around the radio station, and doing on-air switching (i.e. feeding the transmitter with audio from the right studio at the right time), as well as doing the processing for the online stream.

It is programmed using a (free) program called London Architect.  This program allows you to build up the configuration of the device by providing you with all the building blocks you need (source selectors, mixers, EQ, compressors, limiters to name but a few) and lets you join them up in any way you can imagine.  It’s quite reminiscent of LabView, except for audio – to give you an idea.  You can then send it the configuration over the network, and tweak the values using the same program.  It’s pretty intuitive, and an extremely powerful tool.

Continue reading “I <3 Soundweb London”

Unnecessary Maths: My Milkshakes Bring Over a Million Boys to the Yard


Canterbury is home to the Shake Shed, an awesome little shop that sells delicious milkshakes.  They will make you a shake with anything from chocolate chip cookies to sherbert lemon, to strawberry jam to Star mix – and you can have up to 3 flavours.  Not only that, they’ll do it with a smile!

One day I was walking past and saw a sign outside, boastfully promising that there’s over a million different milkshakes to choose from.  I wondered – is it actually over a million?

Continue reading “Unnecessary Maths: My Milkshakes Bring Over a Million Boys to the Yard”

Unnecessary Maths: McDonalds Marketing

So I was in McDonalds today (lets not go into why) and found a piece of marketing that included some numbers. It said

McDonald’s Litter patrols cover over 120,000 miles every year in the UK and Ireland. We are about the environment!

(or something to that effect)

I decided to break this down a bit. After doing a bit of research I found that there were 1,200 restaurants in the UK and Ireland (60% of which are franchisees). So, that makes each store cover 100 miles per year. Divide that by 365 and we get 0.2739 miles per day covered in each day. That’s about 440 meters every day.

Consider also that this is covered by presumably more than one person, and performed more than once a day.  Lets say for arguments sake that on average, there are 2 patrols every day.  So we cut out 440m in half to 220m.

The problem with this is it is a linear distance. This tells us little about how much area is actually covered by the litter patrols.

The actual distance travelled is dependant on the location of the restaurant.  If the restaurant is on a long street, then the distance travelled in each run would be approximately 4x the radius.  If it were located somewhere with more complex roads and alleys, this would be substantially more.  However, we can at least agree on that the distance travelled in one patrol is at least 4 times the furthest away that they get from the store.

So, we divide our 220m by 4.  That means that, roughly, the litter patrols go about 50m either side of the front door, twice a day

Now you break it down, it down I wonder why that sounds impressive.

 

I suppose if you inflate any number enough, it can seem impressive.  For example, my heart has beaten over 58026240000 times since I was born.  Wow!  And it never stopped once!  (well, not for very long anyway).  You’ve probably farted about 456.25 liters of gas in the last year.  Lets say that’s mostly air… that’s over 500g of farts!  And 16g of CO2.  I wonder how much of the UK’s CO2 emissions due to farts is generated by McDonalds employees going on litter patrols…

 

CSR FM Tech Blog

So, I decided that CSR Technical Services needed a blog. So now it does! Here’s a copy of my first post there, about the recent issues we’ve had with the Station Switcher

Here at CSR, we have a number of different places which we might want to broadcast from.  For example, we have two studios (Studio 1 at the University of Kent, Studio 2 at Christ Church University) a sustainer service and we often perform Outside Broadcasts which require taking a signal from another source again.

Therefore, we have an airchain which includes a station switcher (specifically two Sonifex Redbox OA3 daisychained together to give us 5 possible audio sources).  In order to allow presenters to switch the station output between the sustainer service and the studio output, we provide two buttons – offer and accept.  The station switcher allows the operator of a studio to “offer” to take control from other studios, and “accept” control for other studios.  The sustainer, since there is no human present, cannot offer to take control – therefore a special case is given whereby the studios may force it to take control by holding the offer button then pressing accept.

The buttons (and indicator lights) are connected to the station switcher via a D-sub connector, which goes into a control interface. This is fine – however we wanted to be able to control the switcher from within Engineering where the switcher is located.  Thus, many years ago, one of the Tech crew built a 2U rackmount box which allowed us to “press” the offer and accept buttons remotely.  It essentially consisted of a box with a bunch of push to make buttons mounted on the front panel.

However, there was one slight issue – Studio 2 is at a remote site, and obviously we can’t run a piece of wire from the buttons half way across Canterbury to the switcher!  Therefore, we made use of the remote GPIO pins on the MDO STL-IP units which we use to transport audio to and from Studio 2.  This allows us to send digital signals (i.e. high or low) over IP – we connected up a switch box at Studio 2, plumbed this into the GPIO ports which were replicated up at Kent.  However, the signals which came from the STL-IP unit were not the same as the ones required by the switcher.  Therefore, in our custom made box we had to build some level shifting circuitry which converted the levels to ones which the switcher could accept.

This circuit was built on veroboard, and looked a lot like this:

The chip at the bottom is a octal darlington array, the one at the top a hex inverter. This successfully shifts the level, and everything worked perfectly for the time which we had Studio 2 online.

This all worked just fine up until recently – however when we took out the STL-IP boxes for maintainance we discovered a slight flaw.  Since the STL-IP box was disconnected, the inputs on the CMOS inverter were floating.  This caused the control signals to the switcher to fluctuate wildly – this in turn caused the switcher to constantly give Studio 2 control of the switcher!  This was not good (thankfully we have backups in place to prevent this being a showstopping problem).

The solution: attack the insides of the switch box with a hacksaw, remove the circuit, and disconnect it permenantly.  Now, it shall never bother us again.

Until we need to work out how to remotely put Studio 2 on air.

How many ways can I say …

My friend Kitty asked me a simple question the other evening:

What is the total number of unique messages you can fit into 140 characters (i.e. a tweet)

This seems like potentially quite a simple question. So, lets say you have a set of valid characters called C, and a maximum message length of l (in this case, equals 140). For all messages consisting of one character, you have size of C possibilities. For two characters, you have C^2 possibilities – all the way up to C^l. In math-speak:

\displaystyle\sum_{n=1}^l C^n

Which, given that we know that the general formula for a geometric progression to be :
\displaystyle\sum_{k=0}^{n} ar^k = \frac{a(1-r^{n+1})}{1-r}
Geometric progression (Wikipedia)

We can substitute a = 1, r = C and k = i giving us
\displaystyle\sum_{n=0}^{l} C^n = \frac{1-C^{l+1}}{1-C}

For the sake of argument, lets say tweets can only be 8-bit ASCII (I know, terrible assumption to make, but lets just run with this), so the size of C = 255. We shall also let l = 140, since that is the maximum length of a tweet. The answer is …. a very big number. According to Wolfram Alpha, it’s

That’s about 8 followed by over 300 zeros, and that’s being conservative (not including unicode, for example). However, what we have just calculated is in fact all possible messages. Including “xSADFt5hagarnw”, or ” s sssss akasf”. I can’t think of many people who would tweet that – or in fact be able to logically distinguish that from any other sequence of random letters. What we actually want to know is the proportion of legible tweets

This in turn requires us to define what we mean by legible. We could, naively, create a grammar for messages that they might follow. You might say that they contain words separated by spaces. Sometimes the words can start with a # or a @, they can end with punctuation (like . , ? ! etc). But then, we are eliminating legible (but low quality) messages like “!!!LOL!!!” or “i <3 my v1@gra”. Our grammar starts becoming more complex to accommodate these exceptions.

One possible approach would be to estimate a channel grammar by taking all of the current traffic on the channel and create an unweighted graph generated using minimal a priori information (i.e. that words are separated by words, and contain non-whitespace characters). The graph would then contain a path for every single “word” on the channel – with each node representing a character and it’s position in the word. Once this specific graph is created, one could group common nodes together and generalise the graph, reducing the number of redundant nodes.

Once the graph has been generalised sufficiently, one could then use graph theory to calculate all valid routes through the graph (or, as it would be, chain) – imposing the limits on the number of possible characters.

Chances are, it’ll still be a pretty darn huge number. However, we know that will certainly be a subset of the number we calculated earlier. By continuing to feed in data to the graph, you would then be able to adapt to new words being adopted in various languages. The total number of unique tweets is dependent on the vocabulary of the users.

So, I would say that the answer to the original question is in fact: it depends. And, given the general lack of any real central repository of vocabulary that all users must adhere to (which is a clarphing relief), the only way to determine it is by looking at it!

Unfortunately, not a very mathematically beautiful answer – but then anything to do with language rarely is ….