Ideas for interactive lesson with middle school bands

Hi all. In a week I’ll introduce bands (the full kind, with woodwinds, brass, and percussion) in the local middle school to programming music with Sonic Pi. We’ll be in the band room and they’ll have their instruments. I want to make the session interactive, and I’m looking for ideas. One is to write a program that plays short sequences of notes for the kids to play back, in time, in the next measure. Another is to have them improvise over something coming from Sonic Pi. What else can we come up with?


Since they’re all in a band already, you could make them start out by coding an existing piece of music in Sonic Pi (I’m assuming they can read sheet music). If you want to focus on the programming aspect, you can then coax them into streamlining their code by making functions and such. If you want to focus more on the music, then you can introduce them to the live coding aspect with live_loops and such.

1 Like

I had sessions with the first two bands this morning. It went well. It was fun showing them a visualized (and heard) c3 on the left channel and a c4 on the right, and getting them to see how doubling the frequency makes an octave.

We looked at this program a bit. I had one of the students play the bass line on the piano (from a music book) first.

For one of the bands wi did some call and response, but pulling notes from a full octave was a bit challenging for them.

I made lots of mistakes and forgot the syntax of some things. I’ll practice more before the next sessions, probably next week. Kids asked me, “make a flute”, or “make a trumpet”, but I didn’t know how. How can we? It’s timbre (patterns of overtones) plus ADSR, right?

Hopefully there’ll be some students downloading Sonic Pi this afternoon.

Hello dcbriccetti,

I think Sound-on-Sound Synth Secrets would be useful to you, it has articles for the flute:

Start with the pan flute there.

Hope, it helps you :slight_smile:

Thanks, @minced_mind. That’s very helpful. I’m generally familiar with the physics. How would you make a flute or a trumpet with Sonic Pi? One simultaneous synth play for each harmonic, with decreasing amplitudes?

Eli produced a flute sound here

Thanks @robin.newman, but hmmm, maybe making somewhat realistic natural instrument sounds is outside the scope of Sonic Pi?

I tend to use sample generated sounds for instruments. For flute you can get away probably with one sample and use of rpitch: opt. I also have done code to utilise samples from the Sonatina Symphonic Orchestra (SSO) , with Sonic Pi choosing the best sample to use for each note.
here is simple code using a flute sample playing :ds5

define :plf do |n,d,f=0.5,vol=1|
  sample "~/Desktop/samples/Rounds",2,rpitch: note(n)-note(:ds5),start: 0.002,sustain: d*f,release: d*(1-f),amp: vol
live_loop :flute do
  plf scale(:c4,:major,num_octaves: 2).choose,0.2,0.5
  sleep 0.2

You’ll have to find your own sample eg from SSO. I started at 0.002 with this sample to cut out some breathyness.

Hi again,

for realistic physical instruments you won’t have much luck with typical sound synthesis because it get’s too cumbersome (huge number of oscillators needed with complex interaction). Physical modelling is a better approach here. I think the best approach here is most likely using samples like from the VSCO.


That works well!

Thanks to you all.