Re: New GetChar

dear dan

i'm very happy to hear that the new GetChar.mex with timestamping
meets your needs.

alas, as you guessed, RECORDSOUND is part of MATLAB and, as far as I
know, no sources are available.

It probably wouldn't be too hard to write something equivalent from
scratch. it'd be probably a solid week's work for someone reasonably
conversant with the Mac OS toolbox. if you do write something, please
consider donating a copy to the forum.

thanks again for writing back with the results of your GetChar testing.

best

denis


>Dear Denis,
>
>I spent some time trying your new GetChar.mex and, wow, thanks so much! Seems
>to be exactly what I had in mind.
>
>Along the lines of GetSecs time stamps, would it be a similar modification to
>have "recordsound" return the GetSecs time stamp of its first data point?
>(e.g.,
>[Y, Fs] = RECORDSOUND(SECONDS, SAMPLERATE, NUMCHANNELS)
>becomes
>[Y, Fs, GetSecsoffirstYvalue] = RECORDSOUND(SECONDS, SAMPLERATE, NUMCHANNELS)
>?)
>
>I know that "recordsound" is not a psychtoolbox routine, so I am not sure if
>you have access to the MEX-file source code. Obviously I couldn't find it
>myself. Do they even make that publicly available? Any advice or suggestion
>would be great. Thanks again for the GetChar modification.
>
>- Dan
>
>P.S. My interest in the above comes from noticing that "recordsound" calls
>take tens of milliseconds longer to execute than they should. And from some
>initial testing, I also believe that there is a delay on the order of tens of
>milliseconds as well between when "recordsound" is called and when the first
>data point is recorded.
>
>
>On Sun, 28 Apr 2002 12:34:17 -0400 Denis Pelli
><denis.pelli@...> wrote:
>
>> > Dear Dan & Allen
>> >
>> > what a good idea! I implemented it. The new GetChar.mex is enclosed.
>> > The new, optional, second return argument returns the time of the
>> > keypress, and also reports the state of all the modifier keys (shift,
>> > etc.)
>> >
>> > best
>> >
>> > denis
>>
>> p.s.
>> Here's a new, better, version of GetChar. The first version had a
>> minor bug ("secs" was garbage), which has now been fixed.
>>
>> you'll need stuffit expander to unpack the enclosure
> > http://stuffit.com/expander/
> >
> > best
> >
> > denis