11 Collect some audio data of two claps
You will need some audio samples to develop your program. Remember that you can record and save audio like so:
disp('Start recording.')
recordblocking(rec, 3);
disp('End of Recording.');
y = getaudiodata(rec);
11.1 One-half second between claps
Begin by collecting an audio sample of two claps separated by about one-half second (similar to the clapping in the Clapper video). Use your plotAudio
function to check that the claps are separated by about one-half second. Save this sample in a variable named y
.
11.2 Two claps in quick succession
Next collect an audio sample of two claps separated by noticably less than one-half second (two claps in quick succession). Save this sample in a variable named yTooFast
.
11.3 Two slow claps
Finally collect an audio sample of two claps separated by noticably more than one-half second (two slow claps). Save this sample in a variable named yTooSlow
.
11.4 Samples
Below are examples of plots of some suitable audio samples:
Approximately one-half second between claps:
Less than one-half second between claps:
More than one-half second between claps: