Shop OBEX P1 Docs P2 Docs Learn Events
Making Percussion sounds with FREQOUT? — Parallax Forums

Making Percussion sounds with FREQOUT?

TonyATonyA Posts: 226
edited 2005-11-01 17:59 in BASIC Stamp
Hi,

I'm experimenting with creating sounds with the FREQOUT command. I can get bleeps and beeps, which are cool.
Has anyone been able to produce drum or percussive sounds? I know it's possible, just don't know how to begin.

Thanks for any info, it's appreciated.

Tony A

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-11-01 17:01
    I don't think it's possible. Percussive sounds have a VERY fast attack and a curved decay -- and that envelope is usually modulating a white or pink noise source. The FREQOUT instruction is designed to create (with proper filtering) nice sine waves, and envelope control is not part of the instruction.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • steve_bsteve_b Posts: 1,563
    edited 2005-11-01 17:33
    You might use the stamp to control a DC source that would 'crack' the coil....

    an old test on questionable speakers was to put a 9vbattery across the terminals to see if the coil still worked. This would push the coil totally in one direction and would give a pop. Maybe PWM might work for you?
    I'm merely thinking of the top of my head, and have not tried this....so you take your own risks!! Have ruined my own speakers in the past and it was losing a loved one!

    I don't know if the stamp can control PWM fast enough that you could "force' an envelope (of a sort). -- start with one PWM value and then step down through a couple other ones to get the 'curve' Jon was talking about.
    An SX might be faster for this!

    It's up to you to determine what voltage you can safely put across your speakers if using this method....

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·

    Steve

    "Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
  • TonyATonyA Posts: 226
    edited 2005-11-01 17:48
    Interesting idea. Thanks for the input.

    I am able to produce clicking sounds that are produced at the same time as some beeps. Together it sounds pretty cool.
    I should try filtering too.

    You can get some very cool sounds from the stamp alone.

    Thanks again,
    Tony A
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-11-01 17:59
    How about using the filter circuit for FREQOUT, then pump it with random width PWM pulses (likely through the command PULSOUT), I think this should simulate a low pass white noise waveform.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·1+1=10
Sign In or Register to comment.