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$

closed as off-topic by Marcus Müller, Stanley Pawlukiewicz, lennon310, MBaz, Peter K. May 9 at 18:07

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "General programming questions are off-topic here, but can be asked on Stack Overflow." – Marcus Müller, Stanley Pawlukiewicz, lennon310, MBaz, Peter K.
If this question can be reworded to fit the rules in the help center, please edit the question.

2
$\begingroup$

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

$\endgroup$
  • $\begingroup$ How can I convolve them ? Must each channel be convolved individually ? $\endgroup$ – Goktug Apr 10 at 20:29
  • $\begingroup$ yes. each channel must be convolved individually. $\endgroup$ – robert bristow-johnson Apr 10 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 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 at 22:46

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