[comp.sys.next] Real-Time data acquisition

beck@VAX309.NOSC.MIL (Jeff M. Beck) (06/13/91)

'm looking for advice/help on using the NeXT to do 
real time data presentation and acquisition.
Here's the type of stuff we'd like to do;
minor variations would be added later:

Remove ALL icons from the icon dock.

Present a letter on the screen, and a auditory letter
(recorded .snd file (44MHz stereo)) AT THE SAME TIME !

When the auditory letter "ends", turn off the visual letter.

Record the time (exactly) from when the stimuli
was presented, to when the user to responds
(based on some criteria) via a key press.

As you can see, these are real-time requirements. The interface builder
approach to this scenario is mostly already up and running, but none
of the critical timing issues are resolved. I'm using gettimeofday
to get the seconds and microseconds from the system like this:

	gettimeofday(tp, tpz); // fill the timeval stucture

	err = SNDPlaySoundfile( blah );    // play the sound
	[stimulus setStringValue:visual];  // show the word

	begin =  tp->tv_sec ;	// save the start time seconds
	ubegin = tp->tv_usec ;  // and microseconds


I call gettimeofday again to get the response time when
a key is pressed.  Oh, we only need resolution in the milliseconds, 
and I've heard you can do real-time with the DSP ? 
Has anyone out there done anything like this ? Any suggestions ?

Thanks in advance!


<>||<>||<>||<>|<>||<>||<>|<>||<>||<>||<>||<>
<> jeff beck: Naval Health Research Center<>
<>            San Diego, California       <>
<>    E-mail: beck@cpl.nosc.mil           <> 
<> NeXT mail: beck@cpl_ncube.nosc.mil     <>
<>     phone: 619-553-8414                <>
<>||<>||<>||<>|<>||<>||<>|<>||<>||<>||<>||<>