Lesson 11.2: Music Composition with Code

Welcome, composers! Today, you’re going to use code as your musical instrument. You’ll learn how the patterns in music are just like the loops in programming, and you’ll use this knowledge to compose your very own original song.

What You’ll Learn

By the end of this jam session, you’ll be able to:

  • Use programming blocks to create an original piece of music.
  • Explain how musical concepts like rhythm and melody are similar to coding concepts like loops and sequence.
  • Combine your song with cool visuals to create a multimedia performance.
  • Feel proud of the amazing song you composed yourself!

Your Recording Studio Plan

The Code Behind the Music (10 minutes)

  • Let’s listen to a simple song and find the patterns. Can you hear a repeating drum beat? That’s a loop! Can you hear the sequence of notes in the melody?
  • We’ll discover that music and code both speak the language of patterns and sequences.

Composing Your Masterpiece (30 minutes)

  • Time to open the recording studio and start composing!
  • Your mission is to create a short, original piece of music. Keep it simple and achievable!
  • Ideas for your song:
    • Create a cool, repeating drum beat using a loop.
    • Program a simple melody with a sequence of different notes.
    • Combine your beat and your melody to make a full song!
  • You can also add a dancing character or a changing background that moves to the rhythm of your music.

The Grand Concert (10 minutes)

  • It’s time for our class concert! Let’s share the amazing music we created.
  • We’ll be a supportive audience and cheer for our fellow composers.
  • Let’s celebrate all the different musical styles we heard today, all created with the power of code!

Your Musician’s Toolkit

  • Your device with Scratch Jr. (with speakers and sound on!)
  • Headphones for when you’re focusing on your composition
  • A planning sheet to help you write down your musical ideas

How to Be a Master Composer

  • Did you successfully use loops and sequences to create your song?
  • The Creativity Test: Your song is your unique creation! We’ll be listening for your personal style.
  • Your final performance will be a fantastic showcase of how you can combine logic and creativity to make music.

New Tech Words to Master

  • Composition: A piece of music that you created and wrote yourself.
  • Rhythm: The beat of the music; its pattern of strong and weak sounds.
  • Melody: The main tune of a song; a sequence of notes that is musically satisfying.
  • Music Technology: Using tools like computers to create or perform music. You’re a music technologist today!