Unwanted Modulation with Multiple Tones

I am trying to create a sound with multiple tones that are above 20kHz. From what I’ve read, this is producing a modulation effect due to the tick at the start and stop points that generate infinite frequencies (not really sure what that means). How do I generate tones without this feature. If it is complicated, please just point me in the right direction.

Many thanks!

Audacity has a tone generator effect: http://manual.audacityteam.org/man/tone.html
For multiple tones, you can add more tracks: http://manual.audacityteam.org/man/tracks_menu_add_new.html

I am trying to create a sound with multiple tones that are above 20kHz.

You can get some “interesting” amplitude modulation near the Nyquist limit (half the sample) rate, and also (less severe) near 1/4 the sample rate. That’s just the nature of sampling. If you want to see that, set your sample rate to 48,000 and generate a 23,999Hz sine wave.

In theory, the “original” (unmodulated) waveform can be reconstructed during digital-to-analog conversion but in the real world your DAC probably won’t remove the modulation.

A “tick” is very-short in duration and it will only have short-duration effects.

NOTE - If you are mixing multiple tones, note that mixing is done by summation and you need to watch your levels to prevent clipping.

In the real world, the “modulation” will be removed, along with the entire signal. 23,999 Hz is so close to the Nyquist frequency that it will be completely removed by the decimation anti-aliasing filter (possibly leaving just a very little modulated noise due to rounding errors).

The apparent “modulation” that is seen close to the Nyquist frequency is actually an illusion caused by the visual representation of the sample data. It is like a kind of moiré pattern created by the proximity of the signal half-wavelength to the signal’s sample period. Reconstruction of the analogue signal uses sinc interpolation, which can correctly reconstruct the sine waveform, provided that the signal it strictly band limited to below the Nyquist frequency.

For frequencies close to half the sample rate, but not so close as to be eliminated by the anti-aliasing filter, the “modulation” may still be observed, but correct reconstruction may be observed by upsampling. For example, if you generate a 3800 Hz sine tone into a 8000 Hz sample rate track, although the displayed waveform shows “modulation” (the amplitude goes to zero every 2.56 ms), most systems will play the sound correctly as a continuous tone, and upsampling with Audacity to 44100 Hz will show the correct, non-modulated sine tone (slightly reduced in amplitude due to the filter roll-off).