Re: [Audacity-nyquist] [Audacity-quality] Floating point input from slider widget
A free multi-track audio editor and recorder
Brought to you by:
aosiniao
|
From: edgar <edg...@we...> - 2010-08-28 04:58:13
|
> * I added a "float" keyword that works exactly like "real". Don't have > to document it, but it's reasonable that people would mis-recall "real" > as "float", so it might as well work. Yes, thanks, I think this is the best idea so far. > Of course, other Nyquist interpreters won't have this, so some plugins > that work in Audacity won't work in others. I'll remove it if people > think it's a bad idea. The 'control' lines do not exist in any other Nyquist interpreter, the parsing of "int", "real" and "float" only happens with Audacity. Also the sound-file i/o with Nyquist in Audacity is heavily incompatible to all other Nyquist interpreters (what still is the main source of all problems with Nyquist in Audacity), so most Nyquist plugins will not work with CMU Nyquist anyway (there is only one other Nyquist interpreter). > * I added a check for "int" that creates an integer slider. Yes, thanks. >> Ignoring the control would be consistent with how Audacity treats other >> malformed controls, though a debug message would certainly be more >> helpful. Would it be possible to send a message to the debug window just >> to say that a control has been ignored? >> >> Unfortunately, the place it can be detected is at startup, when all the >> Nyquist plugins are loaded, in a method that parses a single line. The >> debug window is used when the plugin is invoked, in a far distant piece >> of code. > * If it's not "real", "float", or "int" it fails to create the control. > It puts up a warning alert box. This all occurs before the Audacity Log > window is created, so it does not go to the log... Sounds to me like a workaround, but is far better than ignoring the bug. > That raises the general question of whether to create the log window > earlier, so the message goes to the log, but then does *not* bring up > an alert box. Comments? It that's no huge code surgery this is the far better solution. I think an alert box is OK for developers, but probably will annoy the casual user, who just simply expects a plugin to work. On the other hand, an alert box like "Plugin <xxx> has caused an error <error-message>, please report this bug to <mailing-list>" could help to track plugin bugs. I will leave this to the implementor (depends on how much work this is). > I also commented out a line where logging was turned off while loading > EffectNyquist. James has asked before why the log is turned off in so > many places, and I don't see any good reason it should be turned off > here. No clue why logging was turned off, but there had been major code surgery during the development of the Nyquist workbench, maybe it was just simply forgotten to turn it on again... I myself am generally thankful for everything that can be tracked via the Nyquist 'debug' window. Thanks again, - edgar -- Transcript of previous mails On 8/27/2010 12:54 PM, aud...@li... wrote: > > Date: Fri, 27 Aug 2010 21:50:53 +0200 > > From: edgar <edg...@we...> > > Subject: Re: [Audacity-nyquist] [Audacity-quality] Floating point > > input from slider widget > > To: Discussion of developing Nyquist plug-ins for Audacity > > <aud...@li...> > > > > > To recap, we're talking about two things here: > > > > > > * "float" controls being treated at int. That's what Edgar was going > > > to patch. > > > > I was never going to patch anything. ??? Sorry, I guess Steve wrote the 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? > > > > No, an error message must be returned, at least in the 'debug' window, > > that's what I had said from the beginning. Ignoring a wrong value is > > even worse than returning a wrong integer. Thanks. As mentioned in my other message, the only place it can be detected is when the effects are loaded, so it can't go to the debug window, but I have it putting up an alert. - Vaughan -- The author of this email does not necessarily endorse the following advertisements, which are the sole responsibility of the advertiser: |