Hi to all,
I was seeking for a possibility to modulate a simple wave signal into a carrier signal an found this:
(fmosc (hztostep 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!!!!!
FM Modulation without signal curtailment
Forum rules
This forum is for Audacity 2.x.x on Windows.
Please state which version of Windows you are using,
and the exact threesection version number 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.
This forum is for Audacity 2.x.x on Windows.
Please state which version of Windows you are using,
and the exact threesection version number 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.

 Site Admin
 Posts: 47320
 Joined: Sat Dec 01, 2007 11:43 am
 Operating System: Linux *buntu
 Contact:
Re: FM Modulation without signal curtailment
I think you may be misinterpreting how the FMOSC command works.
http://www.cs.cmu.edu/~rbd/doc/nyquist/ ... l#index394
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 "STEPTOHZ" and "HZTOSTEP". So in this first example I'll use (hztostep 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.
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.
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.
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.
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:
Produces a sine wave that is modulated at a frequency of 200 Hz, between 19.5 Hz and 20 Hz.
http://www.cs.cmu.edu/~rbd/doc/nyquist/ ... l#index394
By example:(fmosc pitch modulation [table phase]) [LISP]
Returns a sound which is table oscillated at pitch plus modulation for the duration of the sound modulation. osctable defaults to *table*, and phase is the starting phase (default 0.0 degrees) within osctable. 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 *soundsrate*.
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 "STEPTOHZ" and "HZTOSTEP". So in this first example I'll use (hztostep 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 (hztostep 440) (const 0))
Code: Select all
(fmosc (hztostep 440) (const 200))
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 (hztostep 440) (mult 440 (ramp)))
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 (hztostep 440) (mult 100 (hzosc 2)))
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 (hztostep 0) (const 440))
Code: Select all
(fmosc (hztostep 0) (const 440))
Code: Select all
(fmosc (hztostep 0.5)(mult 20 (hzosc 200)))
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
Re: FM Modulation without signal curtailment
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
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