Path: utzoo!utgpu!watserv1!watmath!att!pacbell!pacbell.com!ames!ncar!tank!msuinfo!cpsin2!gurney From: gurney@cpsin2.uucp (Eddy J Gurney) Newsgroups: comp.sys.mac.programmer Subject: How to get rid of clicking? Summary: Would use Sound Manager but WaveTableSynth doesn't work on all Macs Keywords: Sound Driver Message-ID: <1990Jun4.020601.9644@msuinfo.cl.msu.edu> Date: 4 Jun 90 02:06:01 GMT Sender: news@msuinfo.cl.msu.edu Organization: Michigan State University, East Lansing Lines: 39 Well, I'm glad to say I'm making some progress generating sound on the Mac - Thanks mostly to a some suggestions and some very helpful sample code from a couple of c.s.m.programmer's. Basically, I've given up on using the Sound Manager, at least until I get some sample code on how that works. (Does anyone know if the WaveFormSynth is working on Mac Plus/SE's yet? If not, it's probably useless to me anyway. I'm running a Mac IIcx, but I want my program to run on at LEAST a Plus and an SE.) So... I'm using the Sound Driver to generate the simple tones I need. I've generated a really nice-sounding 256-byte sine-wave table, which I use as the waveform for the FourToneSynth. Then I use StartSound to produce a few tones in a row, and, whatdya know, I get TONE*crackle*TONE*crackle*TONE*crackle*. (Sometimes. Other times it sounds perfect.) IM II says something about getting rid of this, but I don't quite understand how to do it correctly. At most I need three tones in a row (I'm only using two of the four channels, BTW) - sometimes there will be a rest between the tones, sometimes, their will be none. Also, while I'm posting... has anybody come up with a way to specify a FREQUENCY to FTSoundRec.sound1Rate instead of the rate? IM II gives the equation: frequency = FixMul(rate,FixRatio(22257,256)) I solved this for frequency, and got: (Actually, I had my HP-48SX do it. I didn't want to be flamed for not solving correctly :-) rate = FixRatio(frequency,FixRatio(22257,256)) Great you say, right? BUT: FixRatio only accepts INTEGER parameters, so the second FixRatio calculation doesn't work. For now, I'm just using the integer value '87', since (22257/256) = 86.94140625. Any ideas on how to make this more exact? (Not that my application is that critical, I'm just curious :-) Thanks for any help! (MacDTS: I anxiously await seeing "SoundApp" in the Sample Code on 'apple.com'!) -- Eddy J. Gurney, N8FPW -- gurney@frith.egr.msu.edu OR 17158EJG@MSU.BITNET (reachable via uucp also)