[futurebasic] Re: [FB] ON TIMER event handling

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : June 2002 : Group Archive : Group : All Groups

From: Richard Goodman <bhomme@...>
Date: Sun, 23 Jun 2002 08:54:49 -0700
Alain wrote:

There is a mistake in the Reference Manual it seems. No such
statements as ON TIMER END and ON TIMER OFF.
The correct statements are TIMER END and TIMER OFF.

----------------------------------

Alain:

However, When I tried to use TIMER OFF, I got the following error message:

Error: Variable 'OFF' has not been DIM'ed.
in file Sebastian:HOMMEL SOUND TUTOR.INCL at line 32 in STOPTHEMUSIC
*Timer off*

Richard
*********************************************

Peter Bancroft wrote:

What have you tried synchronously? I was playing around with this some time
ago, and from memory it looked like it could be done. Maybe if you give me
some idea of where the problem is with synchronous sound, I can nut it out.

<code snip>

Peter:
I was unaware that one could manipulate SndStartFilePlay to play
synchronously. I'll have to look into that.

You also mentioned that some of the functions don't work with Carbon.
That's OK. I'm running System 8.6 and have no immediate plans to "move up"
to OSX. In fact, this is a good example of why I don't want to start
programming in Carbon. There are simply too many things that I've learned
how to do that wouldn't work any more. At my age, I don't want to spend the
time starting over, as it were.

*********************************************

Tedd wrote:

The sound manager deals with digital recordings, digital sounds (i.e,
speech), and sounds stored as resources.

You are using a sound program that uses text (like the old FB sound
statements) -- as such, the sound manager would not work with text
data.

However, it should not be too much of a problem to write a routine
that would take your note/duration text pair and generate sounds that
can be stored/saved as resources. From there, you would have absolute
control over start/end/channel/volume of the sounds generated.

If it were me, I'd look into that.

---------------------------------------
Tedd:

I assure you, I have been using the Sound Manager successfully with text
strings. Really! I got the idea from Hommel's sound tutor that he prepared
for earlier versions of FB. Each pair of characters in the string
represents a tone and a duration. (Other characters are thrown in to
represent the ends of measures, etc.) I use snd resources as musical
instruments and tell the Sound Manager to open a specified snd resource and
play it as a musical instrument at the specified frequency and for the
specified duration. Nevertheless, your suggestion to store an entire melody
as a single sound resource is a good idea. I don't have any idea how I
would go about doing that, however.

Richard

**************************************
To all who responded to my questions and problems, thanks for your ongoing
help.

Richard