Re: [Audacity-nyquist] Audacity-nyquist Digest, Vol 41, Issue 3
A free multi-track audio editor and recorder
Brought to you by:
aosiniao
|
From: Vaughan J. <va...@au...> - 2010-08-28 21:17:45
|
Hi, Roger. Sorry for the confusion. Markus's email may have clarified, but just in case... There is a utility method to convert numbers to strings for localized display in the GUI (e.g., comma instead of period for decimal separator). That method takes a double, converts it to the right string, and then strips trailing zeroes and the decimal separator if the number is a whole number. It was used for the text edit boxes in Audacity's Nyquist dialogs, so even though the slider was for floats, it would return an integer, and then xsetf would consider it a FIXNUM instead of FLONUM. I'm going to fix that bug by making sure it always returns at least one point of decimal precision. The question I was asking was whether there were other places in Audacity that wanted to display an integer in some cases, even though the parameter to the method is a double. A And thanks for the comment on treating "float" as "real" for control types. - Vaughan > Date: Fri, 27 Aug 2010 16:00:12 -0400 > From: Roger Dannenberg <rb...@cs...> > Subject: Re: [Audacity-nyquist] [Audacity-quality] Floating point > input from slider widget > To: Discussion of developing Nyquist plug-ins for Audacity > <aud...@li...> > Message-ID: <4C7...@cs...> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > hi, I avoided the list to reduce confusing people, but I don't > understand your suggestion below. There are certainly cases where one > would want to pass an int to a Nyquist function, so converting all ints > to floats doesn't sound wise. Allowing and parsing "float" as equivalent > to "real" and making sure that real values get passed into Nyquist as > reals (with decimal points) sounds like a good idea. > > -Roger > > On 8/27/10 2:56 PM, Vaughan Johnson wrote: >> * "float" controls being treated at int. That's what Edgar was going to >> patch. I see where to do that (Nyquist.cpp line 285). Currently, not >> just "float" but anything other than "real" is assumed to be an "int" >> slider. Sure we want to change it to just ignore the control? Is that >> more likely to help a Nyquist developer find the error? If so, I'll go >> ahead and do it -- no need for a patch. > |