The audio playback in the CES lab is somewhat complicated. With SNAP one is able to send an OSC (for Open Sound Control) message to the Max/MSP program the plays an audio file through the speaker arrays before and behind the chairs subjects sit in during an LSE session. This, in my opinion, slightly bad because it is not extensible or modular -- but that is a subject for a different webpage. The latency value arrived at here (68.76ms) corresponds to the time it takes SNAP to send a message to the computer running Max/MSP plus the time it takes Max/MSP to pipe that sound into the speaker.

Experimental Procedure

An experimental SNAP program was written in order to test audio latencies. This program simply generates a marker just before sending an OSC message to play a soundfile (I chose a buzzing noise). A very similar procedure to the audio synchronization procedure that you can find here was used. Both a logitech USB microphone and a hand made microphone plugged into a BioSemi amplifier were used to gather the data. Below is an example of the raw data. The red vertical line corresponds to the marker generated by SNAP prior to messaging for the soundfile to be played back. The usual 7.72ms was subtracted from the timestamps of the BioSemi signal.


What we see here from both the histograms and the binned latency values (and their difference) of the BioSemi signal and the microphone signal are interesting. We may keep the 68.76ms as the correct latency for audio playback (the outliers in the 'eeg' capture can be discarded -- they are due to the cheapness of the microphone, as evinced by the fact that they do not exist in the USB microphone data) but there is (unfortunately) a jitter of about -4.82ms to +5.87ms. We would wish for a tighter spread in the lag time, but this is impossible given the signal chain in the lab. Jitter accumulates not just from sound cards, but also from OSC messaging between computers.

We may also take this value as the 'lead time' for audio playback through the signal cahin in the CES lab if the goal is synchronization.

Beyond this we discover that the audio captured by the microphone is curiously timed. It seems to skip between two slightly jittery latency values. This is verified by inspecting a closeup of the difference between the audio capture signals as well as their correlation. This certainly warrants some investigation.

We also see this effect in the correlation between the two streams. Fortunately the strong correlation (apart from the two outliersand the mysterious, spurious delay from the USB microphone) tells us that our conclusion that the wide jitter results from the playback, not the recording.

The data for this experiment were gather on 11/12/2014.