PSYCHOACOUSTICS

STAIRCASE: a classic MATLAB toolbox for auditory testing
PSYCHOACOUTICS is a 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. 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, PSYCHOACOUTICS is very flexible as it comes with several signal generators and can be easily extended for any desired experiments.

Download, install and run install STAIRCASE
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:

PSYCHOACOUSTICS

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

PSYCHOACOUSTICS

PSYCHOACOUSTICS

PSYCHOACOUSTICS

You will then be prompted with a new window where 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 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. Key pressures must be followed by the "return" key.

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. It is here that sounds are generated and least one sound needs to have a variable parameter: i.e., the stimulus level that we adaptively change during the adaptive procedure. In all built-in experiments the variable parameter is called "var_level". The experiment function must also play the sound(s) to the subject and must contain is a variable that tells the toolbox which keyboard-key corresponds to a positive answer (i.e., "pos_ans" in all built-in experiments). In yes/no tasks this variable informs the toolbox about which key the subject has to press in order to provide a yes response. In nAFC tasks, this variable informs the toolbox about the key the subject has to press to give the correct response. Moreover, it is within the experiment function that we write the experimental question the subject has to answer. The question will be echoed on screen to the subject during each trial. The last fundamental step when writing the experiment.m function pertains multiple intervals nAFC tasks only. In this kind of task the temporal order of variable and standard sound must be randomized in each trial.
Click here to see?one 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 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

copy and paste the message error echoed by MATLAB on your computer screen;
report the MATLAB version you are using and the operative system you are using;
write in detail what you were doing when you found the bug;
attach to your email the experiment.m file you were running (this file can be found in the appropriate Experiment subfolder of the toolbox);
attach to your email the parameter.m file associated to the experiment (this file can be found in the appropriate parameter subfolder of the toolbox).

"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 STAIRCASE MATLAB toolbox (Grassi, Soranzo, & Borgo, in preparation)"].
The toolbox's companion paper (currently under review) can be seen here.

Authors' note
STAIRCASE 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.
01/03/2016. The function "PEST.m" has been bug-fixed. Many thanks to Samuele Carcagno for spotting the bug.

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

References
Dixon, J. W., & Mood A. M. (1948). A Method for Obtaining and Analyzing Sensitivity Data. Journal of the American Statistical Association, 43, 109-126.
Fechner, G. T. (1889). Elemente der Psychophysik (2nd ed.). Leipzig: Breitkopf & Härtel.
Grassi, M., Soranzo, A. (2009). MLP: a MATLAB toolbox for rapid and reliable auditory threshold estimations. Behavior Research Methods, 41, 20-28.
Kidd, G. R., Watson, C. S., & Gygi, B. (2007). Individual differences in auditory abilities. Journal of the Acoustical Society of America, 122, 418-435. For the TBAC test please redirect to the following web page: Communication Disorders Technologies Inc.
Levitt, H. (1971). Transformed up?down methods in psychoacoustics. Journal of the Acoustical Society of America, 49, 467-477.
von Bekesy, G. (1947). A new audiometer. Acta Otolaryngology, 35, 411-422.
Wetherill, G. B., & Levitt, H. (1965). Sequential estimation of points on a psychometric function. British Journal of Mathematical and Statistical Psychology, 18, 1-10.