Design and build your own music app, from a blank page to saving beats in RockBlocks.
Your app, your idea. It could be a drum pad, a beat maker, a rhythm game or a beat of the day. Name it: change the h1 and the paragraph in index.html to say what it does.
Add at least three buttons, one for each thing someone can do in your app. (Stuck? Our example, Beat Buddy, has Kick, Snare and Hihat pads that build a beat as you tap.)
💡 Who uses this? Software engineers take an idea from a blank page to something people use: plan it, build it, make it look good, ship it. This is your first app from start to finish.
index.html is what's on the page, style.css is how it looks, app.js is what it does (the frontend), and server.py is your Python backend. It keeps running between requests, and anything in the store dictionary is saved even after a reload.
rb.play("kick")Play one drum right now. rb.play("snare", 2) plays two quick hits.rb.playBeat({ kick: [1, 5], snare: [3, 7] })Loop a whole beat, like the course's drum commands. [3, 2] means beat 3 with 2 hits. Add a tempo: rb.playBeat(beat, 120).rb.stop()Stop the beat.await rb.server({ action: "save" })Send a request to your server.py's handle(request) and wait for its answer.rb.saveBeat({ kick: [1, 5] })Open a beat in RockBlocks, in a new tab.rb.msPerBeat(120)How many milliseconds one beat lasts at that tempo — handy for setInterval.Drums: crash, ride, openhat, hihat, hightom, tom, lowtom, rimshot, snare, kick
console.log() and your server's print() show up here.