Play Sounds

Location:

…\DirectRT\samples\5- other features\11 play sounds

Sample Description

DirectRT allows you to play sound files and to synchronize them with other events and stimuli in your session. Try running the "sound.csv" sample input file in this folder. If your speakers are on (or your headphones are plugged in) and your volume is turned up, then you should hear the sound files play during the session. On most machines, you can adjust the volume by clicking on the little speaker icon on the Windows task bar. If you do not have this icon, then you can type "sndvol32" from the Run command on the Windows Start menu to adjust the volume.

Playing sound files in DirectRT is accomplished the same way every other stimulus is presented-by listing the sound file name in the Stim column. To tell DirectRT that it should be looking for a sound file, precede the filename with "!' like this:

of_sound1

On these trials, DirectRT will first look in the stim folder for a sound file called "tone.wav". It will play this file and from the moment it begins, 1500ms will elapse before DirectRT continues with the next stimulus. In this case, the next stimulus is another sound file (e.g., dog.wav, giraffe.wav). Note that the second sound file on each trial request an RT rather than a time interval in the Time column. When this happens, DirectRT will start timing the RT from the moment the sound file begins playing.

Note that you will usually enter "0,0,0" in the Loc column if you simply want to play the sound file without clearing the screen, and "0,0,1" if you want the screen cleared when the sound begins. DirectRT has advanced sound functions though which you can control by entering values different from these in the Loc column.

Advanced Sound Functions

By using special values in the Loc column (i.e., instead of 0,0,0 or 0,0,1), you can control three aspects of the how the sound files are played: Frequency, Pan and Volume. Try running the "dichotic.csv" sample input file in this folder. To get the full effect, try to use stereo speakers--or even better, a pair of head phones. You'll notice that certain sounds play in the left channel and some in the right. On the last two trials, the sounds are either sped up or slowed down. How are these effects accomplished? Here is an excerpt from the "dichotic.csv" input file:

 

of_sound2

 

To speed up or slow down the sound file, you can set the frequency in hertz (Hz) at which the sound is played by entering a value from 100 to 100000. In the first six trials, this value is set to 0-which indicates to use the default frequency of the sound file. However, the seventh trial, the frequency of the sounds are set to 55000Hz-significantly higher than the default frequency of 44000Hz. In contrast, on the eighth trial, the frequency of the sounds are set to 33000Hz-significantly lower than the default frequency.

To control whether a given sound is dominant in the right or left channel, you can set a Pan value anywhere from -100 (left only) to 100 (right only). Note that the sounds in the first stim column have a pan value of -100. Consequently, they will play in the left channel only. In contrast, the sound files in the second stim column have a pan value of +100-meaning they will play only in the right channel. Other examples: A value of 50 would result in the right channel being at full volume and the left at half volume. A value of -75 would result in the left channel being at full volume and the right channel being at 25% volume.

Finally, to control the overall volume at which the sound file is played, you can enter a value from 0 (normal) to -100 (completely muted). Sounds can only be reduced in volume and not amplified.

Note that in this sample an added effect of delay is achieved by entering variable values in the Time column of the first sound. When this value of 0, the two sounds play nearly simultaneously. When the value is 100, there is a 100ms delay between the sounds. When it's 200, there is a 200ms delay, and so on. This occurs because the value in the Time column for a sound determines how many milliseconds DirectRT will let pass before continuing with the next stimulus.