TristanZ222TristanZ222 Posts: 2
edited 2015-11-23 - 17:21:21 in Microcontrollers
Hey, is there a way to either use two speakers and play two different melodies simultaneously or use one speaker to play two different parts? I'm trying to play a song and I want both bass and melody to play from the boe bot


  • The FREQOUT statement can play two tones simultaneously using one I/O pin to drive one speaker. The duration of both notes has to be the same. A lot of simple songs can be played this way. If one part is silent, just provide the single active frequency to FREQOUT.

    You can't play two independent tones and you can't use two speakers although you could drive them in parallel with a simple passive filter for each (for low and high tones).

    If you really want two independent sound channels, use a Propeller. There's a nice 4-channel synthesizer in the Propeller Object Exchange that does 4-part vocal harmony synthesis (in stereo!)
  • ercoerco Posts: 19,513
    Per Mike, the BS2 has a provision for two tones, but it sounds funny, not what I expected. I looked for but can't find a demo of Hero 2000 singing 'Laura my love', where the voice alternates harmony notes several times a second. That type of harmony sounds cooler to my ears. Could also be done just with FREQOUT but would be a whole lot of work. The BS2 would enjoy more popularity IMO if there were some new GUI apps to generate code more easily, as the Scribbler GUI did. Another brand processor has several "Wizards" built into the textual programming editor. These GUIs auto-generate code for sound sequences (and let you hear them before generating code) , PWM variables, custom LCD characters, etc.
    "When you make a thing, a thing that is new, it is so complicated making it that it is bound to be ugly. But those that make it after you, they don’t have to worry about making it. And they can make it pretty, and so everybody can like it when others make it after you."

    - Pablo Picasso
  • Wasn't the two tone feature in the BS2 derived from FSK modulation for dialing telephones? Not the kind of harmony one expects in music.

    Hwang Xian Shen, Puddleby-on-the-Marsh.
    All things considered, I can live and thrive without Microsoft products. LINUX is just fine.
Sign In or Register to comment.