From 2b28e840cc7bd86c6a4f544517340dfbe67400a0 Mon Sep 17 00:00:00 2001 From: "stevethefiddle@gmail.com" Date: Mon, 8 Dec 2014 15:11:22 +0000 Subject: [PATCH] Fix - final setup parameter was being carried through to the script code. --- src/effects/nyquist/Nyquist.cpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/effects/nyquist/Nyquist.cpp b/src/effects/nyquist/Nyquist.cpp index 248c74e89..0c5774283 100644 --- a/src/effects/nyquist/Nyquist.cpp +++ b/src/effects/nyquist/Nyquist.cpp @@ -823,17 +823,23 @@ bool EffectNyquist::ProcessOne() mCurLen, mCurTrack[0]->GetRate()); } + // Restore the Nyquist sixteenth note symbol for Generate plugins. + // See http://bugzilla.audacityteam.org/show_bug.cgi?id=490. + if (GetEffectFlags() & INSERT_EFFECT) { + cmd += wxT("(setf s 0.25)\n"); + } + if (mDebug) { cmd += wxT("(setf *tracenable* T)\n"); if (mExternal) { cmd += wxT("(setf *breakenable* T)\n"); } } - - // Restore the Nyquist sixteenth note symbol for Generate plugins. - // See http://bugzilla.audacityteam.org/show_bug.cgi?id=490. - if (GetEffectFlags() & INSERT_EFFECT) { - cmd += wxT("(setf s 0.25)\n"); + else { + // Explicitly disable backtrace and prevent values + // from being carried through to the output. + // This should be the final command before evaluating the Nyquist script. + cmd += wxT("(setf *tracenable* NIL)\n"); } for (unsigned int j = 0; j < mControls.GetCount(); j++) {