COURSE NOTES 6
Nonlinear Synthesis: Frequency Modulation & Waveshaping

Basic Frequency Modulation Instrument

Spectrum of FM Sound

Bessel Functions

More on Bessel Functions

Example

Simple FM Instrument

; p4 = amplitude
; p5 = carrier frequency
; p6 = modulating frequency
; p7 = index of modulation

instr 1
	k1 linseg 0, 0.2*p3, 1, 0.5*p3, 1, 0.3*p3, 0
	k2 = k1 * p4
	k3 = k1 * p6 * p7	// p6 * p7 = delta f
	a1 oscil k3, p6, 1
	a2 = a1 + p5
	a3 oscil k2, a2, 1
	out a3
endin

f1 0 2048 10 1
i1 0 2 20000 440 440 3
e

Harmonicity Ratio

Waveshaping

Transfer Function

Calculating the Output Spectrum

Example

Spectral Matching

Chebyshev Polynomials

Building the Transfer Function

Example

Properties of Waveshapers

New Csound Commands and Function Generators

Waveshaping in Csound (based on numerical example above)

; p4 = amplitude of note
; p5 = fundamental frequency
instr 1
	a1 oscil 255, p5, 1
	a2 = a1 + 256
	a3 table a2, 2
	a4 = a3 * p4
	out a4
endin
f1 0 256 9 1 1 90				; cosine wave (sine offset by 90 degrees)
f2 0 512 13 1 1 0.5 1 3 0.3333 0.75 0.25	; transfer function using harmonics
 OR
f2 0 512 3 -1 1 -1.75 1.25 0 -3.6667 6 4	; transfer function using coefficients

i1 0 5 20000 440
e

COURSE INFORMATION | HOMEWORK ASSIGNMENTS
COURSE PROJECT | CS240 HELP DESK