Shop OBEX P1 Docs P2 Docs Learn Events
Robot cricket Sound — Parallax Forums

Robot cricket Sound

ArchiverArchiver Posts: 46,084
edited 2000-12-16 14:19 in General Discussion
>A while ago someone had posted a cricket sound they created with their stamp.
> Does anyone know about that?
>
>Also any one have some neat sounds that they can make with their stamp?

' piezo xducer on P0
i var nib
cricket:
for i=1 to 7
freqout 0,8,2500
pause 6
next
pause 1000
goto cricket

That is from unit 2 of Earth Measurements
http://www.emesystems.com/EarthM/em2.pdf
There are some other examples there. The approach is, you can get
two tones out of a freqout command, and that includes some quick fade
or warble effects when the two frequencies are one or two hertz
apart.
freqout 0,1,2500,2501 ' chime with quick fade
A very short duration freqout comes out as a click. You can add
subtones by putting freqout in a loop with short delays, as in the
cricket example. Add another dimension by changing the frequency or
the durations within the loop, in a pattern or random. You can get
some nice R2D2 type effects. Just sit down for an hour and have
fun experimenting. Of course, you can play tunes, too, but you don't
want your robot going around singing jingle bells all the time.

Sid posted a sound of a diesel engine a few days ago,
http://www.egroups.com/message/basicstamps/6920
I haven't had a chance to try it out yet, but it "sounds" really
neat. He uses PWM in a loop to modulated the volume over a longer
interval.

-- Tracy Allen
Electronically Monitored Ecosystems

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2000-12-15 16:51
    correction:
    freqout 0,1000,2500,2501 ' 1s chime with quick fade
    freqout 0,500,2500,2502 ' shorter chime with quick fade
    freqout 0,2000,2500,2502 ' warble


    not
    freqout 0,1,2500,2501 ' just a click
  • ArchiverArchiver Posts: 46,084
    edited 2000-12-16 14:19
    Thanks very much for your input. I will give it a try.
Sign In or Register to comment.