Shop OBEX P1 Docs P2 Docs Learn Events
songs — Parallax Forums

songs

edited 2008-05-06 22:43 in BASIC Stamp
does anyone have a program for the boe-bot that makes it sing?
i need to be able to play chords with 3 notes in them and i need to play a song on the boe-bot but i need a program also...

Comments

  • DgswanerDgswaner Posts: 795
    edited 2008-05-05 22:22
    I've never done music on the Basic Stamp, so I might be wrong but it is my understanding the the stamp can produce a Tone (note) but it would not be able to play 3 notes at the same time. perhaps if you had 3 sound pals you could generate 3 tones fast enough that it would sound simultaneous. The propeller could do it tho!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "A complex design is the sign of an inferior designer." - Jamie Hyneman, Myth Buster

    DGSwaner
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-05-06 00:04
    Every_Rose...,

    This came up just recently here. Oh, wait, that was your post, and you got some answers there. If I were in your situation, I'd settle for two-part harmony and use the FREQOUT command.

    DGSwaner,

    The Three Tenors (SoundPALs) approach, though seemingly doable, would not work. The reason is that the SoundPAL uses an RC oscillator for pitch and tempo. Synchronizing two or more of these units would be an exercize in frustration, I'm afraid. The Propeller, as you point out, could easily do multi-part harmony.

    -Phil
  • HumanoidoHumanoido Posts: 5,770
    edited 2008-05-06 09:33
    By singing, you are talking about playing some musical notes/chords and tunes. If you're willing to change the timing, there's 210 sound programs posted here. These are originally written for Penguin Robot but some can be modified for the slower BS2 speed and lower toned notes and chords for BoeBot. It's up to you to decide if the morphed and cloned chords are suitable for your application.

    virtual sound chip programs (210 programs)
    http://forums.parallax.com/showthread.php?p=696966


    To look at how to create chords, the Penguin Robot Jukebox has some tunes with chords. Take a look at the code for "Daisy."

    penguin_jukebox.bpx
    http://forums.parallax.com/showthread.php?p=690306


    You can use the FREQOUT statement to play two note cords very easily. To play three, you'll need to look at the VSC channels. If you know the chord notes, construction of a pseudo "copy chord" is possible as some of these waveform types are matched or approximated by feeding into a sound oscilloscope. The other technique is to morph the sound using parameters in the VSC code. There are some limited comments in the code about morphing music, although extensive morphing documentation is a future item. Again, try out the programs and if there's suitability then the technique can be adapted for your project.

    If this is not satisfactory, there's another idea, to get full three note chords, - add another basic stamp 2, network it, and send out multiple notes from each stamp. Each stamp can do a two note cord. This techniques yields 4 notes with two stamps. The two speakers can be arranged for stereo. Three stamps and three speakers give surround sound. Take a look at the attached circuit diagram for connecting two stamps. For more information, check the manual or the Editor Help File under the SEROUT topic.

    Add another Basic Stamp
    http://forums.parallax.com/attachment.php?attachmentid=53561


    There's another posting here about chords where precise frequencies and useful ideas are given.

    Another posted sound thread
    http://forums.parallax.com/showthread.php?p=724792


    And finally, don't forget to explore the other ways of making music. Here's some Penguin Robot sound generating demonstration programs using FREQOUT, PULSOUT, SEROUT, TOGGLE, and the VSC Demo that brings it all together.

    penguin_freqout.bpx
    http://forums.parallax.com/showthread.php?p=720802

    penguin_pulsout.bpx
    http://forums.parallax.com/showthread.php?p=720806

    penguin_serout.bpx
    http://forums.parallax.com/showthread.php?p=720813

    penguin_toggle.bpx
    http://forums.parallax.com/showthread.php?p=720807

    penguin_virtual_soundchip.bpx
    http://forums.parallax.com/showthread.php?p=720799


    You can also improve your music with various sound elements such as vibrato.

    penguin_vibrato_machine.bpx
    http://forums.parallax.com/showthread.php?p=690301


    If you plan to use the peizospeaker exclusively, the volume can be tweaked with this code.

    penguin_virtual_volume_amp.bpx
    http://forums.parallax.com/showthread.php?p=698498


    and there's a small sound tutorial for more ideas.

    sound_tutorial.rtf
    http://forums.parallax.com/showthread.php?p=701526


    humanoido

    Post Edited (humanoido) : 5/6/2008 9:49:02 AM GMT
    268 x 109 - 7K
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-05-06 22:43
    Duplicate posts are not allowed on these forums. Due to replies I'll leave the extra posts but you need to follow up on you original post only. Asking for help in three threads is confusing and against our forum guidelines. For your convenience I will link your original thread in both duplicate posts.

    http://forums.parallax.com/showthread.php?p=724792

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
Sign In or Register to comment.