1 / 45

Sound Synthesis

Sound Synthesis. Part III: Distortion-based synthesis (FM & Waveshaping ). Plan. Distortion-based synthesis FM synthesis Waveshaping Matlab code for synthesis Example of synthesized composition ( Risset ) Summary. Types of synthesis. Distortion (aka nonlinear) Synthesis.

ince
Télécharger la présentation

Sound Synthesis

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Sound Synthesis Part III: Distortion-based synthesis (FM & Waveshaping)

  2. Plan • Distortion-based synthesis • FM synthesis • Waveshaping • Matlab code for synthesis • Example of synthesized composition (Risset) • Summary

  3. Types of synthesis

  4. Distortion (aka nonlinear) Synthesis • Additive synthesis is powerful & flexible BUT requires many simple oscillators. • Plethoric and non-intuitive controls on the sound spectrum. •  Using fewer oscillators, with more components. •  Complex spectra can be obtained by distorting simple oscillators.

  5. Plan • Distortion-based synthesis • FM synthesis • Waveshaping • Substractive synthesis • Summary

  6. FM Synthesis • Pioneered by John Chowning (1973) • “Alteration of distortion of the frequency of an oscillator in accordance with the amplitude of a modulating signal.” • Similar to Vibrato modulation, but using audible modulating frequency and larger width. •  Generate a large number of timbres easily controlled.

  7. FM Synthesis (2) • Modulated frequency infc-d <= fv <= fc+d • Peak frequency deviation d(in Hz) • Vibrato: small d & fm • FM Synth: largerd&fm • Note: if d>fc, thenfvcan be < 0 (negative phase applied!) •  Rich spectrum from sine waves only! d Modulating oscillator fm fc + A fv Carrier oscillator

  8. FM Synthesis (3) • Spectrum:fc + k.fm, fork an integer. • Sidebands increase with d • Modulation index I=d/fm • Spectrum amplitude: • Fc+k.fmJk(I) • whereJkis thekthBessel function • Sidebands significant ~ for|k|<I+1(rule of thumb) Magnitude fc fc-fm fc+fm fc-3.fm fc-2.fm fc+3.fm fc+2.fm Frequency Bessel Functions J1(X), J2(X) and J3(X)

  9. FM Synthesis (4) Bessel Functions J1(X), J2(X) and J3(X) • Bessel functions can be negative! • Odd number, low-frequency components have opposite sign J-1(I) = -J1(I) • Negative spectrum represents out-of-phase components. • Combination of in-phase and out-of-phase components of same amplitude cancels out. magnitude fc fc-fm fc+fm fc-3.fm fc-2.fm fc+3.fm fc+2.fm

  10. FM Synthesis: Dynamic Spectrum I*fm • Dynamic spectrum can be obtained by applying envelopes to both carrier and modulating signals. • I is the max value of the modulation index • More limited than additive synthesis, but requires less components. ASD Envelope A fm fc ASD Envelope + fo

  11. FM Synthesis: Dynamic Spectrum TIME FREQUENCY

  12. FM Synthesis: Instrument Design 1/d fm*I • Envelopes functions F1 & F2 change the timbre of the sound (John Chowning, 1973) • A) Bell-like timbre • B) Wood drum sound • C) Brass-like timbre 1/d A fm fc F1 F2 + fo (John Chowning, 1973)

  13. FM Synthesis: Instrument Design (2) 1/d fm*I • A) Bell-like timbre • D = 15s • Fc = 200Hz • Fm = 280Hz • I = 10 1/d A fm 1 fc F1 F2 + d F1 = F2 fo (John Chowning, 1973)

  14. FM Synthesis: Instrument A’s Spectrogram (bell)

  15. FM Synthesis: Instrument Design (3) 1/d fm*I • B) Wood drum sound • D=0.2 s • Fc=80Hz • Fm=55Hz • I=25 1/d A fm 1 1 fc F1 F2 + d d F1 F2 fo (John Chowning, 1973)

  16. FM Synthesis: Instrument B’s Spectrogram (drum)

  17. FM Synthesis: Instrument Design (4) 1/d fm*I • C) Brass-like timbre • D=0.6 • fc=440Hz • Fm=440Hz • I=5 (or 3) 1/d A fm 1 fc F1 F2 + d F1 = F2 fo (John Chowning, 1973)

  18. FM Synthesis: Instrument C’s Spectrogram (brass)

  19. FM Synthesis Instrument Design (5) 1/d fm*(I-J) • D) Clarinet-like timbre • d = 0.5 s. • Fc = 900 Hz • Fm = 600 Hz • I = 2 • J = 4 J*fm 1/d + A fm 1 1 fc F1 F2 d d + F1 F2 fo (John Chowning, 1973)

  20. FM Synthesis: Instrument D’s Spectrogram (clarinet)

  21. FM Synthesis: Instruments Summary A) BELL-LIKE B) WOODEN DRUM C) BRASS-LIKE D) CLARINET

  22. Plan • Distortion-based synthesis • FM synthesis • Waveshaping • Matlab code for synthesis • Example of synthesized composition (Risset) • Summary

  23. Waveshaping (1): Definition • Idea: “realizes spectra that have dynamic evolution of their components.” • More computationally efficient than additive (like FM) • Allows generation of band-limited spectrum with a set max harmonic number (unlike FM) A f0 WS waveshaper

  24. Waveshaping (2): Transfer Function • Waveshaper: nonlinear processor that alters the shape of the waveform passing through. • Defined by a transfer function: ys=f(y0) • The shape of the output waveform (and spectrum) changes with amplitude of the input signal! CARRIER TRANSFER FUNCTION OUTPUT INPUT RESULT

  25. Transfer function High amplitude Nonlinear response Low amplitude ~ linear response

  26. Waveshaping (3): Transfer Function TRANSFER FUNCTION OUTPUT INPUT CARRIER RESULT

  27. Waveshaping (4): Some Transfer Functions out out out in in in C) Even A) Linear B) Odd out out out in in in D) Discontinuous E) Sharp points F) Ripple

  28. Waveshaping: Linear Transfer Functions • Eg, f(x) = 0.5x • Reduces amplitude by half. • No distortion, no harmonic added. out in f(x) = 0.5*x

  29. Waveshaping: Odd Transfer Functions • Definition:f(-x) = -f(x) • Eg, f(x) = x^3 • Nearly linear for low amplitude ( low distortion) • Highly non-linear for high amplitude (high distortion) • Generates only odd-numbered harmonics! out in f(x) = x^3

  30. Waveshaping: Even Transfer Functions • Definition: f(-x) = f(x) • Eg.f(x) = 2*x^2-3*x^4 • Creates only even harmonics • Even transfer function doubles the fundamental frequency •  raises the pitch by one octave! out in f(x) = 2*x^2-3*x^4

  31. Waveshaping: Other Transfer Functions out • Discontinuities and sharp points will create more harmonics than a smooth function • Generally causes aliasing! • For this reason, it is common to use polynomial transfer functions • f(x) = d0+d1*x+d2*x^2+......+dn*x^n in D) Discontinuous out in E) Sharp points

  32. Waveshaping: Polynomial Transfer Functions See Dodge & Jerse Eg, for a pure tone of amplitude 1, f(x)=x^5 will generate? What about f(x) = 2*x^2 – 3*x^4?

  33. Waveshaping: Polynomial Transfer Functions • The transfer function:f(x) = 2*x^2 – 3*x^4 applied to a pure tone (sinusoidal) carrier of amplitude 1, will generate the following harmonics: • H0 = 2*2/2 - 3*6/8 • H2 = 2*1/2 – 3*4/8 • H4 = -3*1/8

  34. Waveshaping: Spectral matching • For a pure tone cosine carrier of unit amplitude (A=1) – also called distortion index, • Applying a transfer function based on a Chebyshev polynomial Tk(x)will generate only the kth harmonic • General form for Chebyshev polynomials: Tk+1(x) = 2xTk(x)-Tk-1(x)

  35. Waveshaping: Chebyshev Polynomials • T0(x) = 1 • T1(x) = x • T2(x) = 2x^2-1 • T3(x) = 4x^3-3x • T4(x) = 8x^4-8x^2+1 • T5(x) = 16x^5-20x^3+5x • T6(x) = 32x^6-48x^4+18x^2-1 • Etc.

  36. Waveshaping: Using Chebyshev Polynomials • For example, to generate only 1st, 2nd, 4th & 5th harmonics with amplitudes 5, 1, 4, and 3, respectively. • We can design the transfer function: • F(x) = 5*T1(x)+1*T2(x)+4*T4(x)+3*T5(x)

  37. Waveshaping: Instrument Design 255 0.64 0.085 ASD Envelope • Instrument for clarinet-like timbre • From Jean-Claude Risset’sIntroductory Catalogue of Computer Synthesized Sounds. fm 256 + F(x) * A

  38. Waveshaping: Instrument Transfer Function

  39. Waveshaping: Instrument Spectrogram

  40. Waveshaping: Amplitude Scaling • Distortion index A affects sound’s amplitude, and there by loudness. • Similar to acoustic instruments: louder play usually generates more overtones. • Excessive loudness variation  excessive bright tones. • Solution: apply a scaling function to the amplitudeR(A,x) = F(Ax)S(A) A f0 S(A) F(x) *

  41. Plan • Distortion-based synthesis • FM synthesis • Waveshaping • Matlab code for synthesis • Example of synthesized composition (Risset) • Summary

  42. Matlab Code • Examples for all sounds are available here: • http://info.ee.surrey.ac.uk/Personal/N.Pugeault/MediacastingL3_2012/ • Parameters can be tweaked to evaluate their influence. • Matlab is convenient for plotting results> spectrogram( y, ntime, noverlap, nfft, fs )> spectrogram( y, 256, 250, 250, fs ) • Can play sounds using the command: > sound( y, fs )

  43. Plan • Distortion-based synthesis • FM synthesis • Waveshaping • Matlab code for synthesis • Example of synthesized composition (Risset) • Summary

  44. Plan • Distortion-based synthesis • FM synthesis • Waveshaping • Matlab code for synthesis • Example of synthesized composition (Risset) • Summary

  45. Additional Reading • C. Dodge, C., & Jerse, T. A. (1997). Computer Music: Synthesis, Composition, and Performance. Schrimer, UK.(see chapters 5 and 6) • Matlab examples for all sounds & instruments are available here: • http://info.ee.surrey.ac.uk/Personal/N.Pugeault/MediacastingL3_2012/

More Related