Concepts & Ideas

Link

https://editor.p5js.org/SihongShen/sketches/kmKf-mV51

https://teachablemachine.withgoogle.com/models/nyKXUUTBW/

Model Training

截屏2025-09-20 上午12.32.26.png

截屏2025-09-20 上午12.33.19.png

截屏2025-09-20 上午12.33.38.png

截屏2025-09-20 上午12.34.00.png

During the training, I noticed that the model can’t really tell the difference between clap and snap the fingers at first, so I recorded more samples and made samples for each type more diverse, and now the model behaves better, though it sometimes still mistake snap as clap.

p5js development

I adapted the example codes for ml5js + teachable machine for sound to connect the model.

截屏2025-09-20 上午12.38.59.png

截屏2025-09-20 上午12.39.39.png

The reaction for the ball is simple, using if-else and functions.