Can one track amplitude-modulate another track?

Help for Audacity on macOS.
Forum rules
ImageThis forum is for Audacity on macOS 10.4 and later.
Please state which version of macOS you are using,
and the exact three-section version number of Audacity from "Audacity menu > About Audacity".


Audacity 1.2.x and 1.3.x are obsolete and no longer supported. If you still have those versions, please upgrade at https://www.audacityteam.org/download/.
The old forums for those versions are now closed, but you can still read the archives of the 1.2.x and 1.3.x forums.
Post Reply
mkrilano1922
Posts: 2
Joined: Sat Oct 12, 2013 6:09 am
Operating System: Please select

Can one track amplitude-modulate another track?

Post by mkrilano1922 » Sat Oct 12, 2013 11:40 pm

Background: In creating a radio signal to transmit, a radio station can either use "AM" (Amplitude Modulation) or "FM" (Frequency Modulation). Each uses a "carrier wave" of constant frequency, much higher than the frequency of the information to be transmitted. In Amplitude Modulation, the information is imposed onto the carrier wave, so that the "envelope amplitude" of the high-pitched carrier wave equals the information (voice or music or whatever) to be transmitted.

I want to do that with Audacity. I have one track that is almost too low-pitched for me to hear. I want to create a constant frequency (maybe 2kHz), constant amplitude second track, and modulate its envelope amplitude to equal the first low-pitched track. Then I will be able to hear the information as modulations of the 2kHz "carrier wave."

Does any such tool exist? If so, what is it called, and how do I use it to do the above?

I cannot simply add the two tracks; when my information track is silent, I want the final output to be silent. If I simply add the tracks, when the information track is silent, I will hear the carrier wave channel blaring away.

Actually, if I could MULTIPLY the instantaneous amplitude of the two tracks, that might give me something close enough to what I want.

Thanks.

--Mark

kozikowski
Forum Staff
Posts: 68942
Joined: Thu Aug 02, 2007 5:57 pm
Operating System: macOS 10.13 High Sierra

Re: Can one track amplitude-modulate another track?

Post by kozikowski » Sun Oct 13, 2013 2:30 am

I think Multiply we can do.

Effect > Vocoder.

A similar tool is how Peter Frampton gets his "Talking Guitar."

http://theaudacitytopodcast.com/chriss- ... -audacity/

Koz

steve
Site Admin
Posts: 80752
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Can one track amplitude-modulate another track?

Post by steve » Sun Oct 13, 2013 5:36 am

Yes, it can be done quite easily using the "Nyquist Prompt" effect.

Select the track that has the really low sound, then open the Nyquist Prompt, then copy/paste this code into the text box of the Nyquist Prompt:

Code: Select all

(defun AM (sig)
  (mult 0.5  (sum 1 sig)(hzosc 2000)))
(multichan-expand #'am s)
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Trebor
Posts: 9852
Joined: Sat Dec 27, 2008 5:22 pm
Operating System: Windows 8 or 8.1

Re: Can one track amplitude-modulate another track?

Post by Trebor » Mon Oct 14, 2013 5:15 am

steve wrote:Yes, it can be done quite easily using the "Nyquist Prompt" effect.

Select the track that has the really low sound, then open the Nyquist Prompt, then copy/paste this code into the text box of the Nyquist Prompt:

Code: Select all

(defun AM (sig)
  (mult 0.5  (sum 1 sig)(hzosc 2000)))
(multichan-expand #'am s)

The result of that code still has the carrier, how about this ...

Code: Select all

(mult s (hzosc 2000))
Dubya, before-after ''(mult s (hzosc 1000))''.mp3
1000Hz is funnier than 2000Hz
(461.25 KiB) Downloaded 183 times
[ or am I getting AM and FM mixed up ? ]

Won't you need to filter out everything below the carrier frequency ? ...
http://en.wikipedia.org/wiki/Double_sideband

steve
Site Admin
Posts: 80752
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Can one track amplitude-modulate another track?

Post by steve » Mon Oct 14, 2013 5:46 am

Trebor wrote:The result of that code still has the carrier,
That's "normal" for AM (double-sideband + full-carrier)
http://en.wikipedia.org/wiki/Amplitude_modulation
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

kozikowski
Forum Staff
Posts: 68942
Joined: Thu Aug 02, 2007 5:57 pm
Operating System: macOS 10.13 High Sierra

Re: Can one track amplitude-modulate another track?

Post by kozikowski » Mon Oct 14, 2013 6:01 am

Broadcast AM isn't the only amplitude modulation possible. You can create normal AM the conventional way and then surgically suck the carrier out creating double sideband, suppressed carrier which is how the stereo information is carried in FM Stereo. FM Stereo sends a tiny piece of the original carrier along as the "Pilot Tone" and the receiver takes it from there.

You can get even crazier. The amateur radio operators create AM and then suck out both the carrier and one of the two sidebands, creating "Single Sideband" or SSB communications. The up side is you get to talk in real time with half the channel space normally required, good because hams don't have a lot of room in their frequencies. The down side is you as the listener get to put the carrier back in wherever you think it should go. There's no guide other than intelligibility. This causes voices anywhere from rumbling earthquake to squeaky chew-toy -- on the same voice depending on receiver adjustment. But the goal is efficient voice communications, not Boston Symphony Orchestra.

http://www.hamuniverse.com/ssbaudio.mp3

Koz (formerly WB4WGE)

kozikowski
Forum Staff
Posts: 68942
Joined: Thu Aug 02, 2007 5:57 pm
Operating System: macOS 10.13 High Sierra

Re: Can one track amplitude-modulate another track?

Post by kozikowski » Mon Oct 14, 2013 6:10 am

Of historical significance is Analog Broadcast Television. The picture was AM, carrier and all, but it wasn't symmetrical. The lower sideband was a runt or stub with just enough quality to powerfully transmit the synchronizing signals. The upper sideband was full quality as predicted in the AM arithmetic. This helped get more TV channels in the bands allocated with good stability and little or no picture distortion.

Koz (Former Broadcast Engineer)

steve
Site Admin
Posts: 80752
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Can one track amplitude-modulate another track?

Post by steve » Mon Oct 14, 2013 1:27 pm

Question for WB4WGE,

What sort of AM does Trebor's code produce? Is it double sideband suppressed carrier?

To test Trebor's code with an audio range message and a carrier beyond the audible frequency range, use a mono audio track with a sample rate of say 176400 Hz, and set the carrier frequency to say 24000.

Code: Select all

(mult s (hzosc 24000))
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Trebor
Posts: 9852
Joined: Sat Dec 27, 2008 5:22 pm
Operating System: Windows 8 or 8.1

Re: Can one track amplitude-modulate another track?

Post by Trebor » Mon Oct 14, 2013 7:02 pm

steve wrote:What sort of AM does Trebor's code produce? Is it double sideband suppressed carrier?
From the spectrogram of the before-after mp3 above, it's "double sideband suppressed carrier"
on the "after" the spectrogram is reflected about the carrier frequency (1KHz in this case) ...
Spectrogram of Dubya, before-after ''(mult s (hzosc 1000))''.png
Spectrogram of Dubya, before-after ''(mult s (hzosc 1000))''.png (270.16 KiB) Viewed 2552 times
If the brief is just to shift a low frequency recording up by the carrier frequency then the lower sideband should be removed, (with high-pass equalization).

steve
Site Admin
Posts: 80752
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Can one track amplitude-modulate another track?

Post by steve » Mon Oct 14, 2013 7:32 pm

Trebor wrote:If the brief is just to shift a low frequency recording up by the carrier frequency
I'm guessing that what mkrilano1922 had in mind was basic amplitude modulation as illustrated in the AM trace here:

Image
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Post Reply