[psychtoolbox] detecting voice onset times in Matlab

On the Mac, MATLAB 5.2 provides a recordsound function that
will digitize the signal coming in the microphone port. Might
do the trick for you. The help text follows.

DB

»help recordsound

RECORDSOUND Record a sound.
[Y, Fs] = RECORDSOUND(SECONDS) records a monophonic sound for SECONDS
number of seconds at the lowest sampling rate (usually 11 or
22 kHz) and highest resolution (usually 8 or 16 bits) that
the Macintosh supports. The sampling rate is returned in Fs.

[Y, Fs] = RECORDSOUND(SECONDS, SAMPLERATE) records a sound at
the specified sampling rate. If the specified sampling rate is
outside the range supported by the machine, a sound will be
recorded at the closest sampling rate greater than or equal
to SAMPLERATE, or at the maximum sampling rate that the
Macintosh supports.

[Y, Fs] = RECORDSOUND(SECONDS, NUMCHANNELS) records a sound with
NUMCHANNELS (usually 1 or 2) channels. If NUMCHANNELS is 2 and
the Macintosh does not support stereo recording, a monophonic sound
is recorded instead.

[Y, Fs] = RECORDSOUND(SECONDS, SAMPLERATE, NUMCHANNELS) records a sound
a the specified sampling rate and with the specified number of
channels.

Examples:
[y, Fs] = recordsound(10)
[y, Fs] = recordsound(5, 22050)
[y, Fs] = recordsound(5, 2)
[y, Fs] = recordsound(5, 44100, 2)
>Thanks for the tip. Do you happen to know what exactly will appear in the
>vector Y? When I use the function, I got a huge long vector with numbers like
>-.3092 and 0 -- do you know what these represent? Thanks.

I assume that they are the voltages input to the audio port, sampled
at the rate specified by your call to recordsound. To test,
plug microphone into your audio port. Then digitize the
signal while speaking. Then try playing it back out your speakers
using the Psychtoolbox SND funciton.

DB