pesky digits

Peter Foster peter@bio01.bio.uottawa.ca
Wed, 24 Aug 94 00:44:11 EDT


cm folk

I have been dabbling with the rt syntax with cm under akcl on a NeXTstation.  
However, I have been having a problem with significant digits.  It seems that 
cm gives lots of digits when it writes reals, but rt doesn't want more than 10 
or so.

To illustrate, I use cm (stella) to write out two crows in rt syntax, one loud, 
the second made quiet using 
	set 2 gain 0.2
and then I write it out and use rt to play it.  I hear 1 crow.
(To duplicate the problem, save the following to a file called "crows.rt" 
and load it into rt.app, or just use the rt driver)

// Stella output from 23-Aug-94 21:28:21
infile=/NextLibrary/Sounds/Crow.snd
gain(1,1,1,1,1,1,1,1,1)
timescale=0.01
tracks=8
turntrackson(1,1,1,1,1,1,1,1,0)
setlefttrackgain(1,1,1,1,1,1,1,1,0)
setrighttrackgain(1,1,1,1,1,1,1,1,0)
setoutputgain(1,1,0)
playnote(at=0.0,snd=1,track=1,gain=1)
playnote(at=0.5,snd=1,track=1,gain=0.20000000000000001)
mix(0,9999)

If I decrease the number of zeros in gain=0.20000000000000001 from 15 to 8, 
I hear 2 crows.

How can I ask akcl or cm to give me fewer digits when it writes reals?

Peter Foster
University of Ottawa
peter@bio01.bio.uottawa.ca