Page 1 of 1

How do I use sound effects in a BASIC program?

Posted: Wed Jun 06, 2007 2:51 am
by Chris
I'm assuming that there are 4 sound effects the Oric is capable of (Shoot, explode, zap and ping.) What is the correct syntax of using these? Something like:
1 A=0
2 A=A+1
3 IF A>50 THEN SOUND PING
4 IF A>99 THEN A=0
5 GOTO 2

Would that make the 'ping' sfx go off repeatedly? I know a little bit of Basic from using Batari Basic, but am completely new at Oric machines and what they're capable of.

EDIT: Did some tinkering by myself and Found out if I take SOUND out, it works.
-Chris

Posted: Wed Jun 06, 2007 9:39 am
by Pengwin
Just one thing you need to be aware of is that if you start a new sound effect before the previous one has completed, it will override the old one.

Posted: Thu Jun 07, 2007 9:55 am
by Pengwin
After looking at the Atari version of the game, I see that the 'overlap' of sounds would actually work in this instance. :D

Posted: Thu Jun 07, 2007 11:23 pm
by Dbug
PING and ZAP are blocking sounds:

If you write

PING:PING:ZAP:PING:ZAP:PING

you will clearly hear the succession of pings and zaps. And the program is blocked during that time.

SHOOT and EXPLODE are non blocking, so if you write:

SHOOT:EXPLODE:EXPLODE:SHOOT:EXPLODE

it will just sound like an explosion