Sonic Pi plays Church Bells!


I have added an article and program which generates a sample based Chimes voice for Sonic Pi, and uses it to play a Quarter Peal of Church Bells.

The program is similar to the one I did for a harp based voice. You can read about it and download the program and the folder of samples here.

You can hear the start of the Peal here (The whole thing lasts over 15 minutes!)

Sonic-Pi and the glass harmonica: a project completed

After writing yesterdays article on the Musical Instrument Museum in Brussels, I decided to have a go at creating the glass harmonica sounds with Sonic Pi, and ended up being able to play Mozart’s Adagio in C which he wrote especially for the instrument. Not bad when the whole thing is generated from the :ambi_glass_rubbed sample supplied with Sonic Pi

You can read the article as to how it was done, and down load the program in the accompanying article here.

It also contains a link to the an audio recording of the program output and to a youtube video of Sonic Pi playing the piece here.

A week for reflection

You may have noticed that I haven’t posted as much this last week. That is because I had an enforced absence from my Raspberry Pi, my Mac and Sonic-Pi whilst I went away for a few days to visit friends in Brussels. This was a very interesting city, and one of the highlights was to visit the Musical Instruments Museum or MIM which boasts a collection of over 8000 different musical instruments gathered from all over the world. The museum was founded in 1877 when it brought together two substantial collections of instruments, one collected by Francois-Joseph Fetis the first principal of the Brussels Royal Conservatory, and the other which was a present to King Leopold II from Rajah Sourindro Mohun Tagore. Over the years the collection has been added to to reach its present size. Since 2000 it has been housed in an old department store “Old England” designed in 1774 and a very prestigious Art Noveau building.

What makes the museum particularly attractive to visitors is that there is an extensive audio tour set up. You stand by an instrument and it plays you a sample, sometimes quite lengthy of what it sounds like, both as a solo instrument, and in a typical ensemble.

In the basement it has a collection of mechanically operated instruments and early electronic ones as well, such as the Theremin and Ondes Martenot which produces an eery haunting sound. I purchased a book describing some 50 of the instruments accompanied by a cd of them being played.

One thing that made me reflect: I had spent several days before I left creating a version of Rimsky-Korsakov’s Flight of the Bumble Bee to be played by Sonic Pi. I wanted it to sound as authentic as possible, so I created two instrument voices, one a piano and the other a xylophone using audio samples of these instruments as the basic source. Samples were available across the instrument range for every fourth semitone. By using these samples and playing them either at a slightly higher or lower rate it was possible to set up a sample for every note, and then to write some code for a command similar to the play command in Sonic Pi to play these notes.
Thereafter it was merely!!!! a matter of typing in all the myriad of notes  in the piece, and then debugging the inevitable mistakes which occurred in dealing with the many chromatic runs. At times I got fairly exasperated with it but the end result was I think well worth it, although I had to do some shoe horning to get it it fit into the 9000 odd character limit for a Sonic Pi workspace which I discovered whilst doing this.
Anyway to get back to the point, in the museum were several mechanically operated instruments like the Componium, which is a bit like a pipe organ whose valves are controlled by pins and staple shaped pieces of metal hammered into a rotating wooden drum. I took a picture which shows this below.


Next time I feel grumpy about typing large numbers of notes into Sonic Pi I will remember the skilled craftsman who created the “coding” of notes on this drum. A far more laborious and painstaking task, and one which involved much more drastic action with pliers if you make a mistake than typing notes into Sonic Pi. The craftsmen who developed instruments like these deserve our admiration for their perseverance and faith in the final outcome.

As a final comment, I must also mention the glass harmonica built around 1786, consisting of a series of concentric glass bowls, mounted on a wooden rod, and rotated by a pedal. The bowls had water inside and were played by rubbing wet fingers across their edges as they rotated. By a happy coincidence we have such a sample in Sonic Pi 2. The ambi_glass_rub sample. I have had a play with this and have managed to code Frere Jaques using it earlier in the year. Mozart wrote music for the instrument, and who knows perhaps I will spend further time with it in the future.
So if you are ever in Brussels with time to spare, I thoroughly recommend a visit to the MIM. If you are interested in music you will find it a fascinating experience.

Video of Flight of the Bumble Bee played by Sonic Pi 2


I have put together a small video featuring a performance of Rimsky Korsakov’s
Flight of the Bumble Bee, which, as mentioned last week, I have transcribed for Sonic Pi 2. It features two sample-based audio instruments, one producing a piano sound, the other a xylophone. These give a fairly realistic sound in the piece. More details in my previous post here.

The video is on my channel on youtube here