Sign in to save

Bookmark this page so you can find it later.

Sign in to save

Bookmark this page so you can find it later.

A beat-maker is a program that lets you turn sounds on and off in a repeating rhythm pattern. In this project, students can code a 16-beat drum sequencer with four tracks: Kick, Snare, Hat, and Clap. Each square in the grid represents one step in the loop, and clicking a square decides whether that drum sound plays.

This matters because it connects coding, music, patterns, and timing in a fun project students can hear right away.

A simple sequencer works by moving a playhead from step 1 to step 16, then looping back to the start. At each step, the program checks which drum tracks are turned on and plays those sounds together. Tempo controls how fast the playhead moves, while the pattern controls the rhythm.

Students can use loops, lists, variables, and conditionals to build a Scratch-style music tool that feels like real music production software.

Key Facts

  • A 16-beat loop has 16 steps that repeat in the same order.
  • Tempo is measured in beats per minute, written as BPM.
  • Time per beat = 60 / BPM seconds.
  • At 120 BPM, one beat lasts 60 / 120 = 0.5 seconds.
  • A sequencer uses a loop such as repeat 16 or forever to move through the beat grid.
  • If grid[track][step] = on, then play that drum sound at that step.

Vocabulary

Sequencer
A sequencer is a program or device that plays sounds in a set order over time.
Beat Grid
A beat grid is a table of steps where each cell can be turned on or off to make a rhythm pattern.
Track
A track is one row of the sequencer that controls one sound, such as Kick, Snare, Hat, or Clap.
Tempo
Tempo is the speed of the music, usually measured in beats per minute.
Loop
A loop is a section of music or code that repeats again and again.

Common Mistakes to Avoid

  • Forgetting to reset the playhead to step 1 after step 16 is wrong because the sequencer will stop or try to read steps that do not exist.
  • Putting all drum sounds on every step is wrong because it makes the rhythm crowded and hard to hear clearly.
  • Using the same variable for every drum track is wrong because the Kick, Snare, Hat, and Clap need separate on and off patterns.
  • Changing the tempo without updating the wait time is wrong because the visual playhead and the drum sounds can fall out of sync.

Practice Questions

  1. 1 A beat-maker is set to 120 BPM. Using time per beat = 60 / BPM, how many seconds should the program wait between beats?
  2. 2 A 16-step loop has Kick on steps 1, 5, 9, and 13, Snare on steps 5 and 13, Hat on every odd-numbered step, and Clap on steps 8 and 16. How many total drum hits play in one full loop?
  3. 3 A student says the snare should play on every step to make the beat stronger. Explain why leaving space between sounds can make a rhythm easier to follow.