Beruflich Dokumente
Kultur Dokumente
FM SYNTHESIS
Roger B. Dannenberg
Professor of Computer Science, Art, and Music
ICM Week 4
WEEK 4, DAY 1
Frequency Modulation FM Synthesis
ICM Week 4
2/5/13
Frequency Modulation
Frequency modulation occurs naturally: Voice inflection, natural jitter, and vibrato in singing Vibrato in instruments Instrumental effects, e.g. electric guitar Many tones begin low and come up to pitch Loose vibrating strings go sharp as they go louder Slide trombone, Theremin, voice, violin, etc. create melodies by FM (as opposed to, say, pianos)
ICM Week 4
occur
ICM Week 4
2/5/13
Examples
See Code 4 (code_4.htm)
ICM Week 4
Why FM Synthesis?
Weve already seen wavetable or table-lookup
synthesis:
Very efficient Create any harmonic spectrum Simple frequency and amplitude control
Whats missing? Time-varying control over the spectrum Inharmonic spectra Various Approaches: Synthesize each sinusoid separately tedious, costly Filter the output of table useful, but only harmonic output FM Synthesis
ICM Week 4 Copyright 2002-2013 by Roger B. Dannenberg
2/5/13
FM Synthesis
When modulation frequency is in the audio range,
Number of significant partials is roughly the ratio of modulation amp (freq dev, D) to modulation freq. Modulation Frequency (M)
Bandwidth~2(D+M)
Mathematics of FM
The exact amplitudes of the partials generated by
FM are described by Bessel functions These functions are messy, their evolution is messier, and there is no simple way to invert the functions Many lives of FM:
1967-1968 Invented by John Chowning, patented 1975 1983-1986: Yamaha DX7 160,000 sold 1990-1995: IBM PC-compatible Sound Cards 2000s: FM synthesis provides polyphonic ring tones
ICM Week 4 Copyright 2002-2013 by Roger B. Dannenberg
2/5/13
FM and Harmonics
Generated frequencies are:
C nM
Where C = Carrier and M = Modulator Simplest case: C = M Generated frequencies are:
ICM Week 4
Bandwidth~2(D+M)
ICM Week 4
10
2/5/13
Bandwidth~2(D+M)
ICM Week 4
11
ICM Week 4
12
2/5/13
Odd Harmonics
C nM
Let M = 2C Resulting frequencies are C, 3C, 5C, Negative frequencies are -C, -3C, -5C, Try it
ICM Week 4
13
of F Try it
ICM Week 4
14
2/5/13
Inharmonic Partials
C nM
Let M = not i/j x C Resulting frequencies are not harmonics Negative frequencies are not harmonics Try it
ICM Week 4
15
Formants
Resonances (especially in the vocal tract)
emphasize frequencies around the resonant frequency We can simulate resonances (and voice) by placing a carrier near the desired resonant frequency and modulating it to create nearby harmonics:
M
C
ICM Week 4 Copyright 2002-2013 by Roger B. Dannenberg
16
2/5/13
FM Variations Summary
Change C:M ratio Place carrier at an upper partial to create
formant effect Inharmonic ratios create metalic sounds See code_4.htm for examples
ICM Week 4
17
Listening
FM Examples, Horner, Beauchamp, & Haken FM Examples, track 36, Current Directions, The
importance of periodic and random vibrato in the perception of vocal tones is demonstrated by adding first a random and then a periodic vibrato.
FM Examples, track 37, Current Directions, A male vocal
18
2/5/13
Project 2 (reminder)
ICM Week 4
19
is obviously a quote and youre making a commentary. But What a Wonderful World was recorded as a war protest song. Using someone elses irony as your own means the essence of your work is derivative.
Is the material a quotation or a direct use?
If you sample hey baby in the middle of a serene electronic soundscape, thats an obvious
allusion to pop culture, maybe a commentary on commercialism, etc. Obviously a quotation. Its ok.
If you sample hey baby in the middle of a rap tune, you are leveraging someone elses work
and talent to augment your own work and effectively plagiarizing the sample. Not good.
ICM Week 4
20
10
2/5/13
Summary
FM Synthesis Time varying spectra Low cost (simplest case is only 2 oscillators) Simple parametric control Musically useful results FM Control Carrier:Modulator ratio
Harmonic or inharmonic spectra Odd or all harmonics Formants
21
WEEK 4, DAY 2
Behavioral Abstraction Filters
ICM Week 4
22
11
2/5/13
ICM Week 4
23
Behaviors
Nyquist sound expressions denote a whole class
of behaviors
The specific sound computed by the expression
play a longer note, you dont simply stretch the signal! The behavior concept is critical for music.
ICM Week 4 Copyright 2002-2013 by Roger B. Dannenberg
24
12
2/5/13
Evaluation Environment
To implement behavior concept, all Nyquist
stretch factor, transposition, legato factor, loudness, sample rates, and more.
Environment is hidden and changed or
ICM Week 4
25
osc(c4) ~ 3
Within STRETCH, all expressions see altered
26
13
2/5/13
osc(c4) ~ 3
Within STRETCH, all expressions see altered
27
Absolute Transformations
You can override the inherited environment:
function tone2() return osc(c4) ~~ 2 play tone2() ~ 100 <2 second tone>
ICM Week 4
28
14
2/5/13
Start time
Sample Rate
ICM Week 4
29
Example
begin
= osc(c4) ~ 3 <? second tone> x() return osc(c4) ~ 3 <? second tone>
ICM Week 4
30
15
2/5/13
Example
begin
= osc(c4) ~ 3 <1 second tone> x() return osc(c4) ~ 3 <3 second tone>
ICM Week 4
31
Transformations
STRETCH, STRETCH-ABS (~, ~~) AT, AT-ABS (@, @@) LOUD, LOUD-ABS SUSTAIN, SUSTAIN-ABS ABS-ENV use default environment See manual for others. Maybe well talk about time-varying
32
16
2/5/13
Practical Notes
In practice, the most critical transformations are
AT (@) and STRETCH (~), which control when sounds are computed and how long they are.
Technically, transformations are not functions
because they do not evaluate their arguments in the normal order: instead, they manipulate the environment, evaluate the behavior, then restore the environment.
Implemented as macros in XLISP
ICM Week 4 Copyright 2002-2013 by Roger B. Dannenberg
33
SEQ
How do we make a sequence of sounds:
ICM Week 4
34
17
2/5/13
Counterexample
You MUST use seq with behavior expressions, not sound values: set x = osc(c4) ; compute sounds
set y = osc(d4) ; play seq(x, y) ; WRONG!! function x() return osc(c4) ; define function y() return osc(d4) ; behaviors play seq(x(), y()) ; RIGHT!!
ICM Week 4
35
SIM
SIM is exactly the same as SUM and + SIM evaluates a list of behaviors and forms their
ICM Week 4
36
18
2/5/13
Example Using @
play sim(osc(c4),
@ @ @ @
ICM Week 4
37
ICM Week 4
ar St im tt es
Copyright 2002-2013 by Roger B. Dannenberg
38
19
2/5/13
Scores
Weve seen scores already To evaluate a score, evaluate each sound
expression with the start time and stretch factor: {{start dur {instr parameters}} instr(parameters) ~ dur @ start
Note: instr() ~ dur @ start
ICM Week 4
39
Summary
SOUNDS Start time Logical stop time Physical stop time Functions evaluated in an environment Dynamically scoped inherited across calls Modified by transformations
Stretch (~) Shift (@)
Results of functions (SOUNDS) are immutable Sim and Seq control constructs
ICM Week 4 Copyright 2002-2013 by Roger B. Dannenberg
40
20