IMHO, a very good book for getting up to speed quickly on this stuff is "A Programmer's Guide to Sound". Amazon link: <http://tinyurl.com/2wzdg> (FYI, I have no affiliation with either Amazon, or the author Tim Kientzle.)
-Jon -------------------------------------------- Jonathan Hays Palm OS Certified Developer http://hazelware.luggle.com -------------------------------------------- -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Sergei Gerasenko Sent: Friday, April 09, 2004 7:09 AM To: Palm Developer Forum Subject: Re: sampled sound > OK, then try constructing your synthesis function based on > instantaneous phase. For each sound sample (11025 or 22050 samples > per second) do this: > > phase = phase + offset > if(phase >= 360) phase -= 360; > sample[i] = <some formula based on phase, maybe a lookup table> > i++; > > When "i" reaches the end of the current buffer, start another buffer, > but don't reset phase. It should be continuous across buffer > boundaries. By the way, the code shown above will have to be > optimized for speed. You probably won't be able to keep up in > real-time if you use floating point. You could express phase and > offset as a 16-bit or 32-bit integer with an assumed binary point > somewhere in there. Where you put the binary point depends on your > need for frequency resolution and range. For example, if phase is > > .xxxxxxxx xxxxxxxx > > and if your sample rate is 11025 samples per second, then you can > express frequencies as high as nearly 11025 Hz with a resolution of > 0.168 Hz. Offset is like frequency. Good luck. Thanks, Robert. I now need to think about it. I need to get a book on computer sound for sure 'cause I want to know what I'm doing. I very much appreciate your thoughts on this. I'll need to digest them now :) By the way, can I still use the emulator for testing all this? The docs say that the latest ROM for the emulator is 4.0. Is that enough? -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
