Following on in my series of additional sample based voices for Sonic Pi, this time it is the turn of a set of Chimes. The first part of the program, dealing with setting up the sample based voice is almost identical to that used for the harp voice in my previous project here. For that reason I will not describe the program operation in detail. As before, the samples are taken from the Sonatina Symphonic Orchestra
Having set up the voice, I wondered how best to exploit it in demonstrating what it can do. I decided to emulate a set of church bells ringing a peal. I did not know much about campanology, but a quick look at wikipedia showed that it is a fascination subject. In fact a future project might be to develop programs to calculate some of the “changes” that can be done, although there are already some good programs out there to do that for you. It is in fact a vast subject. In the event I found a Bristol Surprise Major Quarter Peal which lasts about twelve and a half minutes, and I set up the chimes to use the same frequencies as those of the bells in my local Parish Church (St. Peter’s Oundle). The Peal consists of 231 changes in which the order in which the 8 bells are rung changes each time. I won’t go into the rules governing these changes, but there are plenty of sites which can give you information if you want it. I got the details of the peal form this page
The bells are numbered from 1 (the treble bell) down to 8 the Tenor bell) and the 231 8 digit numbers were stored as a continuous string ch
The program traverses this string in a loop and uses it to play the required bell numbers in turn. Unlike the harp and previous voices I have used, it was appropriate in this case not to truncate the sounding of the bells too much. I set the sustain value of each note to 0 and the release time to 1 second. This dampened it a bit, but I found that playing the sample totally unhindered rang for too long for the speed at which I wanted to ring the bells.
One final touch. I introduced a bit of human “wobble” in the timing of the bells, which I think makes it sound a little more realistic. This is done by using
sleep 0.3+rrand(0,0.2) between the bells, instead of sleep 0.4, so that the bells are not exactly timed correctly.
The program is listed below
You can download a zip file of the program and a folder containing the chimes samples here
You can listen to the start of the Peal recorded from Sonic Pi here