Combining different frequency notes

Discussion in 'General Electronics Chat' started by Razor Concepts, Oct 28, 2009.

  1. Razor Concepts

    Thread Starter Active Member

    Oct 7, 2008
    212
    1
    Say I have a microcontroller that outputs a 0-5v square wave to a speaker at 440hz. Then, what if I want to play a 260hz sound at the same time (so it sounds as if there are both 440hz and 260hz sound coming out). How do I do this? Also is there a way I can do volume control for each individual sound? Thanks!
     
  2. Boo

    Member

    Oct 27, 2009
    40
    0
    Hmmm I may be remembering physics wrong, but if those two sounds are in phase all what you will hear is the beat, which is 440-220 or 440+220, so effectively, you could output either sound. Not sure which frequency is right. How are you generating the 440hZ?
     
  3. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    If you put each through a low pass filter to remove the harmonics of the square wave, then feed them to an audio amplifier, you would get something like a "chord".

    Digital audio needs to be mixed differently than analog audio, the simplest is to make the output analog, then do mixing. This is where the early CD players differed in "Distance of Digital Path" before the output, some leaving it in PCM the entire path for an external DAC to convert at a higher fidelity.
     
  4. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
Loading...