I’ve been teaching my first ever lessons with Sonic Pi this week. Sonic Pi blurs the distinction between learning / teaching coding and music.
I’ve been wanting to do this since I had my world turned slightly upside down by meeting its creator Sam Aaron at BETT. Why teach coding theory with dry numbers when you could teach them with, er, banging beats? M’lud.
I had a try with Year 7 and Year 8 this week. I’m not sure how far we will get – I have some other things like HTML I really need to wrap up with Year 8, and I need to get a clearer idea of my goals with Sonic Pi. My Year 8s had not done ANY coding at all yet, the Year 7s have done some Python. I’ve set a brief multiple-choice quiz for homework about what Sonic Pi can do as an assessment took – with a free-text box for pupils to tell me what they liked and didn’t like. I also need to be firmer about getting them to save their code in our shared area so I can listen to their music.
So far, almost all of them seem to have enjoyed it, and there were some great moments of joy when they stumbled upon something new (
use_synth :mod_fm, for example!).
We had a few audio glitching problems with running it on the virtual desktops in our ICT classroom (Citrix XenDesktop hosted on a VMware server) – we found some synth sounds were better than others, and it helped to have all other apps closed.
Here are my slides for my first – and possible second – lesson. In any case, it makes a great filler when other classes are away and we need to do something that’s not, currently, core to our curriculum. Though that could change…
UPDATE – Day 3 in the Sonic Pi classroom
Taught 3 lessons of Sonic Pi to Years 7 & 8 today. After watching bits of the live coding video (in the slides), some of my Year 7s now want to know if Sam Aaron is available for parties!
More VDI glitching problems on our Citrix desktops. Of course it was ok when I tested it last term, but get 23 students all logged into the the same VM Ware server, at the same time, all playing music – and it can stutter. Not sure what I can do about this… I also had a £30 Raspberry Pi hooked up to the projector, which of course played flawlessly. Hmmm…
Some pupils totally got it and are hooked, wanting to do it for several weeks in class and try it at home. We did a wee bit of live coding by turning the simple Frère Jacques melody into a canon by hitting play a second time at the right point – nimble young fingers changing the synth sound in between.
My worksheet is confusing – something I often struggle with is how to set out code. If you write out ALL the code for each step it takes up too much space, but if you do it line by line they get confused. My worksheet is a muddle of both approaches, and several students got a bit lost – needs work. I want it to be no longer than 2 sides of A4 though.
So far I think it’s enough of a hit that we’ll do at least 1 more week in Year 8 – I only see 1 Year 7 class next week, so they’ll get a bonus lesson. Some want a lunchtime Sonic Pi club – which may be a way forward!
Update to the update
I taught Sonic Pi almost every day this week. I will do a few more lessons next week and I think we’ll stop at the moment for Year 7 but may continue for Year 8 depending on whether I can plan some suitable end-points. I need to do something with numbers and arrays but haven’t worked out what yet.
The VDI causing glitching is a major issue – my pupils were good sports and stuck with it, and some of them downloaded Sonic Pi at home and excitedly tell me that they have made some ‘wicked mash-ups’ – someone younger than me might be able to explain what that means…
I also added the video of the amazing Wintergaten Marble Machine as a starter, after Sam tweeted it saying that if you could peer inside the Sonic Pi code, you’d see something like it. The classes I showed it to were mesmerised and it was a great way of settling them at the start of the lesson.
I did some straw polls to see which classes wanted more Sonic Pi next week – worst response I got was about 50%, most of the classes almost every hand went up. And it’s certainly more fun than coding a bubble sort…
I can noodle away happily with Sonic Pi for hours – you can hear some of my own live coding efforts here… the code’s on the Soundcloud page.