Oxford Laptop Orchestra – Lecture 2 – Control Structures and Timbres

This is number 2 in my series of lectures in music technology and ChucK to the Oxford Laptop Orchestra. Give the first lecture a read before reading this.

Last week we took a look at why, in my opinion, music and programming are natural bedfellows. We talked about what a program actually is and how it relates to Western music notation. We compared structural features of music and computer programs. We pinned down what the words ‘analogue’ and ‘digital’ actually mean, how sound is transmitted, and finally we wrote a program that plays a tune.

This week we’re going to continue down two parallel paths: more about the programming language and the nature of sound in general. The reason for all of this is to give you the tools to think about what you hear, apply analytical thought to the process of composition and creation, and to enable you to conceive of and make your own ChucK sounds.

Read more...

Oxford Laptop Orchestra : Lecture 1 : Music and Programming

I’m very excited to be involved with the nascent Oxford Laptop Orchestra. This project, run by and for students at the University of Oxford, follows on from the work of the Princeton Laptop Orchestra. PLOrk, as its known, and now OxLork, is an effort to reproduce the form of performance embodied by a real orchestra or chamber group — that is, a number of individuals performing in concert, in a certain arrangement in space — with modern advances in electroacoustic music.

Read more...

Sound file Plotter in Go using gosndfile / libsndfile

It’s no secret that golang is my new favourite language. I’ve used it to implement the latest folktunefinder search engine and really enjoyed it.

On an unrelated note, whilst looking at what libraries are available I came across the gosndfile library written by Matt Kane / @nynexrepublic. It’s a wrapper for libsndfile, a C library for reading and writing sound files.

Read more...

Strange error in Go: 'fmt.Println not used'

I had a mysterious error in a project in Go:

myproject/types.go:89: fmt.Println not used

If you declare a variable or import a package in Go, that’s a compiler error. Good thing too, in my opinion. But this one was puzzling. It wasn’t complaining about an imported package, it was complaining about a function within a package. As far as I’m aware, the syntax of Go allows only for importing a whole package (or sub-package) at a time, rather than members of that package (as Python does).

The odd thing was that the error was reported on the last line of the file. The entire contents of that line was:

}
Read more...

Mapping Live River Conditions on the Thames

I love going out on my boat and I do it as often as I possibly can. Unfortunately the recent rain has meant that I’ve been unable to as often as I’d like. If the current is too fast, it’s not sensible or safe to do it.

The Environment Agency has an excellent site which gives live information. But I wanted to put it on a map. Cue an evening of hunting down coordinates of every lock on the non-tidal thames (Google data is surprisingly bad) and writing an app to take data out of the online service and put it on a map. It’s fun putting things on maps.

Read more...

Trouble with local cross-domain Django cookies

I’m working on a Django app which is able to serve content on a number of subdomains. The app has a number of sites, which appear as subdomains of the main domain. There’s some middleware to look things up from the request and do the right routing.

In the wild the subdomains will be done with DNS, but for local development, I’m creating entries in my /etc/hosts such as demosite.local, using .local as my ‘main domain’ locally.  After a colleague integrated some authentication code, I suddenly found I couldn’t log in on my development environment. It didn’t work with either the custom login screen or the Django admin. Very odd.

Read more...