Polyphonic gated synth for Sonic Pi 3, works on a Pi3

Last August I published a program which gave an 8 note polyphonic gated synth for Sonic Pi. It was resource hungry and only worked on a powerful computer, and wouldn’t work on a Raspberry Pi3. Now, following on from a thread here I have developed a simpler version which works well on a Raspberry Pi3 with Sonic Pi 3 and suitable midi input controller/keyboard.
There is a full article

and an accompanying video

You can download the code here