0
$\begingroup$

I need to read two .wav files. One of them is a song, and the other one is impulse response. Then, I have to convolve them.

In fact, I have read them by using scipy.io.wavfile.read() method. It returns two-dimensional array for each wav file. For the song, the array that it returns is of dimension 199001 x 2.

This is the point that what I cannot understand. Why is column numbers equal to 2 ?

The rows denote the samples, I guess. However, I do not know what columns refer to. To be honest, in signal processing lecture, we always encountered one value for each sample. However, in this case, there are two values for each sample.

Is there anyone who can explain this ?

$\endgroup$
2
$\begingroup$

It means your song is stereo (two channels). if that's not the case, then that is weird indeed.

| improve this answer | |
$\endgroup$
  • $\begingroup$ How can I convolve them ? Must each channel be convolved individually ? $\endgroup$ – Goktug Apr 10 '19 at 20:29
  • $\begingroup$ yes. each channel must be convolved individually. $\endgroup$ – robert bristow-johnson Apr 10 '19 at 20:42
  • $\begingroup$ Okey, I handled them. However, the problem is overflow during the computation of convolution. My signals consist of almost 197001 samples, and the sample values are very big. During the computation of convolution, I got overflow. $\endgroup$ – Goktug Apr 10 '19 at 22:10
  • $\begingroup$ okay, now you gotta worry about the impulse response that you're convolving each channel with. maybe those numbers are too big. $\endgroup$ – robert bristow-johnson Apr 10 '19 at 22:46

Not the answer you're looking for? Browse other questions tagged or ask your own question.