For the following worked example, you will need MATLAB Software on your computer. Make a working folder and include it within your MATLAB path. Download the following three scripts and the sound file into your working folder.
- SAMPH_1_Extract5x3_single.m
https://figshare.com/ndownloader/files/3301847
- MFB_coeffs.m
https://figshare.com/ndownloader/files/3301844
- sample_advance.m which can be found here. Sample_Advance
- Sound file Ex1_Mary.wav [https://www.cne.psychol.cam.ac.uk/files/ex1_mary_website.wav]
Instructions
To extract the SAMPH from the sound file, at the MATLAB command line type:
FileName = ‘Ex1_Mary.wav’;
FSamp = 44100;
[Y,tA,CF,CF_MFB,NSamp] = SAMPH_1_Extract5x3_single(FileName,FSamp);
The variable tA, now in the MATLAB workspace, contains the 5 x 3 matrix of the S-AMPH. Don’t forget to save the variables in your workspace.
The S-AMPH waveforms can be plotted using the script found here: Plot_tA