Vibrating strings, aliasing, and the iPhone

You’ve seen this video on YouTube, right?

The guitarist, Kyle Jones, put his iPhone in the body of his guitar and recorded a video of the strings vibrating as he played. The patterns produced are interesting and fun to watch. As he says in the notes to the video,

[T]his effect is due to the rolling shutter, which is non-representative of how strings actually vibrate.

Surprisingly (OK, not surprisingly, but disappointingly), several commenters on YouTube and contributors to this Reddit thread are arguing that the strings really do take on the shapes shown in the video, that they are not an artifact of the recording process. The Dunning-Kruger effect rears its head again.

How can one refute the notion that the video shows the strings as they actually are (without solving the governing differential equation)? How about this screen grab of one of the “frames” of the video?

Single frame of video

There’s no way the B string could take on that shape without the use of pliers.

As Mr. Jones says, the cool string shapes seen in the video are the result of what’s called the rolling shutter effect. We tend to think of videos as being like movies made on film, in which every frame represents the state of the subject at a particular instant in time. But some video cameras, typically those that use a CMOS sensor like the one in the iPhone, don’t record the entire scene at once. Instead, they record slices of the scene at slightly different times; the “frame” that results is actually a composite image formed from a set of slices.

If the objects in the scene are moving slowly relative to the timing of the slice exposures, the video that results is a realistic depiction of the scene. But if things are moving fast you get weird effects that don’t match reality.

This is a particular example of a more general phenomenon known as aliasing, a term that comes from the world of signal processing. When a continuous signal is sampled at discrete intervals, the sampled version can appear like another signal entirely. This graph (taken from the Wikipedia article) of two sine waves shows that the high frequency (red) wave sampled at relatively widely spaced intervals would look like the low frequency (blue) wave.

Aliasing of a sine wave

If you’ve ever taken a signal processing course, phrases like Nyquist frequency and Hamming window are probably popping into your head. Of course, if you’ve ever taken a signal processing course, you don’t need me to explain what’s going on in Jones’s video.

I’m not especially good at following through on blog post series,1 but I do want to write a couple of posts on what a vibrating string really looks like. And for that we really will have to solve the governing differential equation. Here it is,

[T\frac{\partial^2 w}{\partial x^2} = m \frac{\partial^2 w}{\partial t^2}]


There are two ways to solve this equation. The usual way, which fits well with the musical concepts of frequency and overtones, is through modal analysis. The other way is through a traveling wave analysis. I want to do both, but don’t hold your breath.

  1. Where, for example, is Episode 4 of my text files series? Good question. 

4 Responses to “Vibrating strings, aliasing, and the iPhone”

  1. Alex Chan says:

    Thanks for this. I hadn’t actually seen the video in question, but I see what you’re talking about. It reminds me of old videos, where the spokes of a wheel appear to rotate in the opposite direction to the actual rotation. Is that a form of aliasing, or something different entirely? Anyway, great post, thanks :)

  2. Yosh says:

    Actually, a vibrating string typically has a sharp bend that travels back and forth along the string. See, for example:

  3. Dr. Drang says:


    Yes, the apparent backward rotation of wagon wheels in Western movies is a classic example of aliasing.

  4. Dr. Drang says:


    Sharpness is a relative term. In the UNSW page (which I have no argument with and which doesn’t refute anything in my post), and in the equation at the end of my post, the string is considered “ideal,” with no thickness and no bending stiffness whatsoever. This is a decent mathematical model of the behavior of real strings, but it’s only a model. Unlike ideal strings, real strings can’t have mathematically sharp kinks—points where the slope of the string is discontinuous.

    The kink shown in the UNSW page is a convenient way to approximate the initial shape of a plucked string—I’ll make the same approximation when I show how the governing equations are solved—but a real string is curved across the guitarist’s finger. Look again at my screen capture and notice that the bumps in the B string are narrower than Jones’s fingers. The radius of curvature looks roughly the same as that of a tuning peg, and you know that when a string is wrapped around a tuning peg, it takes a permanent set. The vibrating part of a string between the nut and the bridge doesn’t take a permanent set, so it can’t be curved that tightly.

    And it’s not just the sharpness of the curve that makes the shape unrealistic. It’s that you see that shape repeated again and again along the string. The UNSW page doesn’t show anything like that.

    I intend to address some of these issues in later posts when I show how the string vibration equation is solved. Consider this a sneak preview.