Shop OBEX P1 Docs P2 Docs Learn Events
BS2 playing WAV audio files? — Parallax Forums

BS2 playing WAV audio files?

The InterloperThe Interloper Posts: 4
edited 2007-04-23 23:37 in BASIC Stamp
I'm trying to see if I can create a circuit and program the BS2 so I can download a set of short, downsampled WAV audio files (11khz/8-bit) to the unit (more than likely an IC chip) which are triggered by·a simple switch. When you press the switch, the program randomly selects a wav file from the set and plays it. Essentially, I'm doing what many kids games and toy products do. Will connect a little 23mm Mylar speaker to the circuit.

Is this possible for the BS2? What's the programming script to get the WAV files on the chip? I'm only on Chapter 2 with the LEDs, but this is the whole reason I bought this kit.

Thanks!

Zee Interloper

Comments

  • mashersmashermashersmasher Posts: 7
    edited 2007-04-23 17:44
    i went through a few of the experiments last semester at school. the only sound covered by the end of the unit was using the "freqout" command to generate sounds on a piezoelectric speaker through pulses and another system that i forget that used actual notes. maybe there is some way to play midi files though
  • The InterloperThe Interloper Posts: 4
    edited 2007-04-23 18:02
    Yeah, the kit I have covers the FreqOut, and being a composer / audio engineer, MIDI production is my daily bread and butter. However, I specifically want to put WAV audio files on an IC chip, which is then played in various fashions via programs I create. This isn't uncommon: go the the toy isle of Target or Toys R Us, and they are everywhere: Cranium Squawkbox, Vtech educational toys, Sorry Revenge, Big Trouble, etc. All are playing VO, SFX, and music that were created, burned as WAV (or AIFF), and then bured onto Windbond, SOnix, or other chips (I've opened up several toys to this extent).
  • BeanBean Posts: 8,129
    edited 2007-04-23 18:25
    I think the AP-8 from efx-tek will do what you want. You'll still need the stamp to control the AP-8.

    http://www.efx-tek.com/topics/ap-8.html

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "Educate your children to self-control, to the habit of holding passion and prejudice and evil tendencies subject to an upright and reasoning will, and you have done much to abolish misery from their future and crimes from society"

    Benjamin Franklin
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    www.hittconsulting.com
    ·
  • The InterloperThe Interloper Posts: 4
    edited 2007-04-23 18:54
    Thanks Bean - this is a start. Browsing over the AP-8, it looks like I'm limited to 60 seconds of audio, which can only be broken up into 8 segments. It also works by recording the audio from the laptop into 1/8" input in the chip. I'll definately snag this unit and work with it.

    I'd still like to figure out how to download the audio to a chip directly though, and have audio of various lengths (segments) of my own choosing, which I can then program.

    For instance, I'd love to be able to program audio on a Sonix 735, or SunPlus or Windbond.
  • Mike GreenMike Green Posts: 23,101
    edited 2007-04-23 18:58
    The AP-8 uses a small Winbond chip. Quadravox (www.tetraphon.com/QVFrames.htm) sells several Winbond-based devices that have greater capacity and a new MP3-based device. These have been used very successfully with Stamps in the past. Parallax used to sell one of the older devices.
  • BeanBean Posts: 8,129
    edited 2007-04-23 19:02
    I'm just in the design phase of a module that will do what you want, but it wouldn't be available for quite some time (unless Jon beats me to it).

    It will have 2MB of flash memory enough for 90 seconds of 22K audio or 180 seconds of 11025 audio (I may even support 250 seconds of 8K audio).

    You will be able to load in .WAV files using hyperterminal/xmodem.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "Educate your children to self-control, to the habit of holding passion and prejudice and evil tendencies subject to an upright and reasoning will, and you have done much to abolish misery from their future and crimes from society"

    Benjamin Franklin
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    www.hittconsulting.com


    Post Edited (Bean (Hitt Consulting)) : 4/23/2007 7:31:19 PM GMT
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-04-23 20:36
    What about the uMP3 from Rogue Robotics? It takes standard MP3 files and a WAV can be easily converted into an MP3.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • The InterloperThe Interloper Posts: 4
    edited 2007-04-23 23:37
    Mike - thanks for the Quadravox tip. Looks like they have some non-message chips that will work great.

    Bean - keep me abreast of the module you're working on. I'm interested.

    Zee Interloper
Sign In or Register to comment.