Two examples of frequency manipulation

Synthesizer



Now we are going to sample a piece of music (a blues by Roy Buchanan). We have extracted two 24 bars of the piece, which corresponds to 2 grids of a twelve bar blues. The first part is played pizzicato by Roy, the second bar brings on the whole band.

Download the zipped wav file (15.86 MB) and save it to your Matlab work folder.

Now, if you are not alone, it is time to plug your headset into your computer!

To import the file into Matlab, execute the following script:

clear all;
[blues,Fs] = wavread('When_a_Guitar_Plays_the_BluesShort.wav');

Fs
is the sampling frequency and since the wav files is in stereo, the blues signal is a two column array.

To play a stereo or mono sound in Matlab, use the sound function. To listen to the imported file, execute

sound(blues,Fs);

To display one of the channels, execute

figure(1); plot(blues(:,1));

shortBlues
you can easily see the difference between the two parts.

We shall concentrate on the first note of the intro and use it to build a very simple synthesizer in the manner of the 80's, without any attack or shaping of the sound. To do so execute the following commands:

extract = extract(10001:50000);

and listen to the result

sound(extract,Fs);