Need clarification of a Nyquist command

I’m hoping to correct some loose timing in a guitar track by quantizing sample values, using the Nyquist Prompt. Steve kindly shared the commands some time ago, but I need help interpreting them. Like almost all manuals, the Nyquist manual focuses on the ‘what’ and not the ‘how’. The commands are…

(setf steps 5) ;quantization steps
(quantize *track* steps)

My questions are:

What is “(setf steps 5)” ?
Do I include the parentheses marks?
Do I type in the name of the track between the asterisks?
Do I include the asterisks?

I know I am asking for a lot, but one can hope.

That declares a variable “step” and sets it’s value to 5.
In effect it is just saying

LET steps = 5

Yes. Parentheses are part of the language.

No. Type it exactly as written.


Sorry to be such a poor student, but applying the command you shared to a selected track has no effect for me.

I created a rhythm track in 4/4 time, duplicated it then shifted a couple of the hits in the waveform; so that they would be slightly out of time. What am I missing?

I’ve never programmed in Nyquist…

I’m hoping to correct some loose timing in a guitar track

The Nyquist quantize function appears to (re)quantize the amplitude, NOT not the time.

Digital audio is quantized (digitized) in two dimensions - Amplitude and time. Each digital sample represents the wave amplitude at one instant in time. See [u]Digital Audio Fundamentals[/u]. This is completely different from quantizing the tempo. There is a direct relationship between the sample rate (i.e. 44,100 samples per second) and the tempo (if you cut the sample rate in half you cut the tempo in half) but Audacity doesn’t “know” anything about the tempo. (A digital sample is different from a musical/audio sample like a “sampled” drum hit.)

You can easily alter the timing (say, speed it up by 10%) but it gets a bit trickier if you want to change speed without altering pitch and it takes some sophisticated processing to re-quantize the tempo moment-to-moment and then blend everything back together so it sounds natural.

Also note that quantizing audio is different from quantizing MIDI. So if you’re looking for a plug-in, make sure it works with audio.

Thanks for elucidating the matter. Unable to find an audio quantization of tempo plug-in for Audacity, I see that I need to buy a program like Cubase or the more affordable Reaper. I did try the quantization feature in open source Ardour but found the controls therein utterly illogical and too often non-functional (I have been spoiled by Audacity’s user-friendliness and stability).

Absolutely correct.

(Reaper has a free trial)

Thank you.

I found that Tracktion’s Waveform 11 (free) does the job nicely. I’ll use Audacity for recording and effects and Tracktion’s Waveform for time warp editing…until Audacity incorporates the feature. Since trying Cubase, Ableton, Reaper and Ardour, I have come to appreciate just how well-engineered and user-friendly Audacity is. The DAWs I tried are heavy on features that are rarely used in audio track recording and editing and light on essentials…lots of bells and whistles. Most of them use tiny black text on dark gray background that I deem as juvenile (impossible to read on a high-def screen and difficult if not impossible to customize). Audacity has spoiled me.