FM Modulation without signal curtailment

Help for Audacity 2.x.x on Windows.

ImageThis forum is for Audacity 2.x.x on Windows.

  • Please state which version of Windows you are using, the exact three-section version of Audacity from "Help 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.

FM Modulation without signal curtailment

Permanent link to this post Posted by Peter_S » Sun Nov 19, 2017 12:55 pm

Hi to all,

I was seeking for a possibility to modulate a simple wave signal into a carrier signal an found this:

(fmosc (hz-to-step 0.5)(mult 20 (hzosc 200)))

That´s fine BUT unfortunately the amplitude of the signal (200Hz) is cut to zero at the peaks of the carrier signal.
Does anyone have any idea how I can prevent this pruning?

Thank you!!!!!
Peter_S
 
Posts: 2
Joined: Sun Nov 19, 2017 12:29 pm
Operating System: Windows 10

Re: FM Modulation without signal curtailment

Permanent link to this post Posted by steve » Sun Nov 19, 2017 2:53 pm

I think you may be misinterpreting how the FMOSC command works.

http://www.cs.cmu.edu/~rbd/doc/nyquist/ ... l#index394
(fmosc pitch modulation [table phase]) [LISP]
Returns a sound which is table oscillated at pitch plus modulation for the duration of the sound modulation. osc-table defaults to *table*, and phase is the starting phase (default 0.0 degrees) within osc-table. The modulation is expressed in hz, e.g. a sinusoid modulation signal with an amplitude of 1.0 (2.0 peak to peak), will cause a +/- 1.0 hz frequency deviation in sound. Negative frequencies are correctly handled. The sample rate is *sound-srate*.


By example:

The "pitch" parameter is the MIDI note number. It is easy to convert between MIDI note number (which Nyquist refers to as "steps") and frequency in Hz with the two functions "STEP-TO-HZ" and "HZ-TO-STEP". So in this first example I'll use (hz-to-step 440), which gives the "Pitch" (MIDI note number) for a frequency of 440 Hz.

Nyquist has a function "CONST" that produces a signal at a constant amplitude.

Code: Select all
(fmosc (hz-to-step 440) (const 0))

This example returns a sound that oscillates at a frequency of 440 Hz + 0. In other words, it produces a sine wave at a frequency of 440 Hz. Try it for yourself and use "Plot Spectrum" to check the result.


Code: Select all
(fmosc (hz-to-step 440) (const 200))

This example returns a sound that oscillates at a frequency of 440 Hz + 200. In other words, it produces a sine wave at a frequency of 640 Hz. Try it for yourself and use "Plot Spectrum" to check the result.


Nyquist has a function "RAMP" which creates a signal that gradually increases from 0 to 1.
By multiplying (ramp) by a fixed number, we can make a signal that rises from 0 to any value we like. For example (mult 440 (ramp)) will rise from 0 to 440.

Code: Select all
(fmosc (hz-to-step 440) (mult 440 (ramp)))

Adding together the pitch [440 Hz] and the 'modulation' [ (mult 440 (ramp)) ], results in a signal that starts at 440 Hz and rises in pitch to 880 Hz.


The Nyquist function "HZOSC" creates a sine wave at a given frequency and an amplitude of +/- 1.
By multiplying a sine wave by a fixed number, we can change the amplitude. For example:
(hzosc 2) produces a sine wave with a frequency of 2 Hz and an amplitude of +/- 1.
(mult 100 (hzosc 2)) produces a sine wave with a frequency of 2 Hz and an amplitude of +/- 100.

Code: Select all
(fmosc (hz-to-step 440) (mult 100 (hzosc 2)))

Adding together the pitch [440 Hz] and the 'modulation' [ (mult (100 (hzosc 2)) ], results in a signal that modulates at a frequency of 2 Hz, between 440 - 100 and 440 + 100. In other words, it creates a sound that 'wobbles' 2 times per second between 350 Hz and 540 Hz.


If the sum of the "pitch" parameter and the "modulation" parameter is negative, then FMOSC produces a frequency that has the absolute value of the sum, but is phase inverted. So
these two commands will both produce a sine wave at a frequency of 440 Hz, but one is "upside down" (phase inverted) from the other:
Code: Select all
(fmosc (hz-to-step 0) (const 440))

Code: Select all
(fmosc (hz-to-step 0) (const -440))



Code: Select all
(fmosc (hz-to-step 0.5)(mult 20 (hzosc 200)))

Produces a sine wave that is modulated at a frequency of 200 Hz, between -19.5 Hz and 20 Hz.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Site Admin
 
Posts: 45394
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: FM Modulation without signal curtailment

Permanent link to this post Posted by Peter_S » Sun Nov 19, 2017 7:14 pm

Hello Steve,

I looked at your examples and experimented with them.
Now I do indeed have a deeper understanding and hope to find a suitable solution.

Thank you so much for your quick and profound help!!!!!!! :)

Peter
Peter_S
 
Posts: 2
Joined: Sun Nov 19, 2017 12:29 pm
Operating System: Windows 10


Return to Windows



Who is online

Users browsing this forum: csmnsn, lionshead007 and 13 guests