GW-Basic Programe to Demonstrate Siren sound
Here is the Code listing for the GW-Basic Program which demonstrate the siren sounds using SOUND statement along with FOR-NEXT Loop.
Code
10 For R=1 To 8
20 REM *******Rising Pitch *********
30 For F=200 To 400
40 Sound F, 0.1
50 Next F
60 REM *******Decreasing Pitch *********
70 For J= 400 To 200 Step -2
80 Sound J, 0.1
90 Next J
100 Next R
110 End
Output
* This program will generate sound of Siren