Shop OBEX P1 Docs P2 Docs Learn Events
Music using the stamp — Parallax Forums

Music using the stamp

eiplannereiplanner Posts: 112
edited 2009-12-31 06:12 in BASIC Stamp
It doesn't appear through my reading of the forum subjects that many people are attempting or having any success at playing music with the bs2.
After finally getting an amplifier tuned in and working satisfactorily, I am now ready to put some tunes through it.

I read somewhere that the bs2 can play only two notes at a time. Does this mean 2 frequencies in the FREQOUT command is the only way to get 2 notes
simultaneously, or is there another way to actually play the two distinct frequencies simultaneously?


I tried two FREQOUT commands with outputs to two separate I/O points (executed one right after the other) but this only slowed the playback time by half.

Do I need to say "the heck with it" and buy a propeller chip? Or, is there an easy way to build a module that will play many notes at once?

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-12-30 05:09
    The 2 frequencies in the FREQOUT statement is the only way to get 2 notes simultaneously. You can't generate more than 2 tones at the same time with a Stamp without external sound generation hardware.

    A Propeller would be much better for playing music. It's fast enough to generate multiple tones simultaneously with one cog and you have 8 cogs to work with.
  • eiplannereiplanner Posts: 112
    edited 2009-12-30 05:17
    I was afraid of that. I was needing an excuse anyway to buy a prop. Thanks Mike.
  • hitswarehitsware Posts: 156
    edited 2009-12-30 15:56
    A pwmpal with the stamp is another option.
  • Mike GreenMike Green Posts: 23,101
    edited 2009-12-30 17:43
    A PWMpal would certainly provide for 4 additional tones and you could even attach more than one PWMpal to a Stamp (with some work), but a Propeller would be more flexible and cheaper. The PWMpal would provide only a squarewave-based tone while the Propeller would allow you to generate all sorts of tones.
  • hitswarehitsware Posts: 156
    edited 2009-12-31 04:32
    Mike Green said...
    A PWMpal would certainly provide for 4 additional tones and you could even attach more than one PWMpal to a Stamp (with some work), but a Propeller would be more flexible and cheaper. The PWMpal would provide only a squarewave-based tone while the Propeller would allow you to generate all sorts of tones.
    No doubt.
    But for a certain disipline.
    (8 bit chiptunes)
    The PWMpal shines
    4 oscillators (tone control via duty cycle)
    with 4 (or more) pins for external envelope
    control

    ·
  • HumanoidoHumanoido Posts: 5,770
    edited 2009-12-31 06:12
    There are hundreds of sounds, tunes, notes, etc. posted for the BASIC Stamp 2px, programmed for the Penguin Robot. You can use these without the robot. The timing can be modified for the BS2. Also take a look at the JukeBox for some tunes. The VR Sound Chip has some amazing sounds. Begin your downloads here:

    www.robotinfo.net/penguin/

    and here

    www.p-robot.com/

    You can get more chords using more than one Stamp.
    The Basic Stamp Supercomputer with 12 stamps can play 24 notes at the same time.
    You could use 2 stamps, or the SoundPal is another way to stir up some extra notes.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    humanoido
    *Stamp SEED Supercomputer *Basic Stamp Supercomputer *TriCore Stamp Supercomputer
    *Minuscule Stamp Supercomputer *Three Dimensional Computer *Penguin with 12 Brains
    *Penguin Tech *StampOne News! *Penguin Robot Society
    *Handbook of BASIC Stamp Supercomputing
    *Ultimate List Propeller Languages

Sign In or Register to comment.