Feb 22nd 2013

1 comments

Sampler plugin for the baremetal LV2 host

I threw together a simpler sampler plugin for kicks. Like the other plugins it sounds fairly underwhelming. Next challenge will probably be to try plugging in some real LV2 plugins.

Feb 21st 2013

0 comments

Baremetal MIDI machine now talks to hardware MIDI devices

The Baremetal MIDI file player was cool, but not quite as cool as a real instrument.

I wired up a MIDI In port along the lines of This one here, messed with the code a bit and voila (and potentially viola), I can play LV2 instrument plugins using a MIDI keyboard:

When I say "LV2 synth plugins", I should clarify that I'm only using the LV2 plugin C API, not the whole .ttl text file shebangle. I hope to get around to that at some point but it will be a while before you can directly plug LV2s into this and expect them to just work.

Jan 22nd 2013

6 comments

Baremetal MIDI file player / LV2 synth host for the Raspberry Pi

This is a simple MIDI file player that runs directly on the Raspberry Pi hardware, ie. it doesn't run Linux or any OS (although I did end up implementing a bunch of sketchy POSIX functions). This means it's essentially an embedded project, and you can see from the video that it boots up more or less instantly.

I've learned a bit about doing baremetal hardware programming in C. It feels quite rewarding, and despite being primarily intended as a Linux computer the Pi is quite usable as an embedded device. If you're interested in that sort of thing, this is a good place to start looking.

Unless anybody knows different, this project breaks new ground in two ways:

  • It contains the first baremetal audio code for the pi. Unfortunately I was only partly able to figure out how this should be done. My code uses the 'oscillator' clock source for the PWM, which leads to fairly dreadful audio quality. If anybody knows how to make the PWM work with the 'PLLA' source used in Linux, I'd love to hear about it.
  • It's the first embedded implementation of an LV2 plugin host. It's a rather loose interpretation of the spec as there's no working filesystem yet, so dynamic linkage and runtime reading of .ttl files aren't possible.

The source and binaries are available here. It includes three fairly bad sounding synth plugins, which you can hear demoed in the video.

Next step is to hook it up to the MIDI keyboard you can briefly see in the video.

Thanks to David Welch for his baremetal pi tutorial on github, to Remo Dentato for his midi file code, to Dave Robillard for his LV2 work, and to Wayne Stallwood for lending me a Pi to work on. You are the wind beneath my wings.

Update: I got featured on hackaday.com! Cool.

Aug 8th 2010

0 comments

Ghetto guitar synth with Linux/Ingen

By unfortunate historical accident the term "guitar synth" seems to have become synonymous with "guitar-like MIDI controller", which is odd as MIDI is fundamentally quite poor at representing the way guitars are played. I wanted to try ditching the MIDI stage and controlling an oscillator directly from the pitch of the guitar. First port of call was the frequency tracker in swh-plugins, but it didn't seem to work particularly well (sorry Steve). So I knocked together an LV2 plugin using Paul Brossier's Aubio library, which includes pitch detection functionality among many other handy things.

You can download my plugin's source code with:

git clone https://github.com/Joeboy/joeboy-lv2-plugins.git

The bad news is that it currently requires the trunk version of Aubio, which will become 0.3.3 when it is released. So you can't actually run this without getting your hands a bit dirty yet.

Here's a video of me playing guitar through Dave Robillard's Ingen audio processing environment with the pitch detector and an oscillator. As well as showing off the pitch detector plugin, this serves as a bit of an introductory tutorial for Ingen, which in my opinion is underdocumented and underappreciated.

(Direct YouTube link)

Sep 19th 2008

0 comments

Ridiculously overengineered hi-fi project

Since I moved to Bristol I haven't listened to most of my music collection, which remained packed away on a hard drive for several months. I have now addressed this state of affairs in a characteristically ludicrous and impractical manner.

My friend Wayne was kind enough to donate me his surplus Linksys NSLU2, which I've installed the fabulous OpenWrt on. The prebuilt image I tried didn't seem to play nicely with bluetooth so I built my own version out of svn. I installed mpd and connected my USB hard drive and speakers.

Recklessly disregarding this wise admonishment, I decided to knock together my own solution to controlling the music player from my bluetooth phone. There are various solutions already, but they all seemed a little on the heavy/byzantine side for me and my slug. So, I threw together a small C program to relay messages from my bluetooth phone to mpd. Actually it just relays messages sent via bluetooth to any host/port, so there might plausibly be some other use for it. Don't know what though.

This just left the app to run on my phone. The phone's a nokia 6021 and runs J2ME/MIDP2.0. I'm not much of a java programmer but I managed to create a somewhat working app (source here). To describe it as basic is understating the case, but hopefully at some point I'll get round to turning it into something more complete.

Jul 1st 2008

0 comments

Yet another pollen widget

My esteemed friend and ex-colleague Dave has written a Dashboard widget that shows you pollen forecasts for your area in the UK. Get it here.

Jun 29th 2008

1 comments

Pollen forecast Firefox extension

I thought my UK pollen forecast gnome applet might be useful to more people if I made it available as a Firefox extension. If I'd realised how much faffing about was going to be involved I might not have bothered, but anyway it's done now.

It has a page here at the official Mozilla addons site, but you need to be registered with the site to get it there until somebody reviews it and judges it fit for public consumption. So for the time being you can get it from my website.

Jun 26th 2008

1 comments

Pollen index feed / gnome applet

Zirtek, the manufacturers of anti-allergy medicines, provide a free (as in beer) desktop app that tells you the pollen forecast for your area. It's Windows-only, but with a small amount of cunning we can work out what it's doing and make our own version. Wireshark reveals that the app is downloading data from an XML feed here. Zirtek don't seem to publicise that url but it's on the public internet so I guess there's no legal issues with using it.

