< Music Lab: Jam Session

Lesson 1: Music Lab: Jam Session

45 minutes

Overview

In this 45-minute activity, students will use Code.org’s Music Lab to explore how creativity and coding come together to make music. By creating their own songs using coding concepts like sequencing and decomposition, and configuring an AI Beat Block, students will learn foundational computer science concepts. They will also be introduced to careers that intersect with tech and music through inspiring career spotlights from professionals in the industry, including at Amazon Music.

Students will gain confidence in their creative abilities and begin to see coding as a tool not only for problem-solving but also for artistic expression. The goal is for students to discover careers that combine music and technology, where creativity is key, and to feel a stronger sense of belonging by seeing themselves reflected in the professionals’ stories and backgrounds.

Purpose

This lesson is designed to show students that coding is not just about logic and algorithms—it's about creativity. By using Music Lab, students will create their own music and learn coding basics like sequencing, loops, and functions. They will see how the problem-solving process coders use is similar to the creative process musicians follow. By the end of this lesson, students will feel empowered to explore tech-related careers, knowing that creativity and code can work hand in hand.

CSTA K-12 Computer Science Standards (2017)
    • 1B-AP-10 - Create programs that include sequences, events, loops, and conditionals.
    • 1B-AP-11 - Decompose (break down) problems into smaller, manageable subproblems to facilitate the program development process.
    • 1B-AP-12 - Modify, remix or incorporate portions of an existing program into one's own work, to develop something new or add more advanced features.

Agenda

Objectives

Students will be able to:
  • Explore careers in music and technology and see themselves as capable of pursuing these fields.
  • Identify how coding and music share similar patterns and processes.
  • Understand computer science concepts like sequencing and decomposition.
  • Use coding blocks to sequence sounds and create a song.

Preparation

  • Test out Music Lab to ensure familiarity with the platform.
  • Review the introduction video and practice walking students through the steps for using sound blocks, the AI Beat Block, and functions.
  • Prepare discussion prompts that help students connect coding and music creation.
  • [Optional] Find the resources you need to plan, implement, and celebrate the Hour of Code at your school here!

Links

Heads Up! Please make a copy of any documents you plan to share with students.

Vocabulary

  • Artificial Intelligence (A.I.) - A computer program that takes in data, learns patterns from that data, and then makes decisions based on what it has learned.
  • Functions - A named section of a program that performs a specific task.
  • Music Producer - Someone who helps create and mix songs by bringing together singers, musicians, and technology to make the track sound great.
  • Product Manager - A person who helps create new products, like apps or games, by making sure they meet the needs of users.
  • Sequencing - Putting commands in the correct order so computers can read the commands.
  • Software Engineer - Someone who writes the code that makes apps, games, and websites work. They are like the builders of the tech world.
  • UX Designer - A person who designs how products look and work, making sure apps, websites, or games are easy and fun to use for all users. UX stands for User Experience: how a person feels and interacts with a product.

Teaching Guide

Getting Started

Music Filtering

This tutorial features songs from popular artists. To get a preview of the song list in this tutorial, check out this Spotify Playlist (all ages). We are using radio-safe versions of all songs and for students under 13.

General Support

  • Encourage students to collaborate with their peers when stuck.
  • Remind them to read instructions and hints carefully.
  • If they finish early, encourage them to continue exploring their project and adding new elements.

Warm Up (2 minutes)

Remarks

Today, we're going to explore something really exciting—how music and coding are connected. Did you know that both music and coding rely on patterns and sequences? When musicians create a song, they use patterns of sounds to make melodies and rhythms. Coders do something very similar—they use sequences of instructions to make a computer do what they want.

Music has always been a way to connect people, and with technology, it's even easier to share and discover new music from anywhere in the world. Behind the scenes, technology helps bring music to your fingertips.

In this activity, you’re going to use code to remix music from popular artists as well as create your own music. And along the way, you'll meet some amazing professionals who have combined their love for music and technology to build exciting careers. These professionals are just like you—they started with a passion for creativity and coding, and now they're using it to shape the future of music. Let's get started!

Main Activity (40 minutes)

Intro to Music Lab: Jam Session

In this introductory video, students will see how coding is used to create music and explore how professionals at Amazon Music combine creativity and technology. The video will highlight real-world roles like software engineers, UX designers, and music producers, inspiring students to create their own music with code.

Choosing sounds

In this section, students will begin coding by selecting and sequencing sounds to create their own beats. Using the drag-and-drop interface of Music Lab, students will learn how to add blocks of code that trigger different sounds when activated. Encourage students to experiment with different sounds from the library and sequences, building confidence with the basic coding tools.

Playing multiple sounds at once

Now, students will level up their music by learning how to play multiple sounds at once. They’ll explore how to layer sounds to create harmonies and more complex musical arrangements. Encourage students to explore different sound combinations and notice how their sequences change when sounds play together.

Use AI to generate new beats

In this section, students will be introduced to the AI Beat Block, where they can use artificial intelligence to help complete their songs. The AI listens to their starting beat and predicts what should come next, providing students with new ideas for their music.

Encourage students to play with different temperatures and see how the AI responds to their input.

Content Corner

AI Beat Block Key Concepts:

  • A.I. Bot was trained by listening to lots of different beats.
  • Based on your starting beat, A.I. Bot continues and fills in the rest.
  • Low temperature keeps AI predictions similar to the original beat.
  • High temperature creates more variation and surprises.

Use functions to build a song

Functions in coding are like the sections of a song (intro, chorus, verse). In this section, students will learn how to organize their music into functions, creating reusable blocks of code to control different parts of their song.

Time to jam!

This level allows students to experiment with everything they've learned. Students will choose a song to remix and use the coding blocks and functions to create their own music masterpiece. This is their chance to apply all of the coding concepts they've learned in a creative way.

Encourage students to explore their creativity and apply coding skills in new ways, remixing songs to make them their own.

Celebrate! (3 minutes)

Celebrate the students' accomplishments! At the end of the activity, students will have a number of extension opportunities. They can:

  • Share their creation with their friends and family.
  • Keep playing to reflect on what they've learned and practice additional skills.
  • Further explore career paths in music and technology with Amazon Music through a free virtual field trip.
  • Receive a certificate for completing the Hour of Code.
Creative Commons License (CC BY-NC-SA 4.0).

This work is available under a Creative Commons License (CC BY-NC-SA 4.0).

If you are interested in licensing Code.org materials for commercial purposes contact us.