Based on the "Frere Jacques" project from the Starting from Scratch guide by Jeremy Scott. See https://www.rse.org.uk/wp-content/uploads/2016/11/SFS-2-Tutor-1.pdf.