PSYCHOACOUSTICS: a comprehensive MATLAB toolbox for auditory testing

PSYCHOACOUSTICS is a MATLAB toolbox implementing three classic adaptive procedures for auditory threshold estimation. The first includes those of the staircase family (method of limits, simple up-down and transformed up-down); the second is the PEST; and the third is the Maximum Likelihood Procedure (MLP, Grassi & Soranzo, 2009). The toolbox comes with more than twenty built-in experiments each provided with the recommended (default) parameters for each procedure. However, if wished, these parameters can be modified through a user friendly and intuitive graphical interface and stored for future use: no programming skills are required. Finally, PSYCHOACOUSTICS is very flexible as it comes with several signal generators and can be easily extended for any desired experiments.

Download, install and run install

Click here to download the toolbox. Unzip the file and move the PSYCHOACOUSTICS folder into the MATLAB toolbox folder. Please, do not install the toolbox in a different folder. Now you need to include the toolbox in the MATLAB path. Relaunch MATLAB and type "psychoacoustics" at the MATLAB prompt (Note that the latest versions of MATLAB are case sensitive. Furthermore, if you are using Windows 7, you might need to start MATLAB with administrative rights). You will be prompted with the following dialog box:



According to the procedure you choose, you will see one of the three following windows:







Here you can select the specific experiment that you want to run. Please, read the experiment description at the top of the graphical interface to understand the characteristics of the experiment and the parameter that will be varied adaptively during the procedure you have chosen. Fill in the missing information (e.g., subject's name, sex and so on) adapt the procedure parameters to your own needs, save the parameters (if you want to) and press "START".

How to respond

In all built-in experiment the subject responds by pressing the key-numbers of the computer keyboard. In nI-nAFC experiments the subject reports the temporal position of the variable stimulus. For example, in a 4AFC task, if the subject thinks that the variable stimulus was the third stimulus presented s/he has to press "3". In yes/no task (when available), the "1" number corresponds to the answer "yes, I perceived/detect" and any other number (e.g., "0") corresponds to the "no, I don't perceive/detect" answer.

The datafile

At the end of the experiment, each procedure saves two data files (tab-delimited, flat format, text files) in the MATLAB current directory. The first is an extended data file that contains all experiment's events: i.e., subject number, name, sex, age and note, block number, trial number, level of the stimulus and so on. The name of this file can be set by the user through the graphical interface. The second data file contains only the subject's threshold and it is saved after each subject. By default, the name of this file is the subject's name. If the user do not input the subject's name the file is called "untitled.txt".

Toolbox's description

The built-in experiments

The majority of built-in experiments are classic psychoacoustics experiment. Some are adapted from a set of experiments performed by Kidd, Watson and Gygi (2007). These authors run nine-teen classic psychoacoustics experiments on a large (N=340) number of adult subjects. The PSYCHOACOUSTICS user running these experiments can thus compare his/hers own results with those reported in that study. (Readers interested in an identical replicate of the experiments run by Kidd, Watson, and Gygi should refer to the Test of Basic Auditory Capabilities by the same authors, Communication Disorders Technologies Inc.) All built-in experiments come with default parameters. The user can, however, change parameters at will. If changes are made and saved they will be kept until the next "SAVE DEFAULTS" command will be called. When the user presses "START" the experiment begins and the stimuli are presented to the subject.
Click here to see some of the available experiments.

How to change the experiment parameters

In the case the specifics of the built-in experiments do not match the experimenter's needs s/he can edit them and adapt them to his/hers own needs. The characteristics of the sounds of each experiments are written at the beginning of the experiment.m files and can be easily changed. More advanced MATLAB users can write their own experiments by take as example any of the built-in experiments.

How to write a new experiment

All experiments file have the same structure and develop in four steps. Click here to see one example of the experiments currently implemented with the toolbox.

Signal generators and modifiers

STAIRCASE is provided with several signal generators and modifiers. Signal generators and modifiers are used by built-in experiment to create the sounds for the experiment. These functions can also be used to create the sounds for your own experiment.
Click here to see the list of the available signal generators and modifiers.

Toolbox calibration

If you have a sound level meter and/or an artificial ear you can calibrate the toolbox. First of all, it is important to know that the level of all sounds used in the toolbox is manipulated in dB FS. That said if you want to calibrate one experiment you need to proceed as follow. Let's suppose you want to calibrate the absolute threshold experiment. Firstly, look at the level of the sound you want to calibrate. In the absolute threshold experiment, the sound is a 1 kHz pure tone and the "starting level" of this tone is set to -10 dB FS (default value). Successively, synthesize an identical level (but longer) 1 kHz pure tone with the following commands:

% sf = 44100; % sample frequency
% f = 1000; % tone's frequency (Hz)
% d = 10000; % tone's duration (ms)
% level = -10; % tone's level (dB FS)
% synthesize the tone
calibration_tone = GenerateTone(sf, d, f);
% set the level of the tone to "level"
calibration_tone = AttenuateSound(calibration_tone, level);

Now, get your level meter, play the calibration tone and read how many dB SPL (or dBA) is displaying. To play the calibration tone in MATLAB use the following command:

% play the tone with the matlab "sound" command
sound(calibration_tone, sf)

Let's suppose your level meter is displaying 60 dB SPL. You now know the difference linking the dB FS (used within the toolbox) with the dB SPL scale (used by your sound level meter) which is +70 dB (i.e., 60 dB SPL - (-10 dB FS)). Now, run the experiment. If the threshold results -50 dB FS, the threshold expressed in dB SPL is 20 dB SPL (i.e., -50+70).

Bug/problem report

If you find a bug (or you come across a problem) when you are using the toolbox write us an email. What to write in this email:

"Don't thank us. Cite us."

The toolbox is freely distributed. However, we would be happy if you would acknowledge the use of PSYCHOACOUSTICS when you publish your research [e.g., "experiments used a transformed up-down staircase (Levitt, 1971) implemented in the PSYCHOACOUSTICS toolbox (Soranzo & Grassi, PSYCHOACOUSTICS: a comprehensive MATLAB toolbox for auditory testing. Forntiers in Psychology (in press)). The toolbox's companion paper can be seen here.

Authors' note

PSYCHOACOUSTICS is constantly under development. Check the current web page for the most updated version of the toolbox. We will be happy to upload your experiments in the toolbox for free distribution.

MLP page

Those interested in MLP toolbox can refer to the MLP'sweb page.

References