Baker Johnson
Baker Johnson

Reputation: 253

Converting .wav files to an array in MATLAB

I am interested in creating an artificial neural network to create a simple guitar tuner and I am in the process of training the ANN in MATLAB. I am currently using [y, Fs, nbits] = wavread('file.wav') to capture the sound and then call X = fft(y,256) to generate an array. I want to generate the array so that I can use it as the input for the ANN. I would like to know if there is a better way to do this conversion since I am not getting the desired result.

Upvotes: 0

Views: 1636

Answers (1)

lennon310
lennon310

Reputation: 12689

I guess your y(:,1) and y(:,2) represents the left and right channels respectively, and they are probably identity. You can apply fft on only one of them.

Another approach if you are handling two different channels is that you can use two nodes at input layer with y(:,1) and y(:,2) as the value.

Upvotes: 1

Related Questions