Sphere lab
Biophysics Sphere lab - General information
Technical specifications
Designing and presenting stimuli with TDT hardware
With the TDT system we can create and control sound stimuli in realtime. Stimulus parameters such as loudness, duration and onset timing can be controlled using the circuit components of the RPvdsex software. To create a stimulus, a relevant circuit has to be loaded onto the RP2 Realtime Processing unit. These files are called .rcx/.rpx files and can be found on the C:\MATLAB\experiment\RPvdsex drive on the experimental pc in the Biophysics lab.
Let's start with an example of gaussian white noise to see what is needed to present a stimulus.
In the circuit shown above, we can see that there is a separate component called "GaussNoise". This generates random numbers that can be used to produce whitenoise through a speaker. After the GaussNoise component, there are two "Biquad" components in serie. The Biquad components both have input from "ButCoef1"; Butterworth filter coefficient generators. The result is a sound that is Lowpass filtered with cutoff frequency "LPFreq" and highpass filtered with "HPfreq". Both LPfreq and HPfreq are so called parameter tags, wich can be controlled via matlab with the command RP2.SetTagVal('HPfreq',MatlabHPfreq) where MatlabHPfreq is the Matlab variable with the value you want to assign to HPfreq in the circuit.
The filtered noise signal is passed to "BPGwn" (bandpassed Gaussian White noise) which is a simple linker component to create a clear flow in the circuit. The BPGwn reappears in the lower left part of the circuit, where it functions as input for a gating component "Cos2Gate". The gating component makes sure that the signal onset is a smooth transition from 0 to maximum amplitude, to prevent highfrequency onset artefacts. The Cos2Gate has additional green input in the form of Ctrl=Open, meaning that this is a digital (0 or 1) value. Likewise, the main input of Cos2Gate is light blue, meaning that it is a floating point value. When you create and compile your own circuits, the software checks if the input type matches the type of signal you connected. The Ctrl=Open port gets its input from the "Schmitt" component which creates a digital pulse of length "Thi" milliseconds. This is the stimulus duration, which you can change by altering the "StimLength" tag value. The Schmitt pulse is triggered by a linker called "Engage" which you can trace back to the top of the circuit. There and "EdgeDetect" looks for sharp positive change in the external trigger labeled "Src=Extern". This is the trigger input on the RP2 machine, usually you connect a button that the participant presses.
The output of the Cos2Gate is multiplied by "GWNAmp" to create a fixed loudness change. Note that you can also change the loudness by altering the "Amp" parameter in the GaussNoise component. After the multiplier, there are two components called "Ch=1" and "Ch=2". These are Digital to Analog Converters (DAC outputs) and they correspond to the two output channels on the RP2.