Steve Finney made a neat Linux program for running sensorimotor synchronisation tapping experiments. In tapping experiments, you typically have a participant tap her or his finger along with a metronome. Finney’s program FTAP is a C-based program that will read the taps from a MIDI interface and that can generate metronome sounds. However, the program was developed in the early 2000s and the Linux landscape has changed somewhat. These days I’m installing FTAP on my friend’s Linux box. I figured the world might learn something from our errors.
First of all, make sure you start with a 32-bit version of Linux. It seemed to us that the binaries (pre-compiled executables) that come with FTAP don’t work under 64-bit Linux (which nowadays is the standard). When you download FTAP it should come with source code, which should allow you to compile it, but this didn’t work out of the box for us. Also, it should be possible to run the 32-bit FTAP executables in 64-bit Linux but we were too lazy to figure out how. So make your life easy and install 32-bit Linux.
Second, install a realtime Linux kernel. Current Linux versions by default have a kernel that allows you to come close to real time (called lowlatency) but I got the impression that for the very best timing performance you need the kernels called “realtime” which you can get from abogani’s PPA archive. Note that this works for Ubuntu 12.04 but maybe not for newer versions. For details:
Third, download FTAP: http://csml.som.ohio-state.edu/ftap/ Extract it and you should be ready to roll! Note that FTAP can only read the MIDI device /dev/midi. So if your MIDI device somehow gets mapped to another device node, make sure you install a symbolic link in /dev/midi to the actual device node.
A final note (please learn from our stupidity): When we ran FTAP on a particular day, we found incredible delays (up to several seconds) between the MIDI input and MIDI output. These delays persisted when FTAP wasn’t even running, and the computer was set up (using aconnect) to immediately forward the MIDI signal back to the USB-MIDI device. It turned out to be due to the fact that Windows (which was also installed on the computer in a dual-boot set up) had not been shut down but was in hibernation mode. Apparently this meant that Windows was still using resources and this caused massive delays in the MIDI processing. Lesson learned: don’t hibernate Windows while you are running an experiment under Ubuntu!