Translating music or live coding?

Just wondering what teachers think of this? I find many students like to use SP to take a song they like and “translate” it so that it’s played with SP.

I myself prefer that they do something original and emphasize the live coding aspect: changing beats, synths, bringing loops in and out, etc.

But I’m wondering if I’m missing something important in what students want to do. Context is that I teach computer science, not music. So I want them to learn to CODE.

Any thoughts from other teachers? TIA!

I would lead by example and show something cool you can only do with loops and randomness. Like Sam’s “Haunting Bell” example. Then use that as a starting point to talk about loops and randomness (I find that one supports the other quite nicely). Show them how a lot of songs repeat the same beat / lead a lot, and how it’s more effective to simplify it into loops.

On the other hand, if the students are exploring all of these concepts and they’re having a blast translating songs, let them. Learning is much more rewarding when they’re playing around on their own. Show them cool stuff, but let them explore on their own.


I think both possibilities do not have to contradict each other.
You can start and translate a song or maybe just a simple melody, or you take just a little part of a complex song and then use it to manipulate the notes or synth live.

I’m new to Sonic-Pi, but I taught primary school kids Scratch and learned that it’s best to let them do just what they want. I started the lessons explaining the basic concepts like loops and variables one at a time and offered them little assignments on cards they could pick. Most of them started playing the games or drawing sprites. It bothered me in the beginning, but they had fun while playing around with Scratch, which I settled for in the end :wink:

1 Like

I think that “translating” a song could actually be a good problem to solve in code! Depending on the song but most popular hits have repetitive sections and a simple structure. If the students can figure out ways to “abstract out” the repetitive sections of a song, for example by writing a function that is called at specific times, then the action of translating a known song to music can be a constructive one from a computer science point of view. It gives a clear “problem to solve” that is not always obvious when you try to create something from scratch…


Great idea, and thanks for sharing.