[comp.sys.atari.st] questions about GFA basic and REPLAY 4

tmwhitehead@miavx1.acs.muohio.edu (01/16/91)

I have REPLAY 4 (awesome sound digitizer)
I also have GFA Basic 3.(something)
I have a 1040 ST with a color monitor.

My question is this:
REPLAY 4 comes with sample GFA source to play digitized sounds, however, this
is slow. it even causes the mouse to stop...I'm trying to write a game and I
need something faster than what I'm using.  The source I'm using loads a
program called bascode.exe.  Does anybody have or know where I could get a more
efficient module I could call from GFA basic to play digitized sounds?

My second question is this:
The game I'm writing is, essentially, one large loop.  Currently, I have a
variable that I increment each time through the loop and use as a counter to
determine the timing of certain events.  however, since the program falls
through different segments of code depending on the players actions and the
timer value, the speed changes.  I've been able to control it somewhat by
putting in small pauses in the right places, but if I could get access to an
internal timer, I could use that to time my rpogram.  I need pretty small
increments (probably at LEAST 1/100 of a second...)

THANKS for any help/suggestions....

Todd Whitehead

tmwhitehead@miavx1

emerson@gandalf.Berkeley.EDU (Emerson Mei) (01/16/91)

There is a program to play back four channels of sound while taking a 
maximum of 33% of the processor time.  It's written by the CareBears. 
 It is almost certain that it can use replay 4 samples.  It's called
 TCBSOUND; Retails at $99. In stock at the Atari dealers in this area!

 However, I don't no if it can be called from GFA Basic.

rlcollins@miavx1.acs.muohio.edu (Ryan 'Gozar' Collins) (01/22/91)

In article <3374.27938072@miavx1.acs.muohio.edu>, tmwhitehead@miavx1.acs.muohio.edu writes:
> I have REPLAY 4 (awesome sound digitizer)
> I also have GFA Basic 3.(something)
> I have a 1040 ST with a color monitor.
> 
> My second question is this:
> The game I'm writing is, essentially, one large loop.  Currently, I have a
> variable that I increment each time through the loop and use as a counter to
> determine the timing of certain events.  however, since the program falls
> through different segments of code depending on the players actions and the
> timer value, the speed changes.  I've been able to control it somewhat by
> putting in small pauses in the right places, but if I could get access to an
> internal timer, I could use that to time my rpogram.  I need pretty small
> increments (probably at LEAST 1/100 of a second...)

GFA Basic 3.0 has a command called every, with the syntax:

EVERY ticks GOSUB proc

ticks are in 1/200 of a second, so:

EVERY 200 GOSUB move_char

Every 200 ticks (1 sec) the procedure move_char is executed.

EVERY STOP   stops the command and EVERY CONT continues.

~~~~~~~~~~~~~~~~~~~~~~~~~ Ryan 'Gozar' Collins ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            o__)\			     rlcollins@miavx1.BITNET
           /     )			      RC1DSANU@miamiu.acs.muohio.edu
          /     /  ____                       R.COLLINS1  (On GEnie)
         /(____/__(_) o)_/
                      /)			[ || ]   Atari Computers,
      "There is no Substitute."                 [ || ]    They're not just
 Vs lbh pna ernq guvf, lbh'er geniryvat        // || \\   for breakfast 
            gbb pybfr!                        //  ||  \\  anymore
~~~~~~~~~~~~~~~~~~~~~~Yea, right, thats what I said.~~~~~~~~~~~~~~~~~~~~~~~~~