Rhythm
Intermediate
10 min

How to Make a Ball Bounce to Any Song

Learn how to upload any MP3, WAV, or MIDI track and map its notes to bouncing ball collisions in our music studio.

01

Selecting and Preparing Your Song

To create a "bouncing ball plays a song" video, you first need a clean audio track. The Creator Studio accepts standard MP3 and WAV files. For the most precise and satisfying results, we recommend using MIDI files. MIDI files contain raw note data (pitch, velocity, timing) rather than compiled audio waveforms, allowing our physics engine to map ball collisions to individual notes with millisecond-level precision.

02

Uploading to the Audio Workshop

Navigate to the Audio Workshop tab in the right sidebar. Click "Upload Audio" and select your song or MIDI file. If you upload a MIDI file, our visualizer will automatically read the MIDI tracks and display the musical score. For MP3/WAV uploads, you can use our built-in BPM detector to establish the tempo or manually input the song's BPM.

Key Tips
  • Choose songs with distinct, punchy melodies — simple piano runs or electronic synth tracks work best.
  • If using MP3/WAV, make sure your file has a beat for easier timing sync.
  • Keep your uploads under 5MB to optimize loading times.
03

Mapping Collision Events to Melody Notes

Once your song is loaded, switch the simulation mode to Rhythmic. Under "Melody Mapping", select your uploaded track. Our physics engine will queue up the notes of the melody. Every time a ball collides with the boundary wall or another object, the engine will play the next note in the queue. This ensures that no matter how chaotic the physics are, the bounces play the song in perfect sequential order.

Technical Specifications
  • Supported formats: .mid, .midi, .mp3, .wav
  • Timing buffer: Dynamic queue-based sequential step playback
  • Polyphony: Up to 32 simultaneous collision voices
04

Syncing Spawners to the Beat

To make the balls release in sync with the rhythm, configure the Ball Spawner settings. Enable "BPM Sync" and set the spawner interval to match the note values (e.g. 1/4 notes, 1/8 notes). This makes balls drop from the spawner in perfect time with the background beat, driving high visual satisfaction and rhythmic pacing.