Recherche Google
OMChroma User ManualPredefined Classes > Frequency Modulation Synthesis > Frequency Modulation Synthesis with FM-1
page précédentepage suivante

Frequency Modulation Synthesis with FM-1

Tutorial FM-1

Specific Slots

Name

Description

Default value

amp

Maximum Amplitude. Linear from >0.0 to 1000 or in dB from 0 to -∞ (see Tutorial Getting Started 02 - Amplitude and Internal Editor for more details)

-6.0

f0

Fundamental (generating) frequency [Hz]

55.0

n1

Carrier multiplication factor

5

n2

Modulator multiplication factor

7

imax

Maximum index

10

imin

Minimum index

1

aenv

Amplitude Envelope [GEN]

Instance: GEN05

ienv

Envelope for the index [GEN]

Instance: GEN05

Class description

The FM-1 Class realizes a simple Frequency Modulation Synthesis with the following controls:

  • The main amplitude,
  • The frequency of the carrier, that is f0*n1,
  • The frequency of the modulator, that is f0*n2,
  • The amplitude envelope by means of a GEN routine,
  • The index envelope by means of a GEN routine,
  • The range between (imax & imin) of the index envelope.
Patch description

The example A & B show the meaning of the FM index: the number of the components of the side-band frequencies increase with the rising of the index.

The example C focuses on the carrier multiplication factor (n1) with a steady sideband width (100*0.1=10 Hz). The sound begins rough and ends with a nice vibrato for the sake of the ratio between the modulating and the carrier frequency. At the beginning the sidebands are 10% away from the carrier i.e., M/C = ((f0*n2)/(f0*n1)) = n2/n1 = 0.1/1 = 0.1. At the end they are 0.625% away (0.1/16).

The example D focuses on the ratio between the modulating and the carrier frequency.

  • M/C > 0.1 -> vibrato,
  • M/C = integer or 1/2^n -> harmonic spectra,
  • M/C = floating -> inharmonic spectra
Reminder

The frequency of the carrier is f0*n1 and the the frequency of the modulator is f0*n2.

If imax>imin the BPF given as envelope is read forwards as usual (example A) but if imax<imin the BPF is read backwards (example B).

Try to evaluate the object with both envelopes each with a different synt.

Common Red Patches

For the red patch C#ed and Synt see Appendix A

Inside the Class

Csound Orchestra of the FM-1 Class.

instr 1

idur = p3

idurosc = 1/idur

iamp = (p4 > 0.0 ? (p4*0.001*0dbfs) : (ampdbfs (p4)))

if0 = p5

in1 = p6

in2 = p7

icar = if0*in1

imod = if0*in2

imax = p8

imin = p9

imindev = imin*imod

imaxdev = imax*imod

ivardev = imaxdev-imindev

iaenv = p10

ienv = p11

icarfun = 1

imodfun = 2

ieps = 0.01

ken poscil iamp, idurosc, iaenv

k1 linseg 1, idur-ieps, 1, ieps, 0 ; avoid clicks

kenv = ken * k1

ki poscil ivardev, idurosc, ienv

kind = imindev + ki

amod poscil kind, imod, imodfun

asound poscil kenv, icar+amod, icarfun ; carrier

out asound

endin

Flow chart
page précédentepage suivante
A propos...Réalisé avec Scenari