Accuracy of tapping to constant clicks

The following experiment was designed to measure the accuracy of tapping to a constant tempo (Using the computer keyboard in the Windows XP OS as tapping input).

The standard deviation of tapping with clicks at a constant tempo of 100 beats per minute was measured to be 30 milliseconds. This means that 1/2 of all taps at a stable tempo should occur within 30 milliseconds of the desired location. Also, 95% of all taps will occur within 60 milliseconds of the desired location.

If the tempo of the clicks (or music) is not constant, then the standard deviation of the tapping is expected to be larger than 30 ms. If the standard deviation is less than 30 ms, then something is strange (or you have a better tapper).

Experimental Setup

A soundfile was created with clicks generated with 1 millisecond bursts of whitenoise spaced 600 milliseconds aparts (generating a tempo of 100 MM). There were 3000 clicks in the sound file, with a total duration of 30 minutes for each tapping trial run.

A Sony Vaio PGC-505R laptop computer running Windows XP was used to measure tap times.


Results

Here are plots of 4 tapping trials, each lasting 30 minutes. The central plot shows the time at which the clicks occurred in the soundfile on the horizontal axis. The vertical axis displays the offset of the tap with respect to the time of the click in the soundfile.

The red line in the center of the plot shows a smoothed version of the raw deviation plot. This red line smoothes out the variations in the timing errors involved with muscles, etc., and gives a somewhat clearer picture of the intended tempo of the tapper.

The red histogram attached to the right side of the plot sums the total counts of taps at each given time displacement from the click in the soundfile.

Below are plots of the duration between taps over time during the trials. Notice the narrow bands in trials 1, 2 and 4 which corresponds to the (presumed) interrupt time of the computer keyboard of 5 milliseconds. In other words, the computer checks to see if a key has been pressed about every 5 milliseconds, so it is not possible to measure times more accurate than that with a computer keyboard.

Also note the strange banding which occurs in trial three. This is due to either the tapper or the computer. The computer is suspected, since trial 2 was cut short due to a low-battery warning occuring just after 25 minutes. The banding may be related to a different keyboard polling method being used by the operating system, or some other strange non-realtime OS problem.


Raw Data

  • A list of 3000 taps every 600 milliseconds (100 MM) starting after an initial 3 second pause.
  • A list of 1000 taps every 600 milliseconds (100 MM) starting after an initial 3 second pause.
  • makeeventaps -- PERL program which generated the above list of click times.
  • monoclick.exe -- a program compiled for Windows which takes a list of times in milliseconds (see above) and converts them into clicks in a monophonic soundfile. The program must be run using cygwin, so you might email Craig if you need to run it on your computer and he will compile a more portable version. Also can be compiled for OSX and Linux.
  • monoclick.cpp -- source code for above program