Shop OBEX P1 Docs P2 Docs Learn Events
generating sounds — Parallax Forums

generating sounds

ArchiverArchiver Posts: 46,084
edited 2004-02-12 15:48 in General Discussion
I'd like to use FREQOUT to make my BS2 make a sound like a bell
ringing. It's for my circuit where the user has to select the right
buttons. If they select the right button, I want to make a sound
like what you hear on a game show when someone gets a right answer.
Kind of a "ding" sound. I'll also make a buzzer sound for wrong
answers, but I know how to do that.

Is it possible to make a "dinging" sound with the stamp? I don't
want to have to use an auxillary audio playback module or anything.
I'd like to only use the stamp. Also, is there some program I can
run on my PC to play the tones written in PBASIC, or do I have to
load them onto the stamp to hear them?

Thanks in advance for the help. You guys are extremely helpful.
I've learned so much stuff just from reading the archived messages
here.

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2004-02-11 22:42
    At 10:25 PM 2/11/04 +0000, you wrote:
    >I'd like to use FREQOUT to make my BS2 make a sound like a bell
    >ringing. It's for my circuit where the user has to select the right
    >buttons. If they select the right button, I want to make a sound
    >like what you hear on a game show when someone gets a right answer.
    >Kind of a "ding" sound. I'll also make a buzzer sound for wrong
    >answers, but I know how to do that.
    >
    >Is it possible to make a "dinging" sound with the stamp? I don't
    >want to have to use an auxillary audio playback module or anything.
    >I'd like to only use the stamp. Also, is there some program I can
    >run on my PC to play the tones written in PBASIC, or do I have to
    >load them onto the stamp to hear them?
    >
    >Thanks in advance for the help. You guys are extremely helpful.
    >I've learned so much stuff just from reading the archived messages
    >here.

    If you use FREQOUT and use two frequencies slightly off from one
    another you will hear a fading-in/fading-out if played continuously.
    This fading effect is the BFO (Beat Frequency Oscillation) between
    the two frequencies. You can use this to your advantage to simulate
    a 'Ding' by only allowing the duration of FREQOUT to last until the
    BFO frequencies come together and fade out once. I have an example
    of code to simulate a 'DING'...'DONG' used as a doorbell at the house
    I can follow up with tomorrow.

    -Beau Schwabe
  • ArchiverArchiver Posts: 46,084
    edited 2004-02-12 15:18
    Ooh, that sounds like exactly what I'm looking for. Thanks!

    Andy

    --- In basicstamps@yahoogroups.com, "Beau Schwabe" <bschwabe@a...>
    wrote:
    >
    > If you use FREQOUT and use two frequencies slightly off from one
    > another you will hear a fading-in/fading-out if played continuously.
    > This fading effect is the BFO (Beat Frequency Oscillation) between
    > the two frequencies. You can use this to your advantage to simulate
    > a 'Ding' by only allowing the duration of FREQOUT to last until the
    > BFO frequencies come together and fade out once. I have an example
    > of code to simulate a 'DING'...'DONG' used as a doorbell at the
    house
    > I can follow up with tomorrow.
    >
    > -Beau Schwabe
  • ArchiverArchiver Posts: 46,084
    edited 2004-02-12 15:48
    At 03:18 PM 2/12/04 +0000, you wrote:
    >Ooh, that sounds like exactly what I'm looking for. Thanks!
    >
    >Andy
    >
    >--- In basicstamps@yahoogroups.com, "Beau Schwabe" <bschwabe@a...>
    >wrote:
    > >
    > > If you use FREQOUT and use two frequencies slightly off from one
    > > another you will hear a fading-in/fading-out if played continuously.
    > > This fading effect is the BFO (Beat Frequency Oscillation) between
    > > the two frequencies. You can use this to your advantage to simulate
    > > a 'Ding' by only allowing the duration of FREQOUT to last until the
    > > BFO frequencies come together and fade out once. I have an example
    > > of code to simulate a 'DING'...'DONG' used as a doorbell at the
    >house
    > > I can follow up with tomorrow.
    > >
    > > -Beau Schwabe

    'DING-DONG

    freqout 7,275,1200,1202
    pause 10
    freqout 7,450,900,901
    Loop:
    goto Loop
Sign In or Register to comment.