
Welcome to TunePad
Get started creating music with code. This guide walks through the basics of coding music with Python in TunePad
Level
BeginnerTime
15-20 minutesWelcome to TunePad
TunePad is an online learning platform that lets you create music with the Python programming language. TunePad was developed at Northwestern University with funding from the National Science Foundation. It's free for everyone to use, and we will never sell your personal information.
What is Python Programming?
- Python is one of the most widely-used programming languages in the world.
- It's easy to read and write, which makes it a popular choice for beginners.
- It’s also powerful, which makes it a good choice for professionals.
- Python is used for data science, artificial intelligence, web development, art, music, and video game development.
- Python is a “text-based” language, which means that you type code instead of dragging blocks on the screen.
Try It
Here's an example of what TunePad can do. This Python code plays five notes using a kick drum sound. Press the ▶ button below to hear how it sounds.
Adding Snare Drums
To make this beat more interesting, we can add layers of sound. This cell adds two snare drum sounds to play on beats 2 and 4. Try playing this cell while also playing the kick drums at the same time. In TunePad all cells will synchronize together.
The text that comes after the hashtag symbol (#) is called a comment. It’s a note for human coders to help document their code. Anything that comes after the hashtag on a line is ignored by Python.
Hi-Hats
Let's keep layering sounds! This cell uses a loop in Python to add hi-hat sounds between the kicks and snares.
Bass!!
Don't forget the bass! This cell adds a simple bass line.
Harmony?
In TunePad, you can add as many cells as you want to your project and select from over 170 different instrument. You can change your code while the music is playing to test out different ideas live and in real time.
Arpeggios
To wrap this example up, let's add some arpeggios. Arpeggios are just chords played one note at a time. In Python we can use a for loop to experiment with different patterns of notes.
What's Next?
Start creating your own music! Go to tunepad.com and log in with a gmail account or create a new account with a different email address. Once you're logged in, click on the New Project button. You can also learn more by trying some of these resources:
Song Tutorials
TunePad tutorials give step-by-step instructions for recreating popular songs.

Chicago House Beat
In this short warmup activity, create a Chicago House beat using Python code.
Bad Bunny Remix
Learn to use lists in Python to create chords. Practice using chords together to make progressions.
Bassthoven
Use Python lists to create longer melodies with this remix of Bassthoven by Kyle Exum.
Halloween Theme
Practice using functions and parameters in Python to play repeated patterns. Practice with variables, lists, and operatorsTunePad Puzzlers
TunePad puzzlers are games and challenges designed to sharpen your music+coding skills.

Taylor Swift Mystery Melody
See if you can fix all of the syntax errors to reveal the mystery melody!
Another Mystery Melody
Use your understanding of variables, lists, functions, and for-loops to fix all of the syntax errors and reveal the mystery melody!
Fix Someone Like You
Adele is sad because of the code someone wrote for her song in TunePad. See if you can make the Python program better.
Underwater Mystery Melody
See if you can fix all of the syntax errors to reveal the mystery melody!TunePad Interactives
TunePad interactives are tools to help explore the connections between music and code.

TunePad Beat Composer
Experiment with digital drum sounds and create your own rhythmic patterns for TunePad.
Interactive Drum Kit
Learn the names and sounds of percussion instruments. Get the TunePad command to play different drum sounds.
TunePad Drum Scope
See waveforms for different accoustic drum sounds. Create your own drum patterns and see the resulting TunePad code.
TunePad Piano
Learn note names and values with this interactive piano keyboard.
TunePad Documentation
Ready to dig in? Read the documentation for all of the TunePad functions and modules.