PF StudioFrançais

Make a bouncing ball video in music: the physics and the scale

How to make a bouncing ball video that plays music: restitution, falling times, why the rhythm speeds up, and how a scale keeps every note in tune.

Updated

Why this kind of video holds attention

A bouncing ball combines two things the eye and the ear follow without effort: a predictable motion and a sound that arrives exactly when the ball touches something. When the two match, the brain registers the video as satisfying. Nothing needs to be explained, which suits a format where the viewer decides in about a second whether to keep watching.

The effect depends on timing. The sound has to be tied to the physical event, not added afterwards. The sections below explain how the bounce is calculated and how a musical scale turns each impact into a note that fits the others.

Falling: height, time and speed

Without air resistance, a ball released from rest at height h falls with constant acceleration g, about 9.8 metres per second squared on Earth. The fall lasts t = sqrt(2h / g) and the speed at impact is v = sqrt(2 g h) = g t. Doubling the height does not double the time, only multiplies it by about 1.41.

In an animation the scale is arbitrary: the screen is in pixels, so the gravity setting simply chooses how many pixels per second squared the ball accelerates. A larger gravity makes everything faster and the hits more frequent. Setting gravity to zero removes the fall completely, and the ball then travels in straight lines between walls, which gives a different, more regular rhythm.

Bouncing: the coefficient of restitution

At each impact, the component of velocity perpendicular to the surface is reversed and multiplied by the coefficient of restitution e. A perfectly elastic collision has e = 1, a collision with no rebound has e = 0. Everyday balls have values between about 0.5 and 0.9 depending on the ball and the surface.

Speed after the bounce is e times speed before, so the rebound height is e squared times the previous height, and the flight time between two impacts is e times the previous one. With e = 0.96 the second flight lasts 96 % of the first, the third 92 %, and so on. The impacts get closer together, and the sound accelerates.

Add up the geometric series and the total time before the ball stops is t0 (1 + e) / (1 - e), where t0 is the duration of the first fall. For e = 0.96 this is 49 t0. A ball dropped for a 2 second fall bounces for about 98 seconds in the ideal model. The number of bounces is infinite, but they take a finite time, a physical version of Zeno's paradox.

Choosing bounciness for a 30 second video

Below 0.9, the energy drains quickly and the ball settles early: that suits very short videos, but leaves a dead stretch if the video runs 30 seconds. Around 0.96 to 0.99 gives a long run with a visible acceleration. The generator also lets you go above 1. Then each impact adds energy, so the ball never calms down, a deliberate artificial setting that keeps the pace up for the whole duration.

More balls give more impacts per second and chords of overlapping notes. Between 3 and 5 balls is a good range. With 8 balls the sound can become dense.

From impact to note: scales

A musical scale is a selection of pitches within an octave. The chromatic scale has twelve semitones, but most music uses only five to seven of them. In the major pentatonic scale the notes are, in semitones from the root, 0, 2, 4, 7 and 9, for example C, D, E, G and A. The minor pentatonic is 0, 3, 5, 7 and 10. Neither contains an interval of a semitone, which is the main source of tension, so any order and any overlap sounds acceptable.

Seven-note scales such as major (0, 2, 4, 5, 7, 9, 11) or minor (0, 2, 3, 5, 7, 8, 10) give more melodic character and also more risk of clashes. The generator offers these, and others such as Lydian, Dorian, an in-sen scale and Hirajoshi. It computes every note from the scale you choose, so the sound stays in tune whatever the order of the impacts.

A rising scale gives the feeling of progress: each hit plays the next degree, and the pitch climbs, which also creates a sense of tension that resolves in the final chord. The key only moves the whole scale up or down, for example from C to G.

Practical checklist

Use a clear hook and keep the ball in the centre of the frame, away from the top and bottom areas covered by the app. Choose a pentatonic scale if in doubt. Use an elasticity of 0.96 to 0.99 for a 20 to 40 second video. Change the variant, scale, palette and hook between uploads so that your videos are not copies of each other.

Listen with headphones before exporting. A recording runs in real time, so a 30 second video takes 30 seconds, and a slip is quickly re-recorded by choosing New variant.

Frequently asked questions

Why do the hits get closer together?
Each rebound is lower than the previous one, so the flight between two impacts is shorter. Its duration is multiplied by the coefficient of restitution each time.
Which scale should I choose?
The major or minor pentatonic scales are the safest. Major and minor scales add melodic movement, and scales like Hirajoshi give a more distinctive colour.
Can a coefficient of restitution exceed 1?
Not for a passive ball: that would create energy. The generator allows values slightly above 1 as an artistic setting to keep the motion alive.

Try this style

Related guides