How to create chirp with aliasing

Hi,

In my university course on digital signal processing, the lecturer used Audacity to demonstrate the aliasing that occurs when your sample rate is not high enough for the frequencies you are using. It is now my turn to lecture on similar course, and I wanted to show the same demo. However, it seems that at some point, a load of safeguards were put in place to stop people from deliberately causing aliasing. The chirp generator will only go up to half the project sample rate. I am sure that I had tried this before in Audacity and it let me generate frequencies that were too high.

Perhaps I am wrong and my lecturer had used some VST plug-in or similar. Either way, is it possible to achieve this in the current version of Audacity? I want a rising frequency that is not limited by my project rate, and I will accept the consequences of doing so! If not, was this possible in a previous version? I have tried some version of 1.2 that didn’t have chirp as an option, and a version of 1.3 which still put a hard limit on the maximum.

Thanks

You can do it by running a little bit of code in the Nyquist Prompt effect.

  1. Add an audio track (Tracks menu)
  2. Select part of the track.
  3. Open the Nyquist Prompt (Effect menu)
  4. Copy and paste this code into the Nyquist Prompt and click the OK button:
(setq f1 100) ; initial frequency in Hz
(setq f2 25000) ; final frequency in Hz
(setq dur 30) ; duration of the tone in seconds

(abs-env
  (hzosc (pwlv f1 dur f2)))

The first three lines set the start frequency, end frequency and duration. Adjust the values to suit.
The last 2 lines generate the sweeping tone.

If you want an exponential sweep rather than a linear sweep, use this version:

(setq f1 100) ; initial frequency in Hz
(setq f2 25000) ; final frequency in Hz
(setq dur 30) ; duration of the tone in seconds

(abs-env
  (hzosc (pwev f1 dur f2)))

The spectrogram track view (http://manual.audacityteam.org/o/man/track_drop_down_menu.html) shows the alias frequency nicely:
firsttrack002.png