First post for a little while. Amongst other things I’ve been taking a look at Sonic-Pi, a program devised for pupils in schools to introduce them to programming ideas via a musical synth program. You can generate tunes and sound effects using the program, and I have used it to code up several pieces of music which are held in a gist here https://gist.github.com/rbnpi
So far I’ve produced two versions of Frere Jaques as a round, a Bach Minuet and renditions of three Beatles songs.
The program is included in the latest version of Raspian or you can download it to a Pi using suod apt-get update followed by sudo apt-get install sonic-pi
There is a website with further resources here http://www.cl.cam.ac.uk/projects/raspberrypi/sonicpi/