Sounding Off

I have always been interested in the generation and playing of music using a computer. In the late 1980s I was working with the BBC B computer and had a network of 24 machines in the classroom where I taught. I used a program called TMS (The Music System) which was originally available on tape cassette ( happy loading not!) but which I converted for use on the Econet System. This enabled the keyboard entry of three part music with a visual score. I wanted to be able to use more parts than this, so I devised a system to synchronise the computers together via the network and was able to enter parts for a Brandenburg Concerto played with an orchestra of 24 computer. It sounded amazing!
I was interested to see on the BBC News Site recently an article about some Exeter University Students winning a prize for doing something similar syncing mobile phones together!

However I digress. I have also recently been looking at playing music on the Raspberry PI. I came across a cool article by Johnathan Kulp which used a bash script to generate and play a short piece of 12 tone music, which he was using for an alarm clock. The script used a music engraver program called lilypond to generate the music which is available on the Raspbian Wheezy distribution, together with the program Timidity to  play a midi file of the score. I have played with the script, which is a superb example of the use of the sed text stream editor, and initially I couldn’t get it to work. It produced a lilypond file, but it contained errors, and I didn’t know enough about the structure of the lilypond file to debug it. The author Jon was extremely helpful, and sent me a copy of a working lilypond file from which I was able to debug the script and get it working. I have since modified it to produce an mp3 file of the music as well as the midi file, and the output of the currrent version are posted on my website here.

I look forward to adding full details on the script, detailing how it works, and also my experiences in installing and using the necessary software to make it work in a day or two. I am  occupied with Ruby Wedding anniversary celebrations this weekend!

For now you can look at the working output on my website, or just admire the picture below, of a typical computer generated score. Be warned that if you press ahead using the original published script in Johnathan’s article, you may run into problems as I did.

tonerow.preview

Advertisements

One thought on “Sounding Off

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s