Hambone & Machine Learning
Students in grades 6 and up will learn about the Black American tradition of Hambone (originally called Pattin' Juba) and explore how machine learning models learn from different actions. Wearing a wristband equipped with a micro:bit, students can perform a series of hambone actions by patting the legs, chest, and cheeks. As they perform, the micro:bit records movement data such as acceleration.
Through this activity, students will discover that machine learning does not "understand" dance in the way people do. Instead, it identifies patterns within movement data. By connecting AI with the culturally relevant practice of the hambone, students will learn foundational concepts such as data collection, labeling, training, testing, iteration, pattern recognition, and model accuracy while exploring how human creativity and embodied knowledge can become meaningful sources of data for intelligent systems.
Supplies
CreateAI (online)
Wide elastic band, felt or similar material (to create a wristband)
Hot glue gun and glue sticks
Scissors
Fasteners (esp. snap buttons)
micro:bit v2.2 and accessories (USB cable, battery holder, 2 AAA batteries)
cardboard battery holder template (comes with most micro:bits)
Optional: needle and thread
Cultural Context
The Hambone (or Pattin' Juba) is an energetic Black American folk performance and musical tradition that involves live performers slapping or patting their arms, legs, chest, and cheeks to create syncopated beats. Originally rooted in West African rhythmic traditions (such as the giouba from Haiti and Congo), enslaved people used hambone to bypass bans on drumming.
Carnegie Hall has provided free curriculum resources based on the "Juba Dance," a famous third movement from composer Florence Price's Symphony No. 1 in E minor, which includes Explore the “Patting Juba” Rhythm:
Foundational actions for students to try include:
- Beat 1: Slap your outer thigh with the palm of your hand.
- Beat 2: Slap your chest with the palm of your hand.
- Beat 3: Slap the top of your thigh with the back of your hand on the way back down from your chest.
- Beat 4 (optional): Slap your outer thigh with the palm of your hand.
Watch the video tutorial Pattin’ Juba Instruction to guide students through learning and practicing this rhythmic body percussion.
For more information review the PBS Music Arts Toolkit. Also, wikiHow has a tutorial.
Over the centuries, elements from hambone have appeared in blues music, tap dancing, breakdancing and beatboxing, a form of vocal percussion where a person uses their mouth and throat to mimic drum machines, turntables, and other musical instruments. Beatboxing includes cheek rolling that creates an oscillation or vibrating sound when the performer pats their cheeks.
Watch Blues musician Booker T. Washington "Bukka" White play hambone on his guitar.
Pioneering beatboxers include Doug E. Fresh, Rahzel (formerly of The Roots), Biz Markie, and Darren "The Human Beat Box" Robinson.
Connect a Micro:bit to Use CreateAI
Students' hambone actions can be recorded using a micro:bit (or BBC micro:bit), which is a pocket-sized, programmable computer. The micro:bit has a built-in accelerometer that, when worn on the body, logs changes in speed and orientation.
CreateAI (via Microsoft MakeCode) helps students explore artificial intelligence (AI) through movement and machine learning (ML). Students can collect their movement data to train, test and improve a machine learning model to recognize different hambone actions. If time allows, they can also program the micro:bit to do things in response to their actions.
Before using CreateAI, watch AI Unlocked: What is generative AI? and spend a few minutes talking about what AI and machine learning is and how AI models work.
To get started for this project:
- Connect the micro:bit to the computer with a micro USB cable
- Launch CreateAI (online)
- Click + New Project and give it a name
- Click the Connect button
- Download the data collection program (hex file) to the micro:bit (the Download button is on the lower left)
- Transfer the hex file to the micro:bit
Once the hex file is transferred students should eject the micro:bit from the computer and unplug the USB cable.
Make a Wristband for the Micro:bit
Students can create wristbands to attach their micro:bits to (when performing hambone). Follow these steps to create one:
- Roll out 1½–2 inch (4–5 cm) wide elastic band, felt or other similar material
- Wrap the band around a wrist so it fits snugly but comfortably
- Add about ½ inch (1.3 cm) for the overlap where the snap buttons will attach
- Mark the length with white pencil or paint marker
- Cut the band at the marked length (cut two strips for a wider band)
- If desired, apply a small amount of hot glue to the cut ends to reduce fraying
- Lay one end of the band over the other by approximately ½ inch
- Check the fit around your wrist before attaching the snaps
- Glue the female half of the snap to the outside of one end (use dabs of hot glue to hold the buttons in place)
- Glue the male half to the inside of the opposite end so the wristband closes into a loop
- Reinforce each snap with several stitches (see photo)
- Test the snap buttons by wrapping the back around the wrist and snapping the buttons
Note: Micro:bits come with a cardboard battery holder template that you can cut out and use to hold the micro:bit and battery pack together. Students can hot glue the back of the template to the wristband to avoid damaging the device.
After finishing the wristband, use hot glue to attach the micro:bit to the wristband (see photo).
Collect Movement Data Using the Micro:bit
Students must pair the micro:bit in order to transmit movement data. After pairing the micro:bit it will be ready to transmit the data to CreateAI wirelessly using bluetooth technology.
To do this:
- Put batteries in the battery holder
- Connect the battery holder to the micro:bit (make sure to disconnect the USB cable)
- Pair the micro:bit
- Copy the pattern displayed on the micro:bit to make sure it is paired correctly
Move on to the next step when you see the "Action" page (top left).
Record Data Samples to Train the AI Model
Have students put on their micro:bit wristbands and connect their battery packs. Make sure the devices are paired with CreateAI (step 4).
Before recording, students must tell CreateAI what classes or categories of movement it needs to learn:
- Click Add Action to create labels (e.g., "Chest", "Outer Hip", "Inner Thigh", or "Still")
- Use the dropdown menu next to each action to assign a custom icon or LED symbol that will display when that action is successfully recognized
Students must record at least 3 data samples per action for the model to train. Recording 10 or more samples yields significantly higher accuracy
- Click the red Record button to see the drop-down menu
- Choose Record 10 samples or Record for 10 seconds
Note: When recording a "Still" or "Resting" action don't move the micro:bit (or the wrist) until recording is over. Otherwise, it will confuse the AI model during the testing phase
Repeat the steps to add actions and record data samples
Test the AI Model
The final step is to train a machine learning model by testing it.
- Make sure the micro:bit is paired or re-pair it before proceeding
- Move the micro:bit to explore how different actions change the live data graph that shows movement data from the micro:bit's accelerometer in real time
- Next, click the blue Training model button (lower right)
- Test the model by performing the actions (notice the percentage of certainty for each action)
Now, have students perform hambone and watch the estimated actions (lower right) and live data graph.
If the result is not optimal, students can go back and fine-tune the dataset by clicking the "<-- Edit data samples" button (top left). Click the "x" above the action label to delete it, then click + Add Action button (bottom left) to create a replacement action. Make sure students re-record their edited actions using the micro:bit wristband (step 5).
For this project, at least one action was fine-tuned and the model was re-tested (see images).
This work is made possible by support from STAR, a Biogen Foundation Initiative. The team at Lesley supporting this initiative includes faculty and staff in the Lesley STEAM Learning Lab and other related Lesley University departments and programs.