Geek weather

Andrew Booker 2008-03-24 23:25:50

At what point did an interesting project that motivated me for at least a year turn into a chore? 18 months ago I would sit at the electronic drums thinking I really needed a regular gig, where I could play the kit how I liked and do interesting things with the sounds. I felt I had a lot to say on the kit. By the beginning of this year I had the feeling I had run out.

This is probably not true, as I realise every time I sit at the kit for some random clattery and battery, but I'd be more enthusiastic about looking for a new venue for the next round of Improvizone gigs if I had some more ideas, not least for steering what we do more towards ambient chillout music, rather than into full-on jamming as I seem to have always driven us into at the Plough.

Mike and I were at the Plough last week watching a cool band called The Starts (absolutely nothing like the Improvizone gigs we've done there over the last six months). It's the second time I've been there and seen their projection screen in use, perfectly placed above the stage, and I know they have a DVD player, and every time I've sat at the kit looking up at their projector on the ceiling, I have cursed myself for not getting some visuals together. Until now. Happily, drumming and kit ideas seem not to be all that can get me re-motivated. Something else can. The weather.

England has been battered by a little meteorological turbulence over the last couple of weeks. I've been having fun looking at the Met Office satellite pictures of clouds over Europe, and they've given me an idea.

You can find loads of time-lapse videos of clouds on YouTube, but they are quite poor quality, generally last only a few minutes at most, and worst, all seem to have been made in the summer when there wasn't much happening except the occasional wispy cotton ball spinning past. In the turbulent European spring of 2008, I've decided to have a go at making my own time-lapse weather video for projecting behind the next Improvizone gig.

Erm... Andrew... shouldn't you be getting someone else to do this who knows what they're doing? Yes, soon. But this is a good chance for me to learn a little bit about visuals and apply some coding to get things done. Also, I may be happy for kindred musicians to share the risk of an improvised gig that may not be well-attended, and not be paid for it, something is putting me off asking people to come and do visuals on the same basis. I think visuals will make a big difference, but I want to give it a dry run myself and then hand it over to someone else to improve upon, when I have no more time or ability.

So where do I get satellite images of weather over Europe? Besides the Met Office itself, a good place to get nice JPEGs is the EUMETSAT image gallery. The UK is the second highest funding contributor to EUMETSAT. Their images appear to be available for use provided copyright notification is displayed. We do not charge for or make money out of Improvizone gigs (yet). So I find no moral impediments in the way of using some of their nice satellite pictures to educate myself into how to make videos. I'm particularly interested in the 6.2μm water vapour band, as these are lovely smooth swirly images. My plan is to take these images and flick book them together into a movie.

How many images I would need? Lots and lots, which is where I start to have some coding fun. The EUMETSAT full disc 6.2μm images are available every 3 hours, ie 8 images make up an entire day of weather. For relatively smooth movement, you need several images per second, Supposing I used 8 per second, I would need 60 days of images for a minute of video. That's 480 images I would have to have the patience to download over two months. I need automation.

Because I'm a geek, and it's still dark outside in the evenings, I've been putting together bits of code to grab files from various places for me. I've been using Bronze Age Visual Basic to begin with because COM HTTP tools and saving to binary files are both easy. I can write a downloader if the host provider makes its files available in a convenient way and in an easily identifiable pattern. The Met Office, for example, name their files YYYYMMDDHH00 (one per hour, going back two days), which means I know exactly which is which, so I can tell whether I've already got it, and also they sort alphanumerically in my folder.

The EUMETSAT files looked like they were a bit more trouble. They name their files 0.jpg, 1.jpg, 2, 3 etc in reverse date order, ie file 0 is the latest available and file 106 is from about two weeks ago. Trouble is, file 0 at 7pm is not the same as file 0 at 10pm. You can use the clock to work out which is which, until they miss one because of a data transmission error from the satellite, or because someone spilled their Coke on the server. Luckly I soon discovered there's a zip file of the latest 24 images (the last four days) which seems to be updated with every new file, and most importantly, has the files named by timestamp, so I know which is which. Downloading is easy, just grab and unzip. Oooof! Nurse! Ahem.

I'm reasonably sure my downloading tools are working now, so I've set them up to run every day using the operating system Task Scheduler, while I go off and do something else for a few weeks.

Over time, I will amass a series of individual images in sequence. Hopefully. These should be really easy to compile into a movie using the operating system's handy Movie Maker. But first, some of my images are square and I want them cropped to the 4:3 ratio for the projection video. [I'm assuming widescreen would be pointless, as most venue projection screens will be either 4:3 or completely square, and anyway cropping to 16:9 throws away a lot of the image.] The minimum resolution is 640 by 480 pixels, which is what I get out of my DV camera. So I need to crop almost 500 images for every minute of projection video? Manually, each one...?

Luckily, Photoshop has a COM interface, so I can run it automatically from a script. You can't do much with the Photoshop COM interface, but you can run Photoshop Actions. These are recorded sequences of task such as crop to 640x480, apply a slight contrast enhancement, apply a slight blueish hue, save as a processed bitmap.

Did I really say... what year is it... bitmap? That's right. They may be huge, but it's only disk space and I'll chuck them away when I've finished. Successive compression of images can quickly make them look nasty. Bitmaps are lossless, the file format is very simple, and the Microsoft C++ runtime library (I have a Windows laptop with the 2003 compiler) contains the data structures for bitmap files, so I've already been able to learn a few things about them and even generate some noddy images of my own in C++. As for the video, I'm thinking of going really retro and creating Audio Video Interleave (AVI) files. Myself. AVI files are an ancient Microsoft contrivance for combining video, audio, midi and subtitles. As such the AVI file format is reasonably busy, but again it has Microsoft C++ runtime library support. If I only want video, and my source data is bitmaps, I reckon I can cut crap and enjoy slighter greater flexibility over resolution, frame rate etc, automate stuff, and learn something at the same time. All better than if I just use the Windows Movie Maker, which I have not thus far found to be a great tool, but which I still have as a backup in case my C++ video learning experiences reveal a fundamental incompetence in their progenitor.

I'll let you know how I get on. I intend to burn the finished result onto DVD and play it at our next gig at the Plough, which I will organise once I've made some good progress. I have a few more visuals ideas besides this, but it's interesting to know that I can be re-enthused into action by something as mundane as a spate of bad weather.

Recent gigs 2: Darkroom at The Green Dragon, Croydon 27 Feb 08 << | >> Time-lapse photoblography