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

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

From: tedd <tedd@...>
Date: Thu, 20 Jun 2002 15:53:12 -0400
Richard:

>  As for the Sound Manager, I am using it for audio output
>by Sebastian. Alain Pastor and others suggested that I use
>SoundChannelStatus as a means to signal when a piece of music has finished
>playing. However, this failed for me. The reason that I can't use it is
>that my melodies are stored as strings of data. One character of each pair
>of characters in the string is used for the frequency of the note and the
>other character for the duration. The Sound Manager's SndPlay function is
>accessed for _each note_ as it was done in Hommel's Sound Tutor. Therefore,
>after each note has sounded, SndChannelStatus would give a signal that the
>channel is empty. I don't see how I can used the Sound Manager to indicate
>that the melody is completed because of this. If it were possible to sound
>the music synchronously rather than asynchronously, then I would have no
>problem. However, FB^3 apparently plays all music asynchronously via the
>Sound Manager. Therefore, the entire melody string is read and supplied to
>the sound queue while the first note is just sounding.

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

-- 
http://sperling.com