April 2020

A cheap and cheerful handbell ringing robot

Three weeks ago, Graham Firman posted on BellBoard and YouTube about a handbell-ringing robot he has made. Subsequently he has written an article for the Ringing World about its construction, including the fact that it is controlled from Abel (I didn't know it, but apparently Abel can send signals on an output port when it is ringing the computer-generated bells).

We've got a couple of programmable Lego sets, so I thought of trying to build something similar. I got as far as finding a Python interface to the programmable Lego Mindstorms system, and thinking a little bit about how to attach the microbells to the motors, but didn't follow through (concentrating instead on publishing the handbell book).

However, this week Dorothy told me that she had to do a STEM project for school and she wanted to finish the Lego ringing robot. So I spent part of the day helping her, and we ended up with something that can ring the microbells.

There's a BellBoard report of Plain Hunting on Six here, and a YouTube video here. I must confess that I hard-coded plain hunting on six, rather than writing something general that will ring any method from place notation. That can be a project for the weekend. Also I think the timing needs a bit of work. Clearly the whole thing is less robust than Graham's robot, but on the positive side, it only took half a day to get it working reasonably well.

Lots of new handbell ringers

During the coronavirus lockdown, BellBoard is dominated by handbell performances. There are also a few performances on newly-developed remote ringing websites such as ringingroom.com. Real handbell ringing, however, is restricted to people who have ringers and bells in the same house. Some people are lucky enough to have 6-bell or even 8-bell bands on the premises, but there's also a lot of 4-bell ringing.

Since the lockdown started, I have counted more than 40 bands publishing handbell performances on BellBoard. Many of these are by people who we don't normally see ringing handbell quarters or peals, and there are some footnotes indicating that family members are being driven (or dragged) to take up handbell ringing because of the lack of other things to do.

It would be great if some of these new handbell ringers keep it up when life returns to normal. Clearly there are a lot of people out there with bells and the ability to ring them, and they will have the opportunity to step up from minimus to minor and beyond when it becomes possible to get together with non-family members again.

If any of you are reading this blog: what you need to progress beyond minimus is "Change-Ringing on Handbells Volume 1". It starts with plain hunting on four, then covers Plain Bob Minimus and proceeds to plain hunting on six and Plain Bob Minor.

The making of "Change-Ringing on Handbells"

Now that we've published our book, I want to write about some aspects of how we produced it. Maybe you will find them interesting.

Using LaTeX

We produced the book using LaTeX, a piece of software that I use for most of the writing I do in my day job as an academic computer scientist. The main characteristic of LaTeX is that markup commands are used to indicate chapters, sections and so on, and then an overall style determines how the markup is converted into detailed formatting. In this respect it's similar to using HTML plus a style sheet for producing documents for the web. Actually LaTeX predates HTML by several years, and in turn builds on previous markup languages. LaTeX is also good for defining figures and tables, with all the positioning and cross-referencing done automatically. The output from LaTeX is a PDF document.

The book design

The overall style is based on that of the book "The Visual Display of Quantitative Information" by Edward Tufte, which has been reproduced as a LaTeX style for others to use. Tufte's book style has wide margins which are used for footnotes, marginal notes and small figures; larger figures can either stay within the text or extend into the margin. Check out its Amazon page and try the "Look Inside" feature, and you will see similarities to the sample page on the right. The wide margins are particularly well suited to a book about ringing, because they are convenient for placing method grids which are naturally tall and narrow.

The text

The whole book was Tina's idea, and she drafted a lot of text before I joined in. We have both worked on all parts of the book since then, and it was useful to be able to comment on each other's draft sections. I think we started in 2013 or earlier - certainly Tina was working on it while we were away at a summer school that I was running in Croatia in 2014. I have a memory of sitting at Tina's parents' dining table writing about compositions of Plain Bob Minor, which I think must have been in either 2013 or 2015 (we go there in odd-numbered years).

The book started as a much longer draft, before we decided to spit it into two volumes. So we have a lot of draft text for Volume 2 already, which is one reason why it should be much quicker to produce it.

The method diagrams

There are several online resources for generating method diagrams, and for the blog I sometimes use Martin Bright's method printer or copy lines from www.ringing.org or CompLib. However, there are advantages to having complete control over the drawing of diagrams, so I used my own software to produce all the diagrams for the book (and many for the blog). Instead of developing a standalone program that can be called with parameters to generate an individual diagram, I have one Java program that generates all the diagrams for the book. The way I do this allows the code for each diagram to be expressed in quite a convenient form. For example, the diagram on the right (the second lead of Double Bob Minor) is produced by the following code.

new Diagram("Double Bob Minor") .
fontsize(14) .
start("156342") .
rows() .
thickness(2) .
line(1,Color.red) .
line(5,Color.green) .
line(6,Color.blue) .
save("Figures/Chapter9/DoubleBobMinor-lead2-5-6");

This might not look like typical Java, but each . is a method call (in the Java sense) which returns the same Diagram object so that the next method can be called on it; at the end, the save method processes all the options that have been specified along the way. This kind of approach is known as defining an embedded domain-specific language: in this case the domain is method diagrams, and embedded means that it all sits within an existing programming language, in this case Java.

When we show a whole course of a method, each lead is generated as a separate diagram and then they are gathered together using LaTeX features. I don't remember exactly why I decided to do it that way - I think in some cases it was because we wanted different captions for each lead. In Volume 2 there are going to be more diagrams of complete methods, so I've extended the diagram language to generate all the leads in a single diagram.

The cover

The cover design is based on a picture of one of our Whitechapel bells. Tina used the GIMP image manipulation program to polish it up and give it a transparent background, so that it goes together nicely in the cross pattern. The entire cover is generated by a Java program, which is parameterised by the cover dimensions, the spine width, the size and position of the text box on the back, and so on. This makes it easy to, for example, shift or scale the bell pattern so that it fits in nicely with the overall design.

Publishing with Amazon

There are two versions of the book: a paperback and a Kindle edition. Both are published through Amazon. For the paperback edition, Amazon use a print-on-demand system, so there are no stocks of printed books. The publication process is very easy - basically you upload a PDF of the book's content, and another PDF of the cover, and that's it. The Kindle edition is a facsimile of the printed edition, which means that you can't resize the text as you can with typical Kindle novels. But it means that all the diagrams are positioned exactly as we have them in the printed edition. Cross-references within the book become hyperlinks, and external website references are also hyperlinks so that when you are reading it on your tablet, you can follow the links and your device should launch a web browser.

The PDF for the Kindle edition is a little different from the PDF for the paperback edition. This is because the paperback edition follows the convention of starting every chapter on a right-hand page, but for the Kindle edition it's better not to have the blank pages that sometimes result from that convention. LaTeX makes it easy to switch between these two modes and produce each version of the PDF when required.

It's amazing how convenient Amazon have made it to publish a book. I remember back in the 1980s when people started talking about desktop publishing, which really meant that there were word processors that could handle graphics as well as text. But now you can produce an entire book, with Amazon dealing with all the printing, payment and delivery, from the comfort of your own laptop. It still takes a lot of work to write the text, of course...

Change-Ringing on Handbells: finally published!

We've done it! We've finished the handbell book, and it's available on Amazon as a printed paperback and as a Kindle edition. The book has its own page within this site. There were some last-minute changes, and formatting the Kindle edition caused a few headaches, but it's finally done.

There's a sample page at the bottom of this article, from the Plain Bob chapter. The real thing is sharper because it hasn't been resized for the blog. The Kindle edition has exactly the same page formatting as the printed edition, so all the diagrams are as they should be. We've tested it in a previewer and on a small iPad, and it looks good. According to the website it's available for Kindle Fire devices and in the Kindle app on tablets - it seems that you can't put it on a black-and-white Kindle.

Now that the coronavirus situation is encouraging more people into handbell ringing, maybe they will want to keep it up, and the book should be just what they need to progress beyond Plain Bob Minimus when they are allowed to get more ringers together.

Meanwhile, the lockdown is giving us much more time to work on Volume 2, which we hope won't take another 7 years to complete.