AM Demodulation

Using Nyquist scripts in Audacity.
Post and download new plug-ins.

If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like

AM Demodulation

Permanent link to this post Posted by AuraLL » Wed Mar 22, 2017 10:31 pm

I've searched the forum looking for the answer to this one and found similar topics but nothing exactly the same.

I have a WAV file with audio up to about 8 kHz and also what looks to be AM modulated audio - with both sidebands present and a carrier frequency of 20 kHZ (Project rate is 96 kHz).

The currently audible sub 8 kHz stuff can be discarded but I would like to recover - and listen to - the AM modulated audio.

I have done the easy bit and high pass filtered the track but do not know how to use Audacity/Nyquist for the demodulation (is it as simple as multiplying by the carrier frequency?)

Can anybody help with the Nyquist code required to produce an audible signal within Audacity?

(Audacity 2.1.2 on Windows 10)

Thanks.
AuraLL
 
Posts: 2
Joined: Sat Jan 07, 2017 9:50 pm
Operating System: Windows 10

Re: AM Demodulation

Permanent link to this post Posted by steve » Thu Mar 23, 2017 12:03 am

AuraLL wrote:is it as simple as multiplying by the carrier frequency?

Pretty much so. You would probably also want to use a low pass filter to remove the carrier after demodulating.

Long hand (version 4 syntax)
Code: Select all
;version 4
(setf cf 8000) ; the carrier frequency
(let ((demod (mult *track* (hzosc cf))))
  (lowpass8 demod cf))


Short version (also version 4 syntax. Ensure that "legacy syntax" is NOT selected in the Nyquist Prompt):
Code: Select all
(lowpass8 (mult *track* (hzosc 8000)) 8000)
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Senior Forum Staff
 
Posts: 43942
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: AM Demodulation

Permanent link to this post Posted by AuraLL » Thu Mar 23, 2017 10:47 am

Thank you Steve - that worked a treat!
AuraLL
 
Posts: 2
Joined: Sat Jan 07, 2017 9:50 pm
Operating System: Windows 10


Return to Nyquist



Who is online

Users browsing this forum: No registered users and 1 guest