Hello I want to write code to imitate siren sounds li Air horn pulsar wait yelp .
i have used freqout to make first 2. but others do not stop when i unpress button lease advise what to do?

If PORTB.7 =0 THEN
Freqout PORTB.0,4,1700 ;------------- air horn
Freqout PORTB.0,4,850
Freqout PORTB.0,4,1250
Freqout PORTB.0,4,425
Endif
If PORTB.6 =0 THEN
Freqout PORTB.0,8,366 ;------------- pulsar
Freqout PORTB.0,8,483
Freqout PORTB.0,8,591
Freqout PORTB.0,8,664
Freqout PORTB.0,8,760
Freqout PORTB.0,8,886
Freqout PORTB.0,8,967
Freqout PORTB.0,8,1070
Freqout PORTB.0,8,1182
Freqout PORTB.0,8,1330
endif

for this too freqout is ok because they are short what to do with longer ones?