Generate sine wave of swinging frequency (frequency function is sine itself)


I barely know anything about music, but here is my question.

Anyway, I know that a “simple” tone of certain pitch is actually since wave of certain frequency… Now, what I need is a simple tone that changes its pitch (frequency) in swinging fashion, with certain swinging period (say every 10 secs), meaning, although the tone itself is a since wave, but the frequency should also change in sine fashion between 2 frequency boundaries (min and max frequency). Thus, one would hear pitch swinging in sine fashion between 2 limits (lower and upper).
I read that Audacity has something called frequency sweep, but it seems it offers only linear and exponential change of frequency, whereas I need sine function of change.

Is it possible to do something like this in Audacity?


In electronics that’s frequency modulation (the higher frequency is modulated by the lower frequency). In music it’s vibrato, although 10 seconds is longer than “normal”. String players and singers use it a lot.*

I don’t see a built-in effect but there is an optional [u]vibrato[/u] plug-in, or if that doesn’t do exactly what you want you should be able to find 3rd-party plug-ins.


  • Off topic…
    I saw an interview with Brian May (Quen’s guitar player) and he mentioned that the guitar is out-of-tune at the end of Bohemian Rhapsody because he is “bending the strings” and on a guitar you can only go up in pitch. I kinda’ know that but I never thought about it. So in a re-mix they re-tuned it so the vibrato goes up-and-down around the correctly-pitched note… Something that wasn’t possible when the original analog recording was made… In those days you had to change pitch and speed/tempo together. But, I’m not sure if it was originally considered a “problem”.

Yes, that’s possible, using Audacity’s built-in scripting language “Nyquist”.

The simplest way to run Nyquist scripts is via the “Nyquist Prompt” (See:

Here’s a code snippet to try:

;type generate

;; Setting parameters
(setf sweep-speed 10)
(setf duration 30)
(setf high-hz 880)
(setf low-hz 440)
(setf amplitude 0.8)

;; Calculate parameters
(setf mid (/ (+ low-hz high-hz) 2.0))
(setf range (abs (/ (- high-hz low-hz) 2.0)))
(setf sweep-hz (/ 1.0 sweep-speed))

;; Generating sweeping sine tone:
(mult amplitude
    (hzosc (sum mid (mult range (lfo sweep-hz duration)))))

which produces:

First Track000.png

Thanx a bunch both of you.

Later one really satisfied all my needs, thanx.