h16999 s 00030/00012/00078 d D 1.9 24/09/19 21:06:34 bevans 9 8 c Updat4ed e s 00002/00002/00088 d D 1.8 24/09/19 14:25:41 bevans 8 7 c Updated e s 00017/00008/00073 d D 1.7 24/09/19 14:23:45 bevans 7 6 c Updafed e s 00002/00001/00079 d D 1.6 24/09/19 13:42:06 bevans 6 5 c Updated e s 00020/00000/00060 d D 1.5 24/09/19 13:41:29 bevans 5 4 c UPDATED e s 00011/00004/00049 d D 1.4 24/09/19 02:13:45 bevans 4 3 c Updated e s 00001/00001/00052 d D 1.3 24/09/15 23:58:32 bevans 3 2 c Updatrf e s 00002/00003/00051 d D 1.2 24/09/15 23:57:53 bevans 2 1 c Updated e s 00054/00000/00000 d D 1.1 24/09/15 20:52:22 bevans 1 0 c date and time created 24/09/15 20:52:22 by bevans e u U f i f e 0 t T I 1
soundsccommand. Or you can autoscale the audio signal to be between -1 and 1 in amplitude: E 7 I 7 D 9 Be sure to create one vector for your entire audio signal E 9 I 9 Be sure to create one vector for your entire audio signal. A way to concatenate row vectors into a single vector is E 9 E 7
I 7
audiovector = [ Cnotes pauseVec Dnotes pauseVec Enotes pauseVec ... ];
D 9
assuming all the vectors are row vectors.
D 8
You can then play the audiovector using the soundsccommand, or autoscale the audio signal to be between -1 and 1 in amplitude: E 8 I 8 You can then play the audiovector using the
soundsc command, or
autoscale the audio signal to be between -1 and 1 in amplitude
E 9
I 9
Since several sinusoidal signals are being added together, the amplitude
range of audiovector will exceed the range of -1 to 1, and
hence, using the sound command will result in clipping.
For playback, you could either
soundsc command, OR
E 7
audiovector = audiovector - mean(audiovector);
audiovector = audiovector / (max(abs(audiovector));
D 7
and then use the sound command.
E 7
I 7
D 9
and then play the vector using the sound command.
E 9
I 9
and then play the vector using the sound command.
I 7
D 9
If you were use a sound command for each note and each pause, the timing will be off because
you'll be experience variable delays from the operating system to send data to the playback
subsystem and for the playback subsystem to complete the playback on the vector of samples,
and variable delays in implementing the pause duration.
E 9
I 9
If you were use the sound command for each note and the
pause command for each pause, the timing will be off
because you'll be experiencing variable delays from the operating system
to send data to the playback subsystem and for the playback subsystem to
complete the playback on the vector of samples, and variable delays in
implementing the pause duration.
E 9
E 7 D 9 You can also save the autoscaled vector to a wave file using the command E 9 I 9 You can also save the scaled vector to a wave file using the command E 9
audiowrite(filename, audiovector, fs);
and play it back as a file on your laptop independent of Matlab.
D 7
The audiowrite command will clip amplitude values outside the range of -1 and 1.
The audiowrite command will clip amplitude values outside the range of -1 and 1.
E 7
D 6

bevans@ece.utexas.edu
E 1