1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Is this wave interference? Sound mixing problem.

  1. Dec 11, 2015 #1
    This is my first post here, so hello to all.

    I came here looking for advice. I am far for considering myself even a newbie regarding physics, I have huge gaps in knowledge. However, as I happen to "know my way around computers", I am helping my friend in her art project. Sparing you the details, my task is to synthesize sound basing on some numeric data.

    I have 400 channels of deifferent frequencies (with equal interval between them), and I generate samples of say, 1 second sine wave for each channel. Then I mix all these samples to a "master sample" of one second, and concatenate all "master samples" I get to make a wave file. I am using sox (http://sox.sourceforge.net/) for sound synthesis. It all works pretty well up to the point of mixing. All the samples played separately sound just as sine waves would :). But while mixing even few of them, a strange (to me) phenomenon happens, sound starts to seem muffed/surpressed and a kind of vibrating effect happens.

    Again, my lack of knowledge is a shame, but I tried to find an answer and from what I undestood, it might be a destructive wave interference. Am I right? If so, would you be able to suggest any way of avoiding this? I was expecting to receive a kind of noise as a result, but did not predict this to happen. I am attaching some samples so you could hear it for yourself.

    Thanks in advance.

    Attached Files:

  2. jcsd
  3. Dec 11, 2015 #2


    User Avatar

    Staff: Mentor

  4. Dec 11, 2015 #3


    User Avatar
    Gold Member

    Have you looked at the waveforms?
    The stuff I downloaded was so small amplitude I had to apply 100dB amplification to see the shape.
    The 6, 135 and 295 files do seem sine waves of about 107 Hz, 485 Hz and 961 Hz give or take about 10%.
    Obviously they will produce beats, but I don't think the waveform in file 1 looks like beats nor even beats of beats, etc. That would take more than 3 components I think.

    What I suspect is rounding errors and word size limit effects. When you add numbers (digitised sounds) where one number is very much smaller than the other, the small number simply gets lost. At points where the larger sound wave is very close to zero and the smaller waves are near their maximum, then the result could be a real addition of all waves. In between, where the larger wave is much larger or the smaller waves are also near their zero, then only the larger wave appears in the mix. To be honest I still can't quite see how this gives the waveform of file 1, but that is the sort of thing I'd expect to see.

    I haven't actually managed to recreate your 1 file yet, as I immediately amplified them and now need to download the originals again.. If I add the three original files after amplification, I get various results depending on the relative levels of each sine wave, but the mixtures are all sensible waves that you'd expect - nothing odd like your 1 file.

    I would suggest you check the levels before adding them again.

    PS. I've done the remix with originals and I don't get 1.wav, just what you'd expect. I'm still trying to work out how you upload such a file to show you. Maybe I'll have to send a screenshot of the wave.
    Last edited: Dec 11, 2015
  5. Dec 11, 2015 #4


    User Avatar
    Gold Member

    I see you zipped them, so I've followed suit.

    Attached Files:

    • My1.zip
      File size:
      76.8 KB
  6. Dec 14, 2015 #5
    Thank you for the replies!

    I guess I was not specific enough - that's probably due to my English, I'm not used to speak about such topics. The three samples I've posted are only three random examples that are part of the mixed whole. Now I am uploading all 399 samples that got mixed to one file, so you can recreate this effect. The amplitudes are so low to avoid sox complaining about clipping. Frequencies are 80 - 1274hz (roughly 3hz interval). It really seems like beats, I've never heard about them though (I knew "beat" as in rhythm, a term used in music). I need to spend some time figuring this out :).

    Here are the files (too big to uplad directly):

  7. Dec 15, 2015 #6


    User Avatar
    Gold Member

    Well, after a lot of investigation adding lots of sine waves together, I'm afraid I have to eat my words - it IS beats! I didn't think you could get such widely spaced and very large pulses, but you can. I have tried mixing sets of signals both in Audacity and numerically in Excel (sorry, I've no Matlab or other more suitable software handy at the moment) and found similar results with only a few closely spaced waves mixing. And deliberately adding rounding errors makes little difference to the pattern of the graphs, just makes them a bit ragged.

    Because all the waves start at the same time, they are all in phase at 0 time and all add to produce a large wave. Quickly they move out of phase, no longer add so constructively, start to add destructively and stay that way for many cycles. But of course at the end of 1 sec they have all completed a whole number of cycles and are back in phase again. That explains the peak at the start and end of the second.
    I was a bit surprised by the two peaks in between at 1/3 and 2/3 seconds. I thought there might be a smaller peak at 1/2, smaller yet at the thirds and so on. I think the big peaks at the thirds must be related to the 3Hz steps, but so far mathematical analysis has defeated me (but I am old and very out of practice with maths.) So I'm just cheating and doing lots of numerical experiments. If anyone is interested, I'll post some results later.

    Attached Files:

  8. Jan 12, 2016 #7


    User Avatar
    Gold Member

    Thanks for the like.
    I've dug out the other work I did. It's in the form of a .docx. Let me know if that's not good for you and I'll convert it to some other document format.
    I've put a brief commentary with it, but very brief! (I did not know if anyone would be interested.)
    NB. beats between two frequencies are actually produced by an average frequency, modulated at half the difference frequency. So 80Hz and 84Hz produces 82Hz modulated at 2Hz. BUT we hear this as 82Hz pulsing at twice this rate, 4Hz, because each cycle of modulation contains a positive and a negative 'bump'. In the document I refer to the pulse rate as the beat frequency, except for the very first example where I make a comment about this. So I talk as if 80Hz and 84Hz produce a 4Hz beat. (Don't worry about this, as it will make sense to most people, as written! I only comment on it to prepare for the uptight PF physicists taking me to task!)

    (I can only get the first part to upload, so far. Perhaps the files are too big. I'll send the second part in another post if you want to see it.)

    Attached Files:

Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Discussions: Is this wave interference? Sound mixing problem.
  1. Wave interference (Replies: 4)

  2. Wave interference (Replies: 6)

  3. Interference of sound (Replies: 4)