Re: [Audacity-devel] Fix for Nyquist ENV function From: Stevethefiddle - 2010-08-19 19:24:16 ```Sorry, I should have said: 'ratio' is zero IF t1 and t4 are integers. -- View this message in context: http://audacity.238276.n2.nabble.com/Fix-for-Nyquist-ENV-function-tp5441476p5441779.html Sent from the audacity-devel mailing list archive at Nabble.com. ```
 [Audacity-devel] Fix for Nyquist ENV function From: Steve the Fiddle - 2010-08-19 18:09:01 Attachments: Message as HTML ```According to the Nyquist manual: http://www.cs.cmu.edu/~rbd/doc/nyquist/part8.html#index318 For the envelope function: env(t1, t2, t4, l1, l2, l3, [dur]) "If t1 + t2 + 2ms + t4 is greater than the envelope duration, then a two-phase envelope is substituted that has an attack/release time ratio of t1/t4." This does not happen, because - line 1046 in nyquist.lsp (setf ratio (/ t1 (+ t1 t4))) 'ratio' is zero because t1 and t4 are integers. If line 1046 is changed to: (setf ratio (/ t1 (float (+ t1 t4)))) then ENV behaves as it should. Steve ```
 [Audacity-devel] Fix for Nyquist ENV function From: Roger Dannenberg - 2010-08-22 17:10:59 ```Steve the Fiddle wrote: > This does not happen, because - line 1046 in nyquist.lsp > (setf ratio (/ t1 (+ t1 t4))) > 'ratio' is zero because t1 and t4 are integers. > > If line 1046 is changed to: > (setf ratio (/ t1 (float (+ t1 t4)))) > > then ENV behaves as it should Thanks -- your fix looks correct to me. I guess I never used ENV with integer parameters. -Roger ```
 Re: [Audacity-devel] Fix for Nyquist ENV function From: Stevethefiddle - 2010-08-19 19:24:16 ```Sorry, I should have said: 'ratio' is zero IF t1 and t4 are integers. -- View this message in context: http://audacity.238276.n2.nabble.com/Fix-for-Nyquist-ENV-function-tp5441476p5441779.html Sent from the audacity-devel mailing list archive at Nabble.com. ```