Captures sound from a microphone, then records it to file after the trial. Properties start/end set when recording starts and ends, and times reported in record properties startTime/endTime correspond to recording start/end—you can use these to analyze the times of recorded sounds relative to other things in the trial/experiment. Set recording volume in your system sound settings.
This uses the high-precision PortAudio driver in Psychtoolbox. A system can have multiple internal sound “devices”. If you want to change which sound device to use for recording or other parameters, you can use pb_prefs -> microphone tab. Or to change for only the current experiment, you can add an object of type microphone and set its properties. See help text for the Psychtoolbox function InitializePsychSound and generally the Psychtoolbox website and PsychPortAudio documentation for technical notes on PortAudio with different operating systems and hardware.
"Ends on its own" means ends automatically at that point. If an element can end on its own, you don't need to set end conditions for it in property end (unless you want it to maybe end earlier).
No—runs until any condition you set in property end.
fileName
numberFile
minNumDigitsInFileName
bitDepth
bitRate
reportTimeout
All visual elements
position
depth
nn_eyes
rotation
flipHorz
flipVert
colorMask
alpha
intensity
contrastMult
convolution
shader
filterOrder
filterGrayscale
filterResolutionMult
filterGamma
channelResolution
backColor
addDisplay
All visual elements
position
All adjuster elements have
adjust
All response handler elements
translateResponse
scoreResponse
correctResponse
scoreResponseForStaircase
maxNumResponses
recordDefaultResponse
registerTrigger
autoResponse
autoResponseLatency
All elements
start
end
startBuffer
endBuffer
vary
staircase
All objects
info
report
No default: fileName
Default: numberFile = automatically number file written
Default: minNumDigitsInFileName = 1
numberFile = <cd>true<cd>/<cd>false<cd>: If = <cd>true<cd> (default), the sound recorder adds a number to file name to not overwrite existing files. This means if you have multiple sound recorder elements in an experiment, you can set fileName the same for all of them (e.g. sound.wav) and they will write different files numbered in the order they run in (e.g. sound1.wav, sound2.wav, sound3.wav, ...). If = <cd>false<cd> then the sound recorder will not add a number and will error if the file already exists.
minNumDigitsInFileName sets the minimum number of digits to use for numbering the file. e.g. 3 → sound001.wav, sound002.wav, ...
See also record properties fileName_r, n_file below.
Default: bitDepth = 24
Default: bitRate = 256
For a .mp4 or .m4a file, you can optionally specify bit rate to compress at in bitRate.
Default: 0.5 sec
Alternatively 0 = don't wait and disable the warning that report was not received. This can be useful if you are getting the warning in an experiment where timing doesn't matter.
You can vary or allow the subject to adjust the following properties of an object of this type when it's running. If you need to make other properties adjustable, you can edit the element type code—see Element Type Programming Manual.
position
nn_eyes
rotation
colorMask
alpha
intensity
contrastMult
drawCodeVars
(None)
(None)
PsychBench uses record properties to record information during experiments. You can't set record properties but you can see them in experiment results using input property report.
fileName_r
n_file
All response handler elements
response
responseScore
responseTime
responseLatency
d_responseTime
numResponses
All elements
startTime
endTime
duration
n_startFrame
n_endFrame
startLatencyBufferable
endLatencyBufferable
All elements
startTime
endTime
duration
n_startFrame
n_endFrame
startLatencyBufferable
endLatencyBufferable
trigger
triggerTime
d_triggerTime
numTriggers
syncTime
fileName_r is a string recording name of the file written. This includes number added if numberFile = <cd>true<cd>.
n_file records the number added (numeric) if numberFile = <cd>true<cd>.