13 Play a guitar riff

The volume control for the computer is located at the upper-right corner of the screen. Adjust the volume of the computer to a moderate level (around half way on the slider bar).

Type the following commands into the MATLAB command window:

y = audioread('dspafsx_mono.wav');
fs = 16000;
dt = 1 / fs;
sound(y, fs);

You should hear a short guitar riff.

The vector y is the audio data for the guitar riff. NOTE THAT y IS A COLUMN VECTOR.

The value fs is the sampling frequency of the audio data in Hertz. The value of 16000 Hz means that there are 16000 elements in y for every 1 second of audio.

The value dt is the time in seconds between samples in the audio data. In other words, dt is the amount time between any two adjacent elements in y.