<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Naxxfish</title>
	<atom:link href="http://naxxfish.eu/feed/" rel="self" type="application/rss+xml" />
	<link>http://naxxfish.eu</link>
	<description>Broadcast Engineer</description>
	<lastBuildDate>Sun, 22 Apr 2012 18:39:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>OB links over 802.11n</title>
		<link>http://naxxfish.eu/2012/ob-links-over-802-11n/</link>
		<comments>http://naxxfish.eu/2012/ob-links-over-802-11n/#comments</comments>
		<pubDate>Sun, 22 Apr 2012 18:38:20 +0000</pubDate>
		<dc:creator>naxxfish</dc:creator>
				<category><![CDATA[Broadcasting]]></category>

		<guid isPermaLink="false">http://naxxfish.eu/?p=622</guid>
		<description><![CDATA[So, after starting my job with &#8220;a well known british broadcaster&#8221; I&#8217;m still actively involved in my favourite community radio station in Canterbury, as part of the Technical Committee. As of late, apart from helping with the project to move the student newspaper InQuire into one of CSRs rooms, I&#8217;ve been looking into improving their [...]]]></description>
			<content:encoded><![CDATA[<p>So, after starting my job with &#8220;a well known british broadcaster&#8221; I&#8217;m still actively involved in my favourite community radio station in Canterbury, as part of the Technical Committee.</p>
<p>As of late, apart from helping with the project to move the student newspaper InQuire into one of CSRs rooms, I&#8217;ve been looking into improving their OB capabilities and reach.  For some time now we&#8217;ve been looking at more secure ways to get audio back from an OB for transmission.</p>
<p>Our traditional method of getting audio back is to run <a href="http://spacial.com/sam-cast">SimpleCast</a> on a laptop with an Internet connection, to stream the audio back to our HQ where it&#8217;s played out onto air.  Whilst this does work, it&#8217;s less than ideal &#8211; the audio link only goes one way, it&#8217;s not particularly great quality (depending on the codec used, AAC is fairly good, MP3 less so), and the latency is huge and very variable.</p>
<p>We can scale back our bandwidth usage by using lower quality codecs,  but it&#8217;s not a great compromise to make.  Also, we can&#8217;t do talkback.  Not ideal.  All this over a possible flaky DSL line or Wifi connection and you&#8217;ve got issues.</p>
<p>Some of these issues might be resolved by using James Harrison&#8217;s rather nice little bit of software, <a href="http://www.talkunafraid.co.uk/2012/02/introducing-openob/">OpenOB</a>, however it won&#8217;t solve an unreliable connection.  This also doesn&#8217;t let us send non-live audio for production back to base easily.</p>
<p>Most major broadcasters (with rather more money) will go for an ISDN codec to send audio due to the low latency and reliability of an ISDN connection.  The lines will get installed by BT before the event, and the OB truck will just roll up and hook into them as required.  This would set you back around £30 per month for the line at your HQ, plus a good £100 or so to get the line connected at the OB site temporarily.  Another option is a leased line between the OB site and their HQ, commonly used for more full on OBs (like festivals or day long events).  However, this costs upwards of £300 per month, plus installation costs (which will be significant).  Finally, you might also have a satellite uplink and sat truck &#8211; costing you something like £15,000 year for the uplink plus the cost of the truck.  Major events often get several of these, to serve as backup links in case one or more fails.</p>
<p>Clearly, well out of the budget for most any community radio station that doesn&#8217;t have vast amounts of financial backing.</p>
<p>Community radio is a bit of s special case &#8211; in that it serves a small area (smaller than the average &#8220;local&#8221; radio station, perhaps only a town or small city) and as such, you can exploit this fact.  Also, the price of 802.11 based wireless has come down significantly in the last few years &#8211; and there are some pretty good devices out there for very cheap.  <a href="http://www.ubnt.com/">Ubiquiti</a> make some extremely good wireless linking devices (for example the NanoBridge or AirGrid series) which have enough power and directionality to allow you to link two devices over a range of several kilometers, providing you have line of sight.</p>
<p>So this is what I&#8217;ve been researching.  Clearly, the directional antennas are only good if they&#8217;re pointing at the right place &#8211; this can be solved by putting an automated rotator onto the pole it&#8217;s mounted on, allowing it to be steered as required.  The one I&#8217;ve found so far is a HyGain AR-303X.</p>
<p>As for the actual devices themselves, I&#8217;ve been considering the <a href="http://www.msdist.co.uk/product_Ubiquiti_AirGrid_M5_27dBi.php">Ubiquiti AirMax M5 27dBi</a> which is the highest gain and power we can get without breaking any laws.  It&#8217;s very directional, but for our purposes that&#8217;s perfectly fine.</p>
<p>I&#8217;ve been using Radio Mobile to generate some plots of what sort of coverage we might be able to achieve with this setup.</p>
<p><a href="http://naxxfish.eu/wp-content/uploads/1CanterburyAreaCoverage.jpeg"><img class="aligncenter size-full wp-image-623" title="1CanterburyAreaCoverage" src="http://naxxfish.eu/wp-content/uploads/1CanterburyAreaCoverage.jpeg" alt="Coverage area for an AP on Eliot College" width="1024" height="1024" /></a></p>
<p>This is the calculations assuming the antenna can be rotated to any angle, the recieving side is at least 2m from the ground, and including misalignment errors of up to 5 degrees, as well as taking into account clutter on the ground (i.e. buildings, trees, etc), and in the worst possible weather.</p>
<p>Anywhere in green, yellow or red we should in theory be able to get full 802.11n speeds MS7 (108MBps).  The blue areas should be able to support anywhere between 2 and 54MBps (though we may want to set the speeds lower to ensure a good connection).  This speed should be more than good enough for several low latency audio links in both directions, as well as sending large files.</p>
<p>And all this for about £250 quid (not including the remote side pole fixings for the radio).  Not bad &#8211; lets hope we get to do it!</p>
]]></content:encoded>
			<wfw:commentRss>http://naxxfish.eu/2012/ob-links-over-802-11n/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OB to end all (my) OBs</title>
		<link>http://naxxfish.eu/2012/ob-to-end-all-my-obs/</link>
		<comments>http://naxxfish.eu/2012/ob-to-end-all-my-obs/#comments</comments>
		<pubDate>Sat, 03 Mar 2012 02:31:20 +0000</pubDate>
		<dc:creator>naxxfish</dc:creator>
				<category><![CDATA[Audio]]></category>
		<category><![CDATA[Broadcasting]]></category>

		<guid isPermaLink="false">http://naxxfish.eu/?p=619</guid>
		<description><![CDATA[Today marked the end of my time at the University of Kent, Information Services.  After working in Campus Support for 8 months, and prior to that on the Support Desk for 3 years, I left at 1630 today. The moment I left, I was thrown straight into preparations for CSR&#8217;s Outside Broadcast of the two [...]]]></description>
			<content:encoded><![CDATA[<p>Today marked the end of my time at the University of Kent, Information Services.  After working in Campus Support for 8 months, and prior to that on the Support Desk for 3 years, I left at 1630 today.</p>
<p>The moment I left, I was thrown straight into preparations for <a href="http://www.csrfm.com/">CSR&#8217;s</a> Outside Broadcast of the two student union elections.  This was to be my last OB that I have worked on as Technical Manager for CSR, and it wasn&#8217;t an easy one.  As it turned out, both of the student unions that support CSR were having their elections at the exact same time (whether that&#8217;s through coincidence or planning, I don&#8217;t know), and we were expected to cover them both.</p>
<p>Our usual approach for covering the Kent Union elections is to set up an OB studio in the green room in The Venue (the night club on campus at which the election result night is held), with a straightforward one way link back to CSR to be broadcast over FM and online.  Our arrangement for the Christ Church Students Union elections is much the same, except instead we use our studio on the other campus and a cable to the SU building to broadcast the results live.</p>
<p>Both of these options require broadcasting from just one studio at a time &#8211; which is easy with our OB encoder laptop and a couple of extra cables here and there.  But this time, we needed to broadcast from two places simultaneously.  The normal simple approach just wouldn&#8217;t do.  We decided that the main operation was to be run from Studio Red, at UKC, as this gave us the most flexibility in terms of routing audio.  The link between the main CSR facility at the University of Kent and Studio Blue at Christ Church is achieved with a pair of MDO STL-IP units, which connect over JAnet to transport audio between the sites, in either direction.  With a bit of creative patching, we were able to send a cue (or talkback) feed down to Studio Blue from an aux in Studio Red, so that they could do instant hand overs (&#8220;We&#8217;re now going to go to Studio Blue for the latest results&#8221;,&#8221;Hello, here are the results coming live from the Christ Church Student Union Elections&#8230;&#8221;).  We put that studio programme output onto a fader in Studio Red, so they could fade it up whenever they wanted to go to them.</p>
<p>To broadcast the results from The Venue, we build up our fairly standard OB studio in the green room, consisting of an A&amp;H XB-14 mixer, some SM58&#8242;s, couple of Yamaha monitors, some headphones and a wireless mic.   The Tech guys informally dubbed this &#8220;Studio Green&#8221;.  The magic touch to this was a hired in <a href="http://www.vtx.co.uk/product.aspx?id=174">BRIC-link IP codec</a> &#8211; which allowed us to get stereo audio in both directions from Studio Green, allowing us again to have a different cue feed from an aux in Studio Red (preventing feedback), to allow for instant hand overs.  Back at CSR HQ, we had a BRIC-link patched into another fader on the desk, so they could turn it up any time.</p>
<p>The whole configuration looked something like this</p>
<p><a href="http://naxxfish.eu/wp-content/uploads/529309087.png"><img class="aligncenter size-full wp-image-620" title="529309087" src="http://naxxfish.eu/wp-content/uploads/529309087.png" alt="" width="900" height="622" /></a></p>
<p>All playout and other production was done from Studio Red, who also coordinated and contributed content.  This worked seamlessly, and the coverage was excellent (and got some pretty amazing feedback from our listeners &#8211; and even broke our record for listeners online, which was previously set earlier in the day!).  The first link really showed off the extent by doing a link that involved presenters from each of the studios, without breaking a sweat.  The team did an excellent job making compelling content, and catching the results live and providing a useful context for the events.  We had a laptop showing the tweets coming in, showing all sorts of praise for the output on the night.</p>
<p>Of course, there is always room for improvement.  This time around we did require some fairly hefty custom cabling to pull it off &#8211; hopefully something that will be eliminated by the implementation of the Soundweb audio routing which we are working on currently.  Even having a half-normalled patch panel, which we don&#8217;t currently have (no, really, we have none right now) would make life a lot easier.  The feeds from the stages were reasonable, but they could have been better quality.</p>
<p>I would say that this is the most overall complex OB that I have ever done for CSR.  Other OBs have been quite involved (setting up studios on farms) but none have required quite this level of coordination, which for a little community station with not a lot of infrastructure isn&#8217;t easy, both in terms of technical capabilities as well as programming and production.</p>
<p>Certainly a worthy way to make a grand exit.</p>
]]></content:encoded>
			<wfw:commentRss>http://naxxfish.eu/2012/ob-to-end-all-my-obs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Timing is something</title>
		<link>http://naxxfish.eu/2012/timing-is-something/</link>
		<comments>http://naxxfish.eu/2012/timing-is-something/#comments</comments>
		<pubDate>Wed, 29 Feb 2012 22:43:04 +0000</pubDate>
		<dc:creator>naxxfish</dc:creator>
				<category><![CDATA[Broadcasting]]></category>
		<category><![CDATA[Computing]]></category>

		<guid isPermaLink="false">http://naxxfish.eu/?p=617</guid>
		<description><![CDATA[When you&#8217;re broadcasting, keeping to the clock is incredibly important.  Coordinating programming between multiple studios, live feeds from external sources (syndicated live content, like news), and making sure your audience know what programming to expect are all important reasons for keeping the time straight. NTP is a protocol designed to synchronise time over a network, [...]]]></description>
			<content:encoded><![CDATA[<p>When you&#8217;re broadcasting, keeping to the clock is incredibly important.  Coordinating programming between multiple studios, live feeds from external sources (syndicated live content, like news), and making sure your audience know what programming to expect are all important reasons for keeping the time straight.</p>
<p><abbr>NTP</abbr> is a protocol designed to synchronise time over a network, and it does it extremely well, and compensates for network jitter and congestion.  If you&#8217;re running a Unix based platform, or an embedded system that supports an implementation of NTP, it&#8217;s dead simple to set up.  You specify a NTP server (either one on your own network, or one from the public <a href="http://pool.ntp.org/">NTP poo</a>l), how often to poll it and other options in a config file or via some kind of administrative interface, and you&#8217;re done.  The NTP service will keep the time synchronised periodically, and depending on your local timing source (say, a crystal oscillator circuit) you can expect timing within a few milliseconds of the NTP server.</p>
<p>Of course, that&#8217;s no good if the NTP server is inaccurate.  Authoritative time sources are interesting things &#8211; ultimately the most accurate time source currently known is the atomic clock, which counts the number of oscillations of between two energy states in a Caesium-133 atom (the SI definition says that 1 second is 9,192,631,770 oscillations, incidentally). There are various methods for doing this, and you don&#8217;t have to use Caesium-133, Rubidium and Thalium work well too.</p>
<p>An atomic clock is a fairly big, complicated bit of kit that not everyone is likely to want in their rack.  So instead, you can synchronise an NTP server will a NTP server with an atomic clock attached to it.  This NTP server that is synchronised with the server with the atomic clock is said to be Stratum 1 (the atomic clock being Stratum 0).  Servers that then synchronise to this Stratum 1 server become Stratum 2 &#8211; and so on.  Clearly, the lower the stratum, the more chance for error down the line, so they are less reliable (but still pretty darn reliable).</p>
<p>A few ISPs provide NTP servers &#8211; <a href="http://www.ja.net/services/ntp/">JAnet provide Stratum 1 NTP servers</a>, however these are only accessible to peers on their network, and each institution is expected to provide it&#8217;s own Stratum 2 servers which synchronise to those Stratum 1 servers.</p>
<p>That said, you too can have your very own Stratum-1 NTP server, should you wish.  All you need is a GPS receiver with a PPS output (the GPS satellites are essentially atomic clocks in the sky (<a href="http://en.wikipedia.org/wiki/Global_Positioning_System#Basic_concept_of_GPS">no, really</a>)), and a PC to plug it into.</p>
<p>Or you could buy something like a <a href="http://www.timetools.co.uk/products/s5500-dual-ntp-server.htm">TimeTools SR Series NTP Server</a> which also includes a DCF-77 decoder (a radio based synchronisation signal) as well as GPS and external clock references, or a <a href=" http://www.wharton.co.uk/master_clocks/4860.htm">Wharton 4860net</a> server (which also has the added benefit of being compatible with the rather swanky <a href="http://www.wharton.co.uk/digital_clocks/490_050.htm">Wharton wall clocks</a> )</p>
<p>However, this is only half the story &#8211; once you&#8217;ve got your authoritative time  source, you need to get your clients (workstations, playout systems, wall clocks, and so on) to use this source.  Which, especially with a Windows network, can be a bit tricky.</p>
]]></content:encoded>
			<wfw:commentRss>http://naxxfish.eu/2012/timing-is-something/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Union Elections: Practice for politicians of the future?</title>
		<link>http://naxxfish.eu/2012/union-elections-practice-for-politicians-of-the-future/</link>
		<comments>http://naxxfish.eu/2012/union-elections-practice-for-politicians-of-the-future/#comments</comments>
		<pubDate>Tue, 28 Feb 2012 13:12:04 +0000</pubDate>
		<dc:creator>naxxfish</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://naxxfish.eu/?p=613</guid>
		<description><![CDATA[This Friday marks the elections results night for Kent Union Elections and Christ Church Union Elections.  I have been around Canterbury and these two institutions for almost 5 years now, and in that time have done some significant volunteering for Kent Union and, effectively, for Christ Church Union through the CSR FM project.  We have [...]]]></description>
			<content:encoded><![CDATA[<p>This Friday marks the elections results night for<a href="http://www.kentunion.co.uk/elections/"> Kent Union Elections</a> and <a href="http://ccsu.co.uk/2012/02/how-to-vote-in-the-su-elections/">Christ Church Union Elections</a>.  I have been around Canterbury and these two institutions for almost 5 years now, and in that time have done some significant volunteering for Kent Union and, effectively, for Christ Church Union through the<a href="http://www.csrfm.com/"> CSR FM </a>project.  We have covered many of their events, sometimes live on air, sometimes not.  I have generally tried to stay away from the whole democracy element, and rather focused on doing what I do well &#8211; that is Broadcast Engineering.  I know how things work &#8216;on the floor&#8217; (so to speak).</p>
<p>Every year, we get a slew of outrageous claims and promises from the candidates at the Union elections (both of them).  Not all of the claims are outrageous, but some of them are clearly so.  After looking through the manifestos, there are a couple I&#8217;d like to highlight.</p>
<p>CCSU VP Activities, Anca, who is re-running for the position says in <a href="http://tomheatherdesigns.com/voteanca/manifesto.htm">her manifesto</a>:</p>
<blockquote><p><strong>What I&#8217;ve done so far</strong>: Actively involved in opening the Christ Church Radio Studio on campus</p></blockquote>
<p>The CSR team (which comprise of Kent and Christ Church students, as well as members of staff and community volunteers) have worked in varying degrees for several years on this project &#8211; it has not been at all simple refitting and getting the studio on air.  The only time that I have seen Anca &#8216;actively involved&#8217; in this particular project was when she was present for the Grand Reopening Ceremony which we had in January.  This project has been in the planning for years (realistically ever since it fell out of use in 2009 due to issues with our playout software), and no amount of external lobbying has helped this.  We were encouraged by Christ Church University to go ahead with the project, but little if any input was given from the students union.  Having spent a large proportion of my time on this project, it irks me to have someone else take credit for it.  Strangely, Anca in her election manifesto last year campaigned for a &#8220;CSR Studio at Christ Church&#8221; &#8211; which actually already existed (she just didn&#8217;t know about it).</p>
<p>This was also the case with the previous VP Activities for CCSU, by the way, so this claim is by no means new.  She did improve over the previous VP Activities and actually was involved in CSR, and appeared on a talk show we carried called &#8216;Sabb Time&#8217; as well as helping put out a promo about student feedback at Christ Church.</p>
<p>She goes on to say:</p>
<blockquote><p><strong>What I promise!</strong> Make the new CSR Studio on campus Christ Church led</p></blockquote>
<p>I&#8217;m not quite sure how to interpret this.  If she&#8217;s suggesting that all of CSR becomes &#8220;Christ Church Led&#8221;, that&#8217;s actually impossible, unless they buy out CYSM Ltd.  CSR is a project of CYSM Ltd., which is a limited company wholly owned by Kent Union, Christ Church Union, University of Kent and Christ Church University.  It&#8217;s administrative requirements (finance, HR, secretarial duties, etc) are performed by Kent Union, who have the infrastructure to do so (being one of the more extensive student unions in the UK).  Christ Church Student Union simply do not have (or really require) this level of infrastructure.</p>
<p>Quite what she is getting at regarding making the &#8220;studio&#8221; Christ Church led, I don&#8217;t quite understand.  The studio is for the use of CSR members to broadcast to the entirety of Canterbury (and the rest of the world online) using their community radio license &#8211; CSR members can be students at either University, or a member of the community (so basically, anyone).  The CSR Committee consists of  CSR members, who are elected in the internal elections once a year.  The committee positions are filled by CSR members &#8211; the only restriction is the Executive level positions can only be held by students (for some reason or another).  Our current Head of Studio Blue (the studio at Christ Church) is a Christ Church Student.  In fact, our current Station Manager is a Christ Church student!  So, I guess you can say that, going by the Station Manager, CSR is in fact already Christ Church led!</p>
<p>Aaron Watkins, running for VP Activities Kent Union, says on his <a href="http://issuu.com/kentunion/docs/2012manifestobook/5">manifesto </a>(page 10) wants to have</p>
<blockquote><p>CSR Part Time Officer</p></blockquote>
<p>Which is rather vague (at least he&#8217;s not promising it).  Technically, with CSR being only one of many projects which come under Kent Union&#8217;s Student Media remit &#8211; having a part time officer just for that seems a bit of a waste of money.  Who would fund the post (even if it was unpaid, there would be some overhead)?  We have a Student Media Coordinator, a full time member of staff (and she really is full time, there&#8217;s a lot for her to coordinate &#8211; covering InQuire as well as CSR) who is part funded by CSR (well, CYSM anyway).  We also part fund a Technical Coordinator, who covers Kent Union and Kent Union Technical Services.</p>
<p>Also, I don&#8217;t know how that really works anyway &#8211; CSR isn&#8217;t a Kent Union project, it&#8217;s a CYSM project &#8211; electing someone to represent that project seems a bit odd, and doesn&#8217;t really represent Kent Union students.</p>
<p>&nbsp;</p>
<p>There are plenty of other exaggerated claims there, but I can&#8217;t really comment on them, not having direct experience with them.  I&#8217;m by no means attacking these two candidates &#8211; just pointing out some exaggerations and misconceptions on their parts.  Besides, I&#8217;m sure there are more inconsistencies with the other candidates manifestos &#8211; I just don&#8217;t know about them and they don&#8217;t concern me so much.</p>
<p><strong>Normal disclaimer applies &#8211; this is my personal opinion that does not reflect the opinion of my past, current or future employers (both paid and voluntary). </strong></p>
]]></content:encoded>
			<wfw:commentRss>http://naxxfish.eu/2012/union-elections-practice-for-politicians-of-the-future/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Walk through a Broadcast Audio Processor</title>
		<link>http://naxxfish.eu/2011/a-walk-through-a-broadcast-audio-processor/</link>
		<comments>http://naxxfish.eu/2011/a-walk-through-a-broadcast-audio-processor/#comments</comments>
		<pubDate>Mon, 15 Aug 2011 00:42:43 +0000</pubDate>
		<dc:creator>naxxfish</dc:creator>
				<category><![CDATA[Broadcasting]]></category>

		<guid isPermaLink="false">http://naxxfish.eu/?p=586</guid>
		<description><![CDATA[Recently, CSR FM have aquired a Soundweb London BLU-100 (which I&#8217;ve raved about in the previous post). Amongst the myriad of things which it can do, it can also do some quite complex signal processing. Currently, the CSR FM airchain goes from program output (via a switcher), to a DSPXmini FM processor &#8211; which processes [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, CSR FM have aquired a Soundweb London BLU-100 (which I&#8217;ve raved about in the previous post).  Amongst the myriad of things which it can do, it can also do some quite complex signal processing.  Currently, the CSR FM airchain goes from program output (via a switcher), to a DSPXmini FM processor &#8211; which processes the audio and compresses it so that it&#8217;s of uniform loudness, then on to a 50W FM transmitter (of which we&#8217;re only using 25W).</p>
<p>Unfortunately, the FM processor does not have an audio output on it, only a MPX signal which goes directly to the transmitter (which has fancy things like stereo pilot and RDS encoded into it directly) &#8211; as such in order to do our online stream we have to have a FM tuner tuned into the frequency, which then gets distributed to a few places, including a Delta 44 on the encoder machine which then goes out to the online stream.</p>
<p>This isn&#8217;t ideal, for a couple of reasons.  Firstly, any FM signal gets a bit distorted no matter how close you are to the transmitter (it&#8217;s directly below it in the rack, in fact).  Secondly, the FM signal adds &#8216;clipping&#8217;, which is essentially cutting the peaks off waveforms flat.  You&#8217;d normally say this is distortion &#8211; and it is!  However, over FM, being an analogue medium, this actually sounds good and can add to the loudness of the station if done right.</p>
<p>But when going over a digital medium, it sounds horrible (and sounds like the input on the soundcard has been saturated).  It&#8217;s especially bad when you encode it into a lossy codec such as MP3 &#8211; the square edges of the waveforms have lots of high frequency components (check out <a href="http://www.youtube.com/watch?v=AjlHBx0zV7c">this video demonstrating how using the Fourier series a square wave</a> is made up of an infinite number of sine waves of increasing freuquency).  An MP3 encoder tries to compress the audio by removing &#8216;useless&#8217; information, that is frequencies that the human ear is less sensitive to.  If you throw in lots of high frequency components, it ends up thinking that these are important frequencies when in fact there is much more valuble information that it can compress in different parts of the spectrum.</p>
<p>So, we can come to the conclusion that using a clipped audio source for lossy digital transmission is not good.  This applies to online streaming as well as other digital media like DAB, DVB or XM broadcasting.</p>
<p>Therefore, we need a separate audio processor which does everything that our FM processor does, except without the clipping.  If we had a better processor &#8211; such as an Orban Optimod &#8211; it would have two outputs, one with clipping and one without.  Unfortunately we don&#8217;t have that much money to spend on processing, especially with the Studio 2 project ongoing.  So, therefore I decided that we might try to build our own processor using the BLU-100.</p>
<p>In essence, a broadcast processor has a few general stages which it uses to make the audio output of the station sound uniform and punchy.  Namely, these are -</p>
<ul>
<li>Wideband processing (gating, AGC, compression)</li>
<li>Multiband AGC</li>
<li>&#8216;Enhancement&#8217;</li>
<li>Multiband limiting/compression</li>
<li>Final limiting/brickwall limiting</li>
</ul>
<p>A bit like this:</p>
<p><a href="http://naxxfish.eu/wp-content/uploads/heierarchy1.png"><img class="aligncenter size-full wp-image-590" title="heierarchy" src="http://naxxfish.eu/wp-content/uploads/heierarchy1.png" alt="" width="1031" height="177" /></a></p>
<p>&nbsp;</p>
<p>My mission is to implement this using London Architect.  I have pretty much all the components I need in the audio processing section of my BLU-100, so lets give it a shot!</p>
<p><span id="more-586"></span></p>
<p><a href="http://naxxfish.eu/wp-content/uploads/wideband.png"><img class="aligncenter size-full wp-image-595" title="wideband" src="http://naxxfish.eu/wp-content/uploads/wideband.png" alt="" width="473" height="208" /></a></p>
<p>So this first section does some basic AGC and compression.  AGC standing for Automatic/Average Gain Control.  It acts a bit like a person riding the gain on a mixer, trying to make everything be at a set level.  In order to prevent &#8216;suck up&#8217; &#8211; that is, making background noise louder, there is a threshold at which it will stop trying to increase the gain.  This AGC is done by the two levellers in the diagram.  Unfortunately, they&#8217;re not stereo linked &#8211; this means it&#8217;s possible for them to apply different amounts of gain to the left or right channel, potentially affecting stereo image.  That&#8217;s rather unfortunate, but at the moment I don&#8217;t have a solution to this.  The gate will further reinforce the &#8216;freezing&#8217; by reducing the gain further after a given threshold.  This is set pretty low, just in case someone has some really quiet programme material &#8211; really all it does it cut out any noise from total silence (which is required, from time to time).</p>
<p>The compressor will reduce the dynamic range of the signal a little bit, and compensate for overshoot on the levellers (if they bring up the gain, then something really loud happens, they take a bit of time to react to this &#8211; the compressor will kick in and reduce the gain a little bit faster than the levellers will).</p>
<p><a href="http://naxxfish.eu/wp-content/uploads/mb-agc.png"><img class="aligncenter size-full wp-image-593" title="mb-agc" src="http://naxxfish.eu/wp-content/uploads/mb-agc.png" alt="" width="633" height="339" /></a>This beast is the multiband AGC.  This does what the wideband AGC does, except it splits it off into separate bands of frequencies before doing so.  The stereo crossover block is what splits up the frequencies.  I have found that designing an effective crossover is a bit tricky &#8211; it can take quite a bit of tweaking to get it to be transparent.  When I started tweaking, I put all of the levellers into bypass and solo&#8217;d each band on the mixer.</p>
<p>I have decided to use a 5-band design here &#8211; this seems to be fairly standard in broadcasting.  It allows us to get the most out of the high end, which is important when making your audio sound clean, crisp and &#8216;sparkly&#8217; &#8211; though overdone it can sound harsh and screechy (think blackboard + nails).  My settings for this are around about 0-200Hz for Low, 200Hz-750Hz Mid Low, 750Hz-2.6kHz Mid High, 2.6kHz-10kHz High, 10kHz up Super High.  Or something like that (a lot of tweaking was involved, I can&#8217;t remember the exact frequencies!).  A bit of gain correction was applied to the signals, owing to the fact they have different energies.  Getting the right crossover curves was tricky &#8211; if you get the wrong ones and set the crossover points wrong, you end up cancelling out frequencies, giving a comb effect which can sound nasty.</p>
<p>The levellers are set with a fairly low threshold, and a reasonable amount of maximum gain.  Tweaking these levellers is quite time consuming, and rather tricky.  Getting them to add gain to the right frequencies without making things sound too unbalanced is tricky.  Ideally, you don&#8217;t want the settings across the board to be too different &#8211; this can wreak havoc on your stereo image.  Again, annoyingly there&#8217;s no sidechain input on the levellers, so they&#8217;re independent left and right.  I&#8217;ve linked the controlls left and right, but as before &#8211; this doesn&#8217;t make any promises they&#8217;ll apply the same thing to both channels!</p>
<p>The mixer at the end mixes all the bands back together.  You can apply some fine tuning here, gently tweaking what bands you want to be preferred.</p>
<p>Next up, the magical &#8220;enhance&#8221; stage.</p>
<p><a href="http://naxxfish.eu/wp-content/uploads/enhance.png"><img class="aligncenter size-full wp-image-591" title="enhance" src="http://naxxfish.eu/wp-content/uploads/enhance.png" alt="" width="540" height="334" /></a>I&#8217;ve looked through a lot of processors &#8211; and they all seem pretty mysterious when it comes to this stage.  Most, if not all, provide you with an EQ that lets you provide your output with a signature sound.  In this case this is done by the parametric EQ on the far right.  The EQ adds a little extra bass (about +3dB at 65Hz) and takes out a few frequencies that can make voices sound a bit boomy.</p>
<p>What I&#8217;ve not shown here is there&#8217;s a bunch of meters attached at various points.  These meters are used to dynamically control things, such as the EQ.  The idea is that a combination of meters can let me work out whether the output is speech or music, and tweak the EQ accordingly.  Music will sound better with a more generous bass boost &#8211; whereas speech won&#8217;t benefit so much.  I&#8217;ve also added a few extra little bits that make our style of music sound a little nicer &#8211; adding to the station&#8217;s branding.</p>
<p>You will notice two sections which look fairly similar &#8211; one which has a low pass filter then a delay going into the mix, the other with a high pass.  The idea of this is to add to stereo image.  In radio, you want to sound loud, wide and big to keep people tuned in.  One way of doing this is to widen your stereo image.  The technique I&#8217;m using here is one method of stereo widening, which Wikipedia calls a <a href="http://en.wikipedia.org/wiki/3D_audio_effect">3D Audio Effect</a>.  This essentially amounts to taking the each side of the signal, delaying and attenuating it a bit, inverting the phase then adding it back to the opposite side.  I have found, however, that doing this can make voices sound a bit&#8230; strange.  Old Dr Who villeins come to mind.</p>
<p>Apparently, humans are more sensitive to the directionality of high frequency sounds than low (makes sense, they diffract about less in normal environments) &#8211; as such I&#8217;ve decided to not apply the effect to the midrange at all &#8211; just the high (from about 7kHz and up).  The delays are set slightly differently, making it sound more spactious (almost a basic reveb).    I&#8217;ve also done this to the low bass, just to add a bit of extra fat, wide bass.  The difference between these two delays (and the amount they are above the undelayed signal) is what a few processors I&#8217;ve seen call &#8216;width&#8217;.</p>
<p>Both of the levels that these two effects come in at are controlled by meters &#8211; they are mixed in at about a maximum of -10dB on the mixer, and a minimum of -36dB (almost inaudble).  Again, a lot of tweaking to get this right was involved.  But when it&#8217;s done right, it sounds pretty excellent.</p>
<p>And once we&#8217;ve added this mysterious loveliness, we&#8217;re almost there &#8211; onto the multiband limiter!</p>
<p><a href="http://naxxfish.eu/wp-content/uploads/mb-lim.png"><img class="aligncenter size-full wp-image-594" title="mb-lim" src="http://naxxfish.eu/wp-content/uploads/mb-lim.png" alt="" width="711" height="312" /></a>This is surprisingly similar to the mutliband AGC &#8211; in fact, it&#8217;s almost exactly the same, except the tasty filling between the crossover/mixer sandwich.</p>
<p>This time, we&#8217;ve got 5 stereo compressors (yay, stereo!).  These are set up much like any compressor for each of the 5 bands.  The bands picked for the limiter were slightly different, and more evenly spaced to control the full spectrum a bit better.</p>
<p>The low bands are quite heavily compressed, to give that tight bass sound that you want from pop and rock tracks, with a fairly high ratio and a medium threshold (I think they were around the -10dB mark with 8:1 ratio on the last tweak).  Appropriate amounts of makeup gain are applied, and you have some very energetic bass.  The midrange is less heavily processed, but still compressed a little bit to keep things equalised.  The high end is very heavily processed, very low threshold (around -20dB) and a very high ratio (about 14:1) with lots of makeup gain (about +10dB I think?).  This gives you the typical full trebble and bass sort of sound, which sounds decent over many different kinds of speakers.</p>
<p>The dynamic range of the input has been very very squashed at this point &#8211; aiming for everything to fit within about 3dB of range.  The final push is to give it a little extra in the final limiter.</p>
<p><a href="http://naxxfish.eu/wp-content/uploads/final-lim.png"><img class="aligncenter size-full wp-image-592" title="final-lim" src="http://naxxfish.eu/wp-content/uploads/final-lim.png" alt="" width="315" height="222" /></a>This is the simplest stage &#8211; consisting of just a compressor and two limiters.  Again, the limiters aren&#8217;t stereo &#8211; but in this instance we&#8217;re not that bothered.  The compressor is configured with a very high ratio and a high threshold (about -1.01dB) and the fastest attack time possible.  This should nicely clip the top of any remaining peaks which have made it through the other stages.</p>
<p>Anything that the compressor doesn&#8217;t catch, the limiters will cause them to hit a brick wall &#8211; with a faster attack time and a threshold set at about -0.3dB, they will almost guarantee that the final output will never ever be saturated.</p>
<p>&nbsp;</p>
<p>And that&#8217;s pretty much it!  The auctual configuration is pretty straightforward &#8211; but configuring the parameters to be just right is the tricky bit.  There are some parts which could certainly be improved (if I ever find a solution to making the mono objects stereo, that&#8217;ll be excellent), but for the last week I&#8217;ve been tweaking this system and have finally started homing in on a good sounding output, with a range of about 4dB (which is perfectly acceptable for an online stream, I&#8217;d say).</p>
<p>This is quite an experiment, and I&#8217;m not totally sure this is the right thing to do at all &#8211; but the results are sounding pretty good so far, so it can&#8217;t be that far wrong!</p>
]]></content:encoded>
			<wfw:commentRss>http://naxxfish.eu/2011/a-walk-through-a-broadcast-audio-processor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I </title>
		<link>http://naxxfish.eu/2011/i/</link>
		<comments>http://naxxfish.eu/2011/i/#comments</comments>
		<pubDate>Fri, 12 Aug 2011 23:12:49 +0000</pubDate>
		<dc:creator>naxxfish</dc:creator>
				<category><![CDATA[Broadcasting]]></category>

		<guid isPermaLink="false">http://naxxfish.eu/?p=581</guid>
		<description><![CDATA[NOTE: This is most definitely not a tutorial, I&#8217;m mostly making it up as I go along. So, yeah &#8211; recently my radio station has acquired a rather lovely BSS Audio London Soundweb BLU-100.  It&#8217;s a &#8220;sound management&#8221; device, which (on the main unit) has 12 inputs (6 stereo) and 8 outputs (4 stereo), as [...]]]></description>
			<content:encoded><![CDATA[<p><strong>NOTE: This is most definitely not a tutorial, I&#8217;m mostly making it up as I go along.</strong></p>
<p>So, yeah &#8211; recently my radio station has acquired a rather lovely <a href="http://www.bssaudio.com/productpg_soundweblondon.php?product_id=65">BSS Audio London Soundweb BLU-100</a>.  It&#8217;s a &#8220;sound management&#8221; 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 <a href="http://www.bssaudio.com/productpg.php?product_id=67">break-in</a> and <a href="http://www.bssaudio.com/productpg_soundweblondon.php?product_id=61">break-out</a> 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?</p>
<p>But what does it do?  The question is rather what <em>doesn&#8217;t </em>it do.  What we&#8217;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.</p>
<p>It is programmed using a (free) program called<a href="http://www.bssaudio.com/software.php?software=HiQnet+London+Architect+v3.08+R2&amp;Submit=Go"> London Architect</a>.  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&#8217;s quite reminiscent of LabView, except for audio &#8211; to give you an idea.  You can then send it the configuration over the network, and tweak the values using the same program.  It&#8217;s pretty intuitive, and an extremely powerful tool.</p>
<p><span id="more-581"></span></p>
<p><strong>Audio Processing</strong></p>
<p>This thing has so many options for audio processing.  For our purposes, our main use for this unit is to route audio from one place to another.  For example, we want to route audio from Studio 1 to Studio 2, or vice versa. All that&#8217;s required to do this is to drop in a matrix router object, hook all the inputs and outputs up and then set where the signals get routed to.  The particularly handy thing is you can define preset groups &#8211; for example a group of presets which alter what is sent to Studio 2.  You can then set up a preset for every audio input (changing the source each time) &#8211; and then later you can recall the preset remotely (say, over IP) and the audio will instantly get routed to the right place.</p>
<p>But you can do more than that!  There&#8217;s also EQs, and compressors, and levelers, limiters, crossovers, mixers, AGC mixers, and more.  With these blocks it&#8217;s possible to build up pretty complex designs &#8211; right now I&#8217;m working on a broadcast processor which includes a multiband AGC, and a multiband limiter, along with a stereo field expander and bass enhancer (I think that project is probably a post in it&#8217;s own right).</p>
<p>The only thing that&#8217;s slightly annoying is not all of the objects are stereo.  For example, limiters only have one input and one output.  Not great for stereo signals.  You can link the controls together, but they are still controlled by individual channels.  Really, in that situation you need to be able to have a mix of both left and right which control the device so that it applies the same processing to both left and right (to avoid weirdness) &#8211; some of them have sidechain inputs, but not all of them unfortunately.</p>
<p>You also have to be a bit careful not to let the internal channels clip &#8211; which whilst there is a good bit of headroom, it distorts rather nastily.  Also the compressors do suffer from distortion if you try to squash the waveform too much &#8211; but then at those extreme settings you&#8217;d expect that sort of thing of any compressor, especially a digital one.</p>
<p>The DSP power available is more than sufficient for our purposes.  So far, even with the most complex design (in terms of DSP power, anyway) I&#8217;ve only just about managed to use 50% capacity.  I may hit a barrier when I start putting everything together, but considering what can be done with it that&#8217;s pretty darn impressive.</p>
<p><strong>Digital Logic</strong></p>
<p>At the moment we&#8217;ve got a <a href="http://www.sonifex.co.uk/redbox/rboa3_ld.shtml">RB-OA3</a> which does that job through the use of offer and accept buttons in the studios.   You can either &#8220;offer&#8221; control of the air chain (that is, what eventually feeds into the transmitter) and &#8220;accept&#8221; it.  This is all run on standard 5V logic &#8211; you use push button switches and LEDs to operate it, which are in the studios.  It&#8217;s essentially a <a href="http://en.wikipedia.org/wiki/Finite-state_machine">finite state machine </a> hooked up to some relays which switch the audio, not dissimilar to a hifi pre-amp.</p>
<p>With that in mind, we want to migrate away from this switcher to the Soundweb, as this offers the ability to do this switching over IP (and potentially in an automated fashion).  However, it&#8217;d be nice to have an intermediate stage whilst we&#8217;re re-training our presenters how to use the new system (which will likely involve touchscreens in the studios instead of buttons) so that the switching works the way it always used to using the existing hardware.</p>
<p>Turns out London Architect also provides similarly powerful tools for building up logic, as well as audio processing.  It has AND, OR, NAND, NOR, NOT gates, counters, truth tables, clock sources (logic pulses, as they&#8217;re called) amongst other things which can be arranged in such a way to develop pretty complicated things.</p>
<p>The most powerful is surely the truth table object, which maps a give set of binary inputs into another given set of binary outputs.  For those digital electronics boffins out there, you might recognise this behaviour of that of a logic array.  And, yes, you can build almost anything with these truth tables &#8211; the only limit is the number of inputs and outputs you can have (I think it&#8217;s limited to 12 inputs or outputs).  So universial is this tool, a chap from <a href="http://www.radiofrance.fr/">Radio France</a> decided to write what essentially is a truth-table compiler.  You write code, in what suspiciously looks like VHDL, and it will compile that into the data to feed into a truth table.  You then wire it into your logic circuit and import the values it generates into the lookup table.   It&#8217;ll turn that truth table into a state machine (with some of the outputs feeding back into the inputs to indicate the current state), which can transition between states depending on what inputs you give it.</p>
<p>Aha! That sounds familiar!  Once I drew out the bubble diagram for the RB-OA3 &#8211; I could then write down all the states and transitions into this language and compile it into a truth table.  So that&#8217;s exactly <a href="http://www.bssaudio.com/phpBB2/viewtopic.php?t=781">what I did</a>.  All that I needed to do then was wire up the inputs and outputs to the appropriate I/O pins (a very straightforward task), have it fire off audio routing presets when certain states were reached and voila!  Not only that, but we could also finally get the On Air light working in the studios (hurrah!).</p>
<p>&nbsp;</p>
<p>So, to summarise: this thing is absolutely awesome.  Every small radio station should have one.  It&#8217;s a shame we&#8217;ve only got 2, both being installed &#8211; would like to have one to play with occasionally.  I have a theory I could use one to control a fridge&#8230;.</p>
]]></content:encoded>
			<wfw:commentRss>http://naxxfish.eu/2011/i/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unnecessary Maths: My Milkshakes Bring Over a Million Boys to the Yard</title>
		<link>http://naxxfish.eu/2011/unnecessary-maths-my-milkshakes-bring-over-a-million-boys-to-the-yard/</link>
		<comments>http://naxxfish.eu/2011/unnecessary-maths-my-milkshakes-bring-over-a-million-boys-to-the-yard/#comments</comments>
		<pubDate>Wed, 27 Jul 2011 23:10:10 +0000</pubDate>
		<dc:creator>naxxfish</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[Random!]]></category>

		<guid isPermaLink="false">http://naxxfish.eu/?p=558</guid>
		<description><![CDATA[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 &#8211; and you can have up to 3 flavours.  Not only that, they&#8217;ll do it with a smile! One [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://naxxfish.eu/wp-content/uploads/IMAG0128.jpg"><br />
</a>Canterbury is home to the <a href="http://www.shakeshed.com/">Shake Shed</a>, 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 &#8211; and you can have up to 3 flavours.  Not only that, they&#8217;ll do it with a smile!</p>
<p><a href="http://naxxfish.eu/wp-content/uploads/IMAG0139.jpg"><img class="aligncenter size-full wp-image-560" title="The Shake Shed!" src="http://naxxfish.eu/wp-content/uploads/IMAG0139.jpg" alt="" width="768" height="460" /></a></p>
<p>One day I was walking past and saw a sign outside, boastfully promising that there&#8217;s over a million different milkshakes to choose from.  I wondered &#8211; is it actually over a million?</p>
<p><span id="more-558"></span></p>
<p>So I asked.  Unfortunately, this wasn&#8217;t something that the people working on the till at the time knew off the top of their head.  Also, they didn&#8217;t know how many different flavours they had.  Time to do things the hard way&#8230;.</p>
<p>First things first, we need to know how many different flavours there are.  Lets get counting &#8230;.</p>
<p><a href="http://naxxfish.eu/wp-content/uploads/IMAG0127.jpg"><img class="aligncenter size-full wp-image-561" title="IMAG0127" src="http://naxxfish.eu/wp-content/uploads/IMAG0127.jpg" alt="" width="768" height="460" /></a><a href="http://naxxfish.eu/wp-content/uploads/IMAG0128.jpg"></a></p>
<p><a href="http://naxxfish.eu/wp-content/uploads/IMAG0128.jpg"><img class="aligncenter" title="IMAG0128" src="http://naxxfish.eu/wp-content/uploads/IMAG0128.jpg" alt="" width="768" height="460" /></a></p>
<p><a href="http://naxxfish.eu/wp-content/uploads/IMAG0130.jpg"><img class="aligncenter size-full wp-image-564" title="IMAG0130" src="http://naxxfish.eu/wp-content/uploads/IMAG0130.jpg" alt="" width="768" height="460" /></a></p>
<p><a href="http://naxxfish.eu/wp-content/uploads/IMAG0131.jpg"><img class="aligncenter size-full wp-image-565" title="IMAG0131" src="http://naxxfish.eu/wp-content/uploads/IMAG0131.jpg" alt="" width="768" height="460" /></a></p>
<div><a href="http://naxxfish.eu/wp-content/uploads/IMAG0136.jpg"><img class="aligncenter size-full wp-image-566" title="IMAG0136" src="http://naxxfish.eu/wp-content/uploads/IMAG0136.jpg" alt="" width="460" height="768" /></a></div>
<p>OK, so, they said milkshakes &#8211; so I&#8217;m not counting anything hot chocolate, or anything else.  Just milkshake flavours.  And, by my reckoning, they have 182 different items that you can have in your milkshake (yes, I really did just count them).</p>
<div><a href="http://naxxfish.eu/wp-content/uploads/IMAG01351.jpg"><img class="aligncenter size-full wp-image-567" title="Shake Shed Prices" src="http://naxxfish.eu/wp-content/uploads/IMAG01351.jpg" alt="" width="768" height="460" /></a></div>
<p>So then, as we can see above you can have between 1 and 3 flavours in your milkshake, and it can be one of two sizes.  You also have the choice between Skinny, Standard, Creamy and Soya milk.</p>
<p>Lets start simply.  Lets say our total number of flavours is <img src='http://s.wordpress.com/latex.php?latex=n&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='n' title='n' class='latex' /> &#8211; there are <img src='http://s.wordpress.com/latex.php?latex=n&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='n' title='n' class='latex' /> possible combinations with one flavour &#8211; simple enough</p>
<p>There are then <img src='http://s.wordpress.com/latex.php?latex=n%5E2&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='n^2' title='n^2' class='latex' /> combinations of two flavours. However, that&#8217;s all possible combinations, including ones where both flavours are the same &#8211; so we minus <img src='http://s.wordpress.com/latex.php?latex=n&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='n' title='n' class='latex' />, which is the same as the first figure (as both are the same, it effectively counts as the same as 1 flavour)</p>
<p>And then <img src='http://s.wordpress.com/latex.php?latex=n%5E3&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='n^3' title='n^3' class='latex' /> combinations of 3 flavours &#8211; again, we can minus <img src='http://s.wordpress.com/latex.php?latex=n&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='n' title='n' class='latex' /> as the number where all 3 are the same.  But then we also have  <img src='http://s.wordpress.com/latex.php?latex=n%5E2&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='n^2' title='n^2' class='latex' /> combinations where two of the 3 are the same &#8211; i.e. we count 2 of the 3 to be &#8220;one&#8221; flavour, and use the previous figure of how many 2 combination shakes and eliminate them.</p>
<p>Add them all together, you get: <img src='http://s.wordpress.com/latex.php?latex=n%20%2B%28%20n%5E2%20-%20n%29%20%2B%20%28n%5E3%20-%20n%20%5E2%20-%20n%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='n +( n^2 - n) + (n^3 - n ^2 - n)' title='n +( n^2 - n) + (n^3 - n ^2 - n)' class='latex' />,  let <img src='http://s.wordpress.com/latex.php?latex=n%20%3D%20182&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='n = 182' title='n = 182' class='latex' /> and it comes out to be <strong>5,995,444</strong>.  Waaay over our over 1 million already.  But that&#8217;s not the end of the choices: we can also choose from 4 different milks: multiply that by 4 and you get</p>
<blockquote>
<p style="text-align: center;"><strong><em>23,981,776 combinations</em>. </strong></p>
</blockquote>
<p>Almost twenty four million possibilities. 48 million if you count regular and large as being different.  However, quite a few of them will be horrible, because they contain black jacks (I mean, really? Liquorice? And milk?)  But, I wonder, how many of them will contain one given flavour?</p>
<p>We can say in the case of 1 flavour shakes, only 1 out of <img src='http://s.wordpress.com/latex.php?latex=n&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='n' title='n' class='latex' />will have blackjacks in it.  Easy enough.  In the case of 2 flavour shakes, there will be <img src='http://s.wordpress.com/latex.php?latex=n&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='n' title='n' class='latex' /> out of <img src='http://s.wordpress.com/latex.php?latex=n%5E2%20-%20n&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='n^2 - n' title='n^2 - n' class='latex' /> flavours which have blackjacks as one of the two flavours.  And then, finally, there will be <img src='http://s.wordpress.com/latex.php?latex=n%5E2&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='n^2' title='n^2' class='latex' /> out of <img src='http://s.wordpress.com/latex.php?latex=n%5E3%20-%20n%5E2%20-%20n&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='n^3 - n^2 - n' title='n^3 - n^2 - n' class='latex' />.  Adding it all together, that means that <img src='http://s.wordpress.com/latex.php?latex=1%20%2B%20n%20%2B%20n%5E2&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='1 + n + n^2' title='1 + n + n^2' class='latex' /> will have a particular flavour in it.  Let <img src='http://s.wordpress.com/latex.php?latex=n%20%3D%20182&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='n = 182' title='n = 182' class='latex' /> again, and that gives us 33,307 combinations in which a particular flavour features.  Ew.  That&#8217;s a lot of manky blackjack milkshakes.  Or, looking at it positively, that&#8217;s a lot of potentially yummy banoffee pie milkshakes.</p>
<p>Lets throw in some more numbers here.  I&#8217;d say that the average diameter of a milkshake cup is about 8cm, and about 12cm tall.  And probably contains about 330ml of milkshake (at a guess).</p>
<p>If you were to put every possible milkshake combination in a line, the line would be long enough to go between London and Birmingham 10 times.  If it was a straight line, unrestricted by water, it&#8217;d get you about 1/3rd of the way into the Atlantic Ocean.  Likewise (if you have a few million milkshake floatation devices) the line would be able to go from Canterbury to Fes in Morocco.</p>
<p>If you piled them up one on top of another (as if you are trying to build some kind of milky space elevator), the top milkshake would be at an altitude of 2,877 km high &#8211; which is about between 6 and 10 times higher than the orbit of the <a href="http://en.wikipedia.org/wiki/International_Space_Station">International Space Station</a>.</p>
<p>If you poured out all of the possible milkshakes into a bucket, it would weigh about 7,900 tonnes, and be enough fluid to fill 3 <a href="http://en.wikipedia.org/wiki/Olympic-size_swimming_pool">Olympic Sized Swimming Pools</a>.</p>
<p>If it takes you about 1 minute to drink an entire milkshake, then it&#8217;d take you almost 63 years of solid drinking to get through every single combination.  That&#8217;s not including toilet breaks.  And, y&#8217;know, having a life (not that I can really talk, I&#8217;m spending my spare time doing maths for no reason.  At least I don&#8217;t need to pee the entire time).</p>
<p>&nbsp;</p>
<p>And out of all those combinations, the only one for me is Banoffee Pie.  Yummm&#8230;.</p>
<p><strong>UPDATE!</strong>: I did a piece on <a href="http://www.csrfm.com/">CSR FM</a> based on this post! <a href="http://podcasts.csrfm.com/speech/UnnececaryMaths-Milkshakes.mp3">Unnececary Maths &#8211; Milkshakes</a></p>
]]></content:encoded>
			<wfw:commentRss>http://naxxfish.eu/2011/unnecessary-maths-my-milkshakes-bring-over-a-million-boys-to-the-yard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://podcasts.csrfm.com/speech/UnnececaryMaths-Milkshakes.mp3" length="4730372" type="audio/mpeg" />
		</item>
		<item>
		<title>Unnecessary Maths: McDonalds Marketing</title>
		<link>http://naxxfish.eu/2011/unnececary-maths-mcdonalds-marketing/</link>
		<comments>http://naxxfish.eu/2011/unnececary-maths-mcdonalds-marketing/#comments</comments>
		<pubDate>Thu, 12 May 2011 02:32:11 +0000</pubDate>
		<dc:creator>naxxfish</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://naxxfish.eu/?p=549</guid>
		<description><![CDATA[So I was in McDonalds today (lets not go into why) and found a piece of marketing that included some numbers. It said McDonald&#8217;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. [...]]]></description>
			<content:encoded><![CDATA[<p>So I was in McDonalds today (lets not go into why) and found a piece of marketing that included some numbers.  It said</p>
<blockquote><p>McDonald&#8217;s Litter patrols cover over 120,000 miles every year in the UK and Ireland. We are about the environment!</p></blockquote>
<p>(or something to that effect)</p>
<p>I decided to break this down a bit.  After doing a bit of <a href="http://www.mcdonalds.co.uk/static/pdf/ourworld/openfarms/open-farms-newsletter-uk.pdf">research</a> 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&#8217;s about 440 meters every day.</p>
<p>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.</p>
<p>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.<a href="http://naxxfish.eu/wp-content/uploads/mcdonalds2.png"><img class="aligncenter size-full wp-image-552" title="mcdonalds" src="http://naxxfish.eu/wp-content/uploads/mcdonalds2.png" alt="" width="400" height="216" /></a></p>
<p>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.</p>
<p>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</p>
<p>Now you break it down, it down I wonder why that sounds impressive.</p>
<p>&nbsp;</p>
<p>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&#8217;ve <a href="http://discovermagazine.com/1995/apr/whatagas494">probably farted</a> about 456.25 liters of gas in the last year.  Lets say that&#8217;s mostly <a href="http://mistupid.com/chemistry/aircomp.htm">air</a>&#8230; that&#8217;s over 500g of farts!  And 16g of CO2.  I wonder how much of the UK&#8217;s CO2 emissions due to farts is generated by McDonalds employees going on litter patrols&#8230;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://naxxfish.eu/2011/unnececary-maths-mcdonalds-marketing/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>CSR FM Tech Blog</title>
		<link>http://naxxfish.eu/2011/csr-fm-tech-blog/</link>
		<comments>http://naxxfish.eu/2011/csr-fm-tech-blog/#comments</comments>
		<pubDate>Sun, 01 May 2011 22:31:38 +0000</pubDate>
		<dc:creator>naxxfish</dc:creator>
				<category><![CDATA[Broadcasting]]></category>

		<guid isPermaLink="false">http://naxxfish.eu/?p=544</guid>
		<description><![CDATA[So, I decided that CSR Technical Services needed a blog. So now it does! Here&#8217;s a copy of my first post there, about the recent issues we&#8217;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 [...]]]></description>
			<content:encoded><![CDATA[<p>So, I decided that <a href="http://tech.csrfm.com/">CSR Technical Services</a> needed a blog.  So now it does!  Here&#8217;s a copy of my first post there, about the recent issues we&#8217;ve had with the <a href="http://tech.csrfm.com/?p=9">Station Switcher</a></p>
<p>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.</p>
<p>Therefore, we have an airchain which includes a station switcher (specifically two <a href="http://www.sonifex.co.uk/redbox/rboa3_ld.shtml">Sonifex Redbox OA3</a> 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 &#8211; offer and accept.  The station switcher allows the operator of a studio to &#8220;offer&#8221; to take control from other studios, and &#8220;accept&#8221; control for other studios.  The sustainer, since there is no human present, cannot offer to take control &#8211; therefore a special case is given whereby the studios may force it to take control by holding the offer button then pressing accept.</p>
<p>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 &#8211; 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 &#8220;press&#8221; 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.</p>
<p>However, there was one slight issue &#8211; Studio 2 is at a remote site, and obviously we can&#8217;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 <a href="http://www.stl-ip.com/">MDO STL-IP </a>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 &#8211; 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.</p>
<p>This circuit was built on veroboard, and looked a lot like this:</p>
<p><img class="aligncenter" title="Station Switcher" src="http://farm6.static.flickr.com/5229/5675075167_fb3b34e93f.jpg" alt="" width="299" height="500" /></p>
<p>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.</p>
<p>This all worked just fine up until recently &#8211; 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 &#8211; 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).</p>
<p>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.</p>
<p>Until we need to work out how to remotely put Studio 2 on air.</p>
]]></content:encoded>
			<wfw:commentRss>http://naxxfish.eu/2011/csr-fm-tech-blog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How many ways can I say &#8230;</title>
		<link>http://naxxfish.eu/2011/how-many-ways-can-i-say/</link>
		<comments>http://naxxfish.eu/2011/how-many-ways-can-i-say/#comments</comments>
		<pubDate>Sun, 24 Apr 2011 01:13:58 +0000</pubDate>
		<dc:creator>naxxfish</dc:creator>
				<category><![CDATA[Computing]]></category>

		<guid isPermaLink="false">http://naxxfish.eu/?p=518</guid>
		<description><![CDATA[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 , and a maximum message length of (in [...]]]></description>
			<content:encoded><![CDATA[<p>My friend <a href="http://quixotic.eu">Kitty</a> asked me a simple question the other evening:</p>
<blockquote><p><strong>What is the total number of unique messages you can fit into 140 characters (i.e. a tweet)</strong></p></blockquote>
<p>This seems like potentially quite a simple question.  So, lets say you have a set of valid characters called <img src='http://s.wordpress.com/latex.php?latex=C&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='C' title='C' class='latex' />, and a maximum message length of <img src='http://s.wordpress.com/latex.php?latex=l&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='l' title='l' class='latex' /> (in this case, equals 140).  For all messages consisting of one character, you have size of <img src='http://s.wordpress.com/latex.php?latex=C&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='C' title='C' class='latex' /> possibilities.  For two characters, you have <img src='http://s.wordpress.com/latex.php?latex=C%5E2&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='C^2' title='C^2' class='latex' /> possibilities &#8211; all the way up to <img src='http://s.wordpress.com/latex.php?latex=C%5El&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='C^l' title='C^l' class='latex' />.  In math-speak:</p>
<img src='http://s.wordpress.com/latex.php?latex=%5Cdisplaystyle%5Csum_%7Bn%3D1%7D%5El%20C%5En&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\displaystyle\sum_{n=1}^l C^n' title='\displaystyle\sum_{n=1}^l C^n' class='latex' />
<p>Which, given that we know that the general formula for a geometric progression to be :<br />
<img src='http://s.wordpress.com/latex.php?latex=%5Cdisplaystyle%5Csum_%7Bk%3D0%7D%5E%7Bn%7D%20ar%5Ek%20%3D%20%5Cfrac%7Ba%281-r%5E%7Bn%2B1%7D%29%7D%7B1-r%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\displaystyle\sum_{k=0}^{n} ar^k = \frac{a(1-r^{n+1})}{1-r}' title='\displaystyle\sum_{k=0}^{n} ar^k = \frac{a(1-r^{n+1})}{1-r}' class='latex' /><br />
<a href="http://en.wikipedia.org/wiki/Geometric_progression#Geometric_series">Geometric progression (Wikipedia)</a>
</p>
<p>
We can substitute <img src='http://s.wordpress.com/latex.php?latex=a%20%3D%201&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='a = 1' title='a = 1' class='latex' />, <img src='http://s.wordpress.com/latex.php?latex=r%20%3D%20C&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='r = C' title='r = C' class='latex' /> and <img src='http://s.wordpress.com/latex.php?latex=k%20%3D%20i&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='k = i' title='k = i' class='latex' /> giving us<br />
<img src='http://s.wordpress.com/latex.php?latex=%5Cdisplaystyle%5Csum_%7Bn%3D0%7D%5E%7Bl%7D%20C%5En%20%3D%20%5Cfrac%7B1-C%5E%7Bl%2B1%7D%7D%7B1-C%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\displaystyle\sum_{n=0}^{l} C^n = \frac{1-C^{l+1}}{1-C}' title='\displaystyle\sum_{n=0}^{l} C^n = \frac{1-C^{l+1}}{1-C}' class='latex' />
</p>
<p>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 <img src='http://s.wordpress.com/latex.php?latex=C%20%3D%20255&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='C = 255' title='C = 255' class='latex' />.  We shall also let <img src='http://s.wordpress.com/latex.php?latex=l%20%3D%20140&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='l = 140' title='l = 140' class='latex' />, since that is the maximum length of a tweet.  The answer is &#8230;. a very big number.  According to <a href="http://www3.wolframalpha.com/input/?i=%281+-+255^%28140%2B1%29%29%2F%281+-+255%29">Wolfram Alpha</a>, it&#8217;s<br />
<img src="http://naxxfish.eu/wp-content/uploads/unique_tweets.gif" alt="" title="Number of unique tweets" width="493" height="141" class="aligncenter size-full wp-image-535" /></p>
<p>That&#8217;s about 8 followed by over 300 zeros, and that&#8217;s being conservative (not including unicode, for example).  However, what we have just calculated is in fact all possible messages.  Including &#8220;xSADFt5hagarnw&#8221;, or &#8221;   s sssss     akasf&#8221;.  I can&#8217;t think of many people who would tweet that &#8211; 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</p>
<p><a href="http://naxxfish.eu/wp-content/uploads/tweet-venn.png"><img src="http://naxxfish.eu/wp-content/uploads/tweet-venn.png" alt="" title="Tweet Venn diagram" width="433" height="304" class="aligncenter size-full wp-image-540" /></a></p>
<p>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 &#8220;!!!LOL!!!&#8221; or &#8220;i &lt;3 my v1@gra&#8221;.  Our grammar starts becoming more complex to accommodate these exceptions.  </p>
<p>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 &#8220;word&#8221; on the channel &#8211; with each node representing a character and it&#8217;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.  </p>
<p>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) &#8211; imposing the limits on the number of possible characters.  </p>
<p>Chances are, it&#8217;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.  </p>
<p>So, I would say that the answer to the original question is in fact: <strong>it depends</strong>.  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!  </p>
<p>Unfortunately, not a very mathematically beautiful answer &#8211; but then anything to do with language rarely is &#8230;. </p>
]]></content:encoded>
			<wfw:commentRss>http://naxxfish.eu/2011/how-many-ways-can-i-say/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