I made a gnome applet, which you can install as follows:

$ svn co https://tubbs.trition.org.uk/pollencount/gnome_applet pollencount_gnome_applet
$ cd pollencount_gnome_applet
$ sudo make install

Then right click on your panel, click Add to Panel and select 'PollenCount'. Right-click the applet to set your region.

Jun 18th 2008

2 comments

XHTML vs HTML rendering speed test

At the time of writing the web is in the midst of a strange situation with respect to XHTML rendering. Modern websites often identify themselves in their head sections as being coded in XHTML, but identify themselves in their HTTP headers as being coded in HTML. This is because Internet Explorer, the crappest but most prevalent web browser, fails to render XHTML code that correctly identifies itself with the application/xhtml+xml mimetype. To work around this authors send their pages with the wrong mimetype, which causes all browsers to fall back to rendering the code as if it were HTML. This is just one of many ways IE makes the web a more broken place than it ought to be. But I digress.

Various arguments have been advanced as to why XHTML might be preferable to HTML, or vice versa. One of those arguments concerns rendering speed. I've seen people argue this as an advantage of both XHTML-style rendering and HTML-style rendering.

Out of interest I hacked together a (fairly unscientific) speed test of Firefox 3's rendering of a page served as text/html vs the same page served as application/xhtml+xml. The page chosen was my own homepage (with a couple of minor modifications). I served it locally via a slightly modified version of nweb, an extremely simple and lightweight webserver. The render time was discerned using javascript, by taking the time in the head of the page and again in an onload handler, and subtracting one from the other. Not sure if that's the best metric but I can't think of a better one.

And the results are... I bet you're really excited now... over 40 page refreshes, the text/html version averaged a time of 385ms, while the application/xhtml+xml version averaged 367ms. Making the XHTML version ~5% faster. Not dramatic or particularly scientific, but kind of interesting.

Jun 11th 2008

0 comments

New Visual Compressor

I think my new Visual Compressor LV2 plugin is just about ready to be unleashed upon a frankly uninterested public. This one has a GUI that lets you visually set up the compression parameters (hence the name, duh). It looks like this, if you're running one of the very few lv2 hosts that support the GUI extension. As far as I know so far that's just Ingen and Elven, which is available as part of ll-plugins

You can get the source by doing:

$ svn co https://tubbs.trition.org.uk/audio/lv2/visual_compressor

You'll need lv2-c++-tools installed to build it.

Jun 3rd 2008

0 comments

Tagalog - the unobtrusive time tracker

A while ago the management of a company I was working for decided it needed to keep track of the time its employees were spending on various tasks and projects. The solution that was arrived at was that we would all use dotproject, a project management web app written in PHP.

Since a typical day at that company consisted of hundreds of interruptions with brief bouts of actual work permitted in between, using a web app to track time turned out to be too unwieldy to be really practical. I quickly resorted to retrospectively filling my timesheet with plausible but largely fictitious entries.

I was motivated by this experience to write tagalog, a small gnome/python app which allows you to track your time easily without interrupting your flow any more than necessary. Here's its homepage.

Jun 1st 2008

0 comments

The unacceptable face of mashup culture?

A while ago I watched The Seventh Seal with my French marine biologist friend Sophie, who revealed at the end that she was confused because she thought 'seal' meant a kind of marine mammal. Finding this hilarious, I created the following graphic:

Graphic of arguable amusingness

I suspect about 1% of people will get the references and about 1% of those people will actually find it amusing. I nonetheless believe in my heart that this graphic is funny.

Apr 30th 2008

0 comments

I wrote an LV2 plugin

I was inspired by Lars Luthman's appositely named guide to have a go at writing a simple LV2 audio plugin. It turned out to be surprisingly easy.

My plugin is a simple volume modulator with period and depth controls. Here's what it sounds like, first with an otherwise clean guitar sound and then with an added ludicrous metal patch from my effects pedal. Warning: extremely cheesy guitar playing.

You can get the source by doing:

$ svn co https://tubbs.trition.org.uk/audio/lv2/shimmer

You'll need lv2-c++-tools installed to build it.

Mar 16th 2008

0 comments

Spamhaus ZEN blocklist

Today I added Spamhaus's ZEN blocklist to my webserver config. This required a two line addition to my exim4 config file and has resulted in my receiving no spam whatsoever for over two hours. That's truly amazing and I wish I'd done it ages ago.

Mar 16th 2008

0 comments

Last gig with Anna Mudeka

I played another farewell gig with Anna last night at Cambridge Junction. I think that's at least my third farewell gig with The Anna Mudeka Band, and I'm sure there were a few with BabaSimba (a band I used to be in with Anna) too. Since I seem to be imminently moving to Bristol this one might actually have been my last though.

For some reason the band forgave me for completely missing the soundcheck and showing up two minutes before we were due on stage, which I'm immensely surprised and grateful about. The gig was great, and most of the audience was lured out of the seating which had been misguidedly allotted to it. With each final gig I've been progressively forgetting that I'm supposed to be in a World Music type band and playing more and more like Tom Morello.

So, now I need a new musical project to keep me occupied. Anyone up for starting a band called sABBAth to cover ABBA songs in the style of Black Sabbath?

Mar 14th 2008

0 comments

Spam goes metric

I got my first metric spam today:

Subject: Add extra centimetres

I'll be watching to see if this is part of a trend.

Mar 14th 2008

0 comments

New blog

I've finally got round to turning my embarrassing holding page into something approximating a website. Please let me know if you think there are any problems with it I need to fix.

Now, let's see if I can be bothered to post any actual content here...