Feb 22nd 2013


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


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


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


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


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.

More blog posts »

Upcoming stuff

No upcoming stuff springs to mind. What a sad, wasted life I lead.

Other people and things


My friend who is in Colombia reporting on the crap effects of increased demand for biofuel, and the generally FUBB politics of Colombia.

What music am I fixated on at the moment?

Cry for the Fire by The Residents

Chelsea Hotel #2 by Leonard Cohen

Oh Heart by Jill Barber

Norwich Bicycle Repair Co-op