Since FREQOUT doesn't have direct control over attack and decay dynamics, it's hard to get a good bell sound. However, by selecting two frequencies very close together, attack/decay dynamics can be approximated over short time spans, due to the beat phenomenon the two frequencies produce. Here's the best I could come up with:
FREQOUT SpeakerPin, 500, 500, 501
It's more like an elevator bong as it passes each floor, rather than a clang.
Comments
It's more like an elevator bong as it passes each floor, rather than a clang.
-Phil
'Techno Robbo's
'Train bell
' {$STAMP BS2}
' {$PBASIC 2.5}
OP· CON 12
i VAR Byte
OUTPUT oP
DO
· FOR i = 10 TO 120
··· PWM OP,i,1
· NEXT
LOOP
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Have Fun
TR
Post Edited (TechnoRobbo) : 9/15/2007 7:55:18 PM GMT