[futurebasic] Re: [FB] Sound Manager

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

From: Robert Covington <artlythere@...>
Date: Fri, 25 Jan 2002 11:09:29 -0500
>Hi gang:
>
>Anyone have any code dealing with the Sound Manager?
>
>I'm not interested in generating MIDI notes (FB does that easily
>enough), but rather I'm interested in generating specific frequencies.


How do you generate MIDI notes? (I may be writing a simple sequencer)


>I have some code that generates specific frequencies, but it
>generates some odd harmonics and I'm trying to get my mind around how
>the Sound Manager works. Any help would be appreciated.
>
>I also would like to see a working demo of how one controls right and
>left speaker volumes. I've read about it in IM, but I'm still in a
>fog as to how to control it.

I don't have time to write a demo, others probably don't either. You can
hack it. :)

Just go in to FB 3 Donations folder, and Derek's Edtris program, and nab
the Sound.incl or whatever it is called. It is a wondrous gift horse.

For stereo, you need to change the init flag.. _initStereo vs. _InitMono

in FN Sound Init

for ChanNR = 1 to _mySoundChannels'loops thru the available channels
osErr% = FN SNDNEWCHANNEL
(gSoundChannel.sPtr&(ChanNR),_sampledSynth,_initStereo,PROC
"EndOfSoundProc") 'make new channel sound
next ChanNR


For panning, Find the SetVolume FN and then change whatever parameters
needed to set an individual channel. Might require some changes. For one,
you won't want to loop thru all the channels setting the volume the same in
your case.


Robert