Young musicians live coding workshop

Hi Pilots

I will be running a week long workshop on live coding with Sonic Pi for young musicians (aged 8 - 12) in two weeks, and had previously offered to share any related documents, for them as wants ‘em. If you spot any holes in this content, please be aware that I am also running a companion course during that same week, for the same group, on basic EDM terminology and practice, via the Ableton interactive learning website. Each afternoon session ends with a keyword quiz and simple live jamming. This will address any ‘missing’ or sparse explanations in the main Sonic Pi workshop.

Google Drive pdf

Edit: I will also endeavour to record audio/video of the classes.

Humbly,

PD-Pi

2 Likes

Hi PD-Pi

This is a terrific resource - thanks so much for sharing! It has helped me fill in some gaps, understand tick in its own line, and things like ‘onset’ for samples, very useful. I have a much better understanding of drum samples and playing with rhythms now.

The only item I didn’t understand fully is ‘divisor’ in the end example, couldn’t find it in the main help, but I guess is in the EDM material?

Also I couldn’t solve the challenge of

floyd = scale(:c2, :aeolian)

play floyd[0] <<make it a repeating pattern of different notes

except by using random:

floyd = scale(:c6, :aeolian)

live_loop :floyd do
use_synth :beep
tick
play floyd[rrand_i(3,5)]
wait 0.5
end

or repeating the ‘play floyd [0]’ lines and calling different notes.
Is there a more compact way, please? (I tried lots of ways, just got error messages)

I bet your 8-12s will work it out :blush: It sounds like a fantastic and very fun opportunity for them!

1 Like

Hi

and thanks for the kind feedback. The control option called divisor is specific to the :fm synth - it simply governs the ratio between the frequency of the carrier (fundamental) oscillator, and that of the modulator (filter/distortion), it’s in the help file under Help/Synths. Given the age and abilities of the students I will NOT be covering FM synthesis in the workshop - could you imagine!?! :smiley:

There are numerous ways to get play to sequence different pitches, too many to list here, but a simple example would be:

# Welcome to Sonic Pi

floyd = scale(:c4, :aeolian)
riff = [0,2,3,5]

live_loop :floyd do
  tick
  use_random_seed 8346
  8.times do
    play floyd[riff.choose], release: 0.3
    wait 0.25
  end
end

PD-Pi

1 Like

Thanks for your help PD-Pi - I bet they’ll be onto FM synthesis in no time :smiley:

#foreheadslap the power of variables…

Hi Pilots,

I thought it would be helpful to provide some reflections on completion of the course, specifically in relation to Sonic Pi.

This was a week long course for 7 - 13 year old musicians, from 9am to 3pm and each day covered the following topics:

  • music notation and theory
  • classical and pop style and form, with Noteflight software
  • simple EDM composing and performing (Ableton Live interactive website)
  • live coding with Sonic Pi
  • ensemble performance

The week concluded with a 45 minute showcase of individual and ensemble pieces. The Ableton website proved most popular with all the students across the 5 days - starting and stopping loops that are synchronised in time and key granted the children immediate results, which we developed throughout the week.

The students were attentive and engaged during the Sonic Pi sessions, with a smaller number of them attracted to this ‘new’ modality of composition and performance (about a third of them brought iPads only). We began with play/sleep and a few Tutorial examples, 4.times do-end, progressing through use_synth/use_bpm, attack/release, drum loops and slicing, and ending with live_loop/if spread(x,y). The manual I had prepared was pretty much abandoned after the first session, it was too ambitious and detailed - the students wanted more immediate results, so I used only the ‘highlights’ from that document.

This is certainly no criticism of Sonic Pi - it’s a critique of how I approached the preparation and delivery of that class. In future versions (we will be doing this again next Summer) I will condense the topics for each session and cover only 2/3 functions per 1 hour slot, use handout cards with code examples and definitions for each topic, and conclude each session with a quiz. I will also use the Ableton model to provide key- and tempo-synced loops within Sonic Pi. In the interim, I will rewatch all of Mr Bomb’s tutorials! (Should’ve done that last weekend :man_facepalming:).

PD-Pi

3 Likes

I imagine the younger students, age 7ish, had not yet developed the abstract reasoning to grok coding, even on a simple level. That’s not a failing of your part, it’s just the nature of human development.

Who knows what future fruit the seeds you planted may bear.

2 Likes

Indeed Harry, thanks. The ‘older’ students, particularly those who had a good grasp of basic music theory and instrumental practice were the ones who took to Sonic Pi more readily.

On a related note, I’ve just dived into the world of Strudel, and I might introduce that platform in parallel to Sonic Pi, with my existing Sonic Pi student.

PD-Pi

1 Like

Yeah, I’ve glanced at Strudel (and Tidal Cycles), and it’s intriguing, but I’m still trying to gain mastery of sonic pi, plus a dozen other projects. I’ll get to it eventually.

Idea: It might be fun to explore prompting ChatGpt to write code to Sonic Pi or Strudel for the older students.

Might be useful, even just to generate boilerplate sketches. But I’m wary of autonomous engines, being a luddite :wink:

1 Like

Inspirational quotes about “AI” + “Live coding” from ChatGpt:

  • “Exploring AI doesn’t mean embracing the hype - it means reclaiming your curiosity.”

    • What can AI do for you?
  • “Why not play with AI?

    • Worst case: it gives you weird lesson plans.
    • Best case: you accidentally reinvent education and still have time to do live coding on Friday ^^”
  • “Teaching + AI + live coding = peak chaos energy. Let’s goooo.”

:slight_smile:

2 Likes

It sounds like a huge success, loads of ground covered, they had fun and it would be very memorable.

What @HarryLeBlanc says: Who knows what future fruit the seeds you planted may bear.

You never know when the opportunity to take part in something inspiring at a young age could be life-changing. If kids have no models or awareness, they won’t know what’s possible.

Sounds like truism about teaching I know, but esp for creative tech the enduring issue is seeing wonderful creativity and wondering how to get there. So planting seeds and steps is fantastic.

2 Likes