sound synthesis

41
Sound Synthesis Part II: Oscillators, Additive Synthesis & Modulation

Upload: tannar

Post on 11-Jan-2016

47 views

Category:

Documents


1 download

DESCRIPTION

Sound Synthesis. Part II: Oscillators, Additive Synthesis & Modulation. Plan. Simple Oscillator (wavetable) Envelope control Simple Instrument (Helmholtz) Additive Synthesis Modulation Summary. AMP. FREQ. PHASE. WF. Simple Oscillator. Oscillator 3 strategies. - PowerPoint PPT Presentation

TRANSCRIPT

Sound SynthesisPart II: Oscillators, Additive Synthesis & Modulation PlanSimple Oscillator (wavetable)Envelope controlSimple Instrument (Helmholtz)Additive SynthesisModulationSummaryWFAMPFREQPHASESimple OscillatorOscillator3 strategiesMathematical equation based oscillatorWavetable oscillatorIIR-Based oscillatorSolve math function for each sampleEx: y = sin(x)+ AccurateInefficient Non real-time applicationsPre-computed and stored in memory+ Fast (Look-up table) MemoryUnstable filter that generates waveform of desired amplitude and frequency.+ Fast+ Memory efficient Sound synthesis3Wavetable OscillatorExample of a wavetable (N = 16)Store N values sampled over one cyclePhase increment: SI=N f0/fs

Wavetable Oscillator (example)ParametersN = 16F0 = 220Fs = 1kHzSI = 16 * 220/1000SI = 3.52Increase quality: Increase sampling rateinterpolate

Wavetable Oscillator DistortionsQuantization:Eg, pure tone F0=440Hz, Fs=8,192HzTruncate N=16Truncate N=32Truncate N=512Interpolation: truncate, mean, linearAliasing

Wavetable OscillatorInterpolationTruncation (0th level interpolation)

Wavetable Oscillator Interpolation (2)Rounding (slightly better 0th order)

Wavetable Oscillator Interpolation (3)Linear (First order interpolation)

Wavetable Oscillator Interpolation (4)Quadratic (Second order interpolation)

Wavetable Oscillator Interpolation (5)Cubic (Third order interpolation)

Wavetable Oscillator Interpolation (6)Signal to (interpolation) Noise Ratio (SNR)(eg, pure tone F0=220Hz, Fs=8,192Hz)Truncation: SNR = 6 k 11 dB Rounding: SNR = 6 k 5 dB Linear:SNR = 12 (k 1) dB(Moore, 1977; Hartman, 1987)(k = log2(N) and N is the table length)Conclusion: For increasing quality, increase number of samples, and use interpolation.

Wavetable Oscillator Interpolation (7)Pure tone F0=440Hz, Fs=8,192HzTruncate N=16Truncate N=32Truncate N=512

Wavetable Oscillator Aliasing Aliasing: One of the biggest problem for modern digital sound synthesisers (sampling freq fs=48kHz, Nyquist freq fn=fs/2=24kHz).

How to avoid aliasing? Storing a band-limited version of the waveform in the table (in memory)Or, generate an aliasing-free signal from frequency-limited Fourier series representation.

Aliasing (2)Several sinusoids can fit a set of samples.Aliasing when sampling rate is low! Example: Signal: f0 = 0.9Hz (red)Sampling at: fs = 1Hz, Nyquist freq fn = 0.5Hz perceived fa=|n*fs-f0|=0.1Hz (blue) (n such that fa < fn)

Aliasing (3)Square wave, 563 Hz fundamental, 48kHz sampling rate.

Generated using perfect squarewaveformGenerated using a limited Fourier series.

PlanSimple Oscillator (wavetable)Envelope controlSimple Instrument (Helmholtz)Additive SynthesisModulationSummaryWFAMPFREQPHASETime Envelope (1)ADSR EnvelopeAttackDecay SustainReleaseImportant is: DurationShapeLinearExponentialOther (functional, table)

Linear vs. Exponential EnvelopeRecall: amplitude perception is (nearly) logarithmiclinear decay logarithmic (perceived) fadingExponential decay linear (perceived) fadingNote: Exponential decay never reaches zero set min value

A) LinearB) Exponential

Oscillator as an Envelope GeneratorAdvantages: wavetable interpolated shape. Easy encoding of several repetitions.Drawback: attack and decay times are affected by overall duration!Alternative:interpolated function generatorfcAfm

PlanSimple Oscillator (wavetable)Envelope controlSimple Instrument (Helmholtz)Additive SynthesisModulationSummaryWFAMPFREQPHASESimple InstrumentHelmholtz model WaveformConstant frequencyEnvelopeEnvelope feeds varying amplitude to the oscillator.ASD EnvelopeAMPFREQPHASEAMPATTACKDURATIONDECAYSimple Instrument (2)Envelope generator used as a signal processor.Oscillator feeds varying amplitude to the envelope generator.Allows to process the amplitude of a natural (recorded) sound through an envelope.AMPFREQPHASEASD EnvelopeAMPATTACKDURATIONDECAY23Limitations of the Simple InstrumentHelmholtz model WaveformConstant frequencyEnvelopeLimitations:Amplitudes of all spectral components vary simultaneously. All spectral components are perfect (integer) harmonics.... unlike real sounds!ASD EnvelopeAMPFREQPHASEAMPATTACKDURATIONDECAYPlanSimple Oscillator (wavetable)Envelope controlSimple Instrument (Helmholtz)Additive SynthesisModulationSummaryWFAMPFREQPHASETypes of synthesisAdditive SynthesisFREQFREQFREQ+

Additive Synthesis (2) Analysis: Frequency and amplitude envelopes can be obtained from analysis (spectrogram)Flexibility: Virtually any sound can be synthesised.Allows for the generation of new, natural sounding functions.Quality: Can realize sounds that are indistinguishable from real tones by skilled musicians (Risset, Computer Study of Trumpet Tones, 1966)Additive Synthesis (3)But...Require large amount of data to describe a soundEach oscillator requires two functionsFunctions are only valid for limited range of pitch and loudness!Analysis for a given pitch and loudness will not give the same timbre when extrapolated for different pitch and loudness.Requires very large library of function sets!Just too much control?

PlanSimple Oscillator (wavetable)Envelope controlSimple Instrument (Helmholtz)Additive SynthesisModulationSummaryWFAMPFREQPHASEModulationModulation: Alteration of amplitude, phase or frequency of an oscillator, in accordance to another signal (Dodge & Jerse, 1997)Vocabulary: Carrier oscillator: modulated oscillatorCarrier wave: modulated signal (prior to modulation)Spectral components of modulated signal:Carrier components: come only from carrierSidebands: come from both carrier & modularion

Amplitude ModulationCarrier: Frequency: fcModulatingFrequency: fmAmplitude m*AMPModulation index: mm=0 no modulationm>0 modulationm=1 full modulationAMPfcm*AMPfmAMP+32Amplitude Modulation (2)Carrier frequency fcUnaffected by modulation indexSidebands fc+/-fmAmplitude m/2*AMPEnergy split equally between lower/higherWhen m=1, sidebands 6dB below carrierPerceptionIf fm>10Hz -> two tones, additional loudness.If fm tremolo m/2*AMPAMPfc-fmfc+fmfcAmplitudeFrequency

Pure tone fc=220HzTremolo fc=220Hz, fm=6Hz, m=1

Amplitude Modulation (3)

Ring ModulationModulation is applied directly to carriers amplitude.A=0 no signal!Alters frequency!If both sinusoidals:Only sidebands:fc-fm and fc+fm!Amplitude A/2Eq. to signal multiplication

fcAfmA/2fc-fmfc+fmfcAmplitudeFrequencyfcAfmA*Vibrato ModulationModulating signal applied to the carriers frequency. Slight wavering of pitchPitch varying between fc-v