Tools and convenience function¶
Initialize and Setup¶
- +o_ptb.init_ptb(ptb_folder)¶
Initialize
o_ptb
.- Parameters
ptb_folder (string, optional) – Path to the Psychtoolbox folder. If this is not provided, the environment variable “O_PTB_PTB_FOLDER” will be used if set. Otherwise the current folder and all subfolder will be searched for an installation.
Audio¶
- +o_ptb.+tools.+audio.equalize_rms(stims, max_amp)¶
Set all stimuli to the same RMS value.
All stimuli in the cell array
stims
will be set to the maximum RMS value of all stimuli in the array. In order to avoid clipping, no sound will be louder thanmax_amp
.- Parameters
stims (cell array of
+o_ptb.+stimuli.+auditory.Base
) – Cell array of the stimuli to equalize.max_amp (float) – Maximum amplitude of any sound.