sr = 44100;
f = 250;
d = .25;
t = linspace(0, d, sr*d);
for i = -6:6
    ITD = i*10^-4;
    IPD = 2*pi*f*ITD;
    phase_left = 0;
    phase_right = IPD;
    tone_left = sin(2*pi*f*t+phase_left);
    tone_right = sin(2*pi*f*t+phase_right);
    if ispc
        wavplay([tone_left', tone_right'], sr, 'sync')
    elseif ismac
        sound([tone_left', tone_right'], sr)
    end
end