overview
play

Overview Julius Smith LAC-12 2 / 30 F AUST Signal Processing - PowerPoint PPT Presentation

Signal Processing Libraries for F AUST Julius Smith CCRMA, Stanford University Linux Audio Conference 2012 (LAC-12) April 14, 2012 Julius Smith LAC-12 1 / 30 Overview effect.lib filter.lib oscillator.lib Conclusion Overview Julius


  1. Signal Processing Libraries for F AUST Julius Smith CCRMA, Stanford University Linux Audio Conference 2012 (LAC-12) April 14, 2012 Julius Smith LAC-12 – 1 / 30

  2. Overview effect.lib filter.lib oscillator.lib Conclusion Overview Julius Smith LAC-12 – 2 / 30

  3. F AUST Signal Processing Libraries Overview • oscillator.lib — signal sources effect.lib filter.lib • filter.lib — general-purpose digital filters oscillator.lib • effect.lib — digital audio effects Conclusion Julius Smith LAC-12 – 3 / 30

  4. Highlights of Additions Since LAC-08 Overview • oscillator.lib effect.lib filter.lib ◦ Filter-Based Sinusoid Generators oscillator.lib ◦ Alias-Suppressed Classic Waveform Generators Conclusion • filter.lib ◦ Ladder/Lattice Digital Filters ◦ Audio Filter Banks • effect.lib ◦ Biquad-Based Moog VCFs ◦ Phasing/Flanging/Compression ◦ Artificial Reverberation Julius Smith LAC-12 – 4 / 30

  5. Overview effect.lib filter.lib oscillator.lib Conclusion effect.lib Julius Smith LAC-12 – 5 / 30

  6. Moog Voltage Controlled Filters (VCF) Overview • moog vcf 2b = ideal Moog VCF transfer function factored effect.lib into second-order “biquad” sections • Moog VCF • phasing/flanging • reverberation ◦ Static frequency response is more accurate than filter.lib moog vcf (which has an unwanted one-sample delay in oscillator.lib its feedback path) Conclusion ◦ Coefficient formulas are more complex when one or both parameters are varied • moog vcf 2bn = same but using normalized ladder biquads ◦ Super-robust to time-varying resonant-frequency changes (no pops!) ◦ See F AUST example vcf wah pedals.dsp Julius Smith LAC-12 – 6 / 30

  7. Moog VCF See F AUST example vcf wah pedals.dsp Moog VCF moog vcf(res,fr) analog-form Moog VCF res = corner-resonance amount [0-1] fr = corner-resonance frequency in Hz moog vcf 2b(res,fr) Moog VCF implemented as two biquads ( tf2 ) moog vcf 2bn(res,fr) two protected, normalized-ladder biquads ( tf2np ) Julius Smith LAC-12 – 7 / 30

  8. Phasing and Flanging See F AUST example phaser flanger.dsp Phasing and Flanging vibrato2 mono(...) modulated allpass-chain (see effect.lib for usage) phaser2 mono(...) phasing based on 2nd-order allpasses (see effect.lib fo phaser2 stereo(...) stereo phaser based on 2nd-order allpass chains flanger mono(...) mono flanger flanger stereo(...) stereo flanger Julius Smith LAC-12 – 8 / 30

  9. Artificial Reverberation ( effect.lib ) Overview • General Feedback Delay Network (FDN) Reverberation effect.lib • Moog VCF • phasing/flanging See F AUST example reverb designer.dsp • reverberation filter.lib oscillator.lib • Zita-Rev1 Reverb (FDN+Schroeder) by Fons Adriaensen Conclusion (ported to F AUST ) See F AUST example zita rev1.dsp Julius Smith LAC-12 – 9 / 30

  10. Overview effect.lib filter.lib oscillator.lib Conclusion filter.lib Julius Smith LAC-12 – 10 / 30

  11. Ladder/Lattice Digital Filters ( filter.lib ) Overview • Ladder and lattice digital filters have superior numerical effect.lib properties filter.lib • ladder/lattice • Arbitrary Order (thanks to pattern matching in F AUST ) • normalized ladder • filter banks oscillator.lib • Arbitrary (Stable) Poles and Zeros Conclusion • All Four Major Types: ◦ Kelly-Lochbaum Ladder Filter ◦ One-Multiply Lattice Filter ◦ Two-Multiply Lattice Filter ◦ Normalized Ladder Filter Julius Smith LAC-12 – 11 / 30

  12. Normalized Ladder Digital Filters ( filter.lib ) Overview Advantages of the Normalized Ladder Filter Structure: effect.lib filter.lib • Signal Power Invariant wrt Coefficient Variation • ladder/lattice • normalized ladder ⇒ Extreme Modulation is Safe • filter banks oscillator.lib • Super-Solid Biquad (sweep it as fast as you want!): Conclusion tf2snp() “transfer function, 2nd-order, s-plane, normalized, protected” • See F AUST example vcf wah pedals.dsp Julius Smith LAC-12 – 12 / 30

  13. Ladder and Lattice Digital Filters Lattice/Ladder Filters iir lat2(bcoeffs,acoeffs) two-multiply lattice digital filter iir kl(bcoeffs,acoeffs) Kelly-Lochbaum ladder digital filter iir lat1(bcoeffs,acoeffs) one-multiply lattice digital filter iir nl(bcoeffs,acoeffs) normalized ladder digital filter tf2np(b0,b1,b2,a1,a2) biquad based on stabilized second-order normalized ladder filter nlf2(f,r) second-order normalized ladder digital filter special API Julius Smith LAC-12 – 13 / 30

  14. Block Diagrams Overview import("filter.lib"); effect.lib filter.lib bcoeffs = (1,2,3); • ladder/lattice • normalized ladder acoeffs = (0.1,0.2); • filter banks oscillator.lib process = impulse <: Conclusion iir(bcoeffs,acoeffs), iir_lat2(bcoeffs,acoeffs), iir_kl(bcoeffs,acoeffs), iir_lat1(bcoeffs,acoeffs) :> _; Julius Smith LAC-12 – 14 / 30

  15. Audio Filter Banks ( filter.lib ) Overview • “Analyzer” ∆ = Power-Complementary Band-Division effect.lib ( e.g. , for Spectral Display) filter.lib • ladder/lattice • normalized ladder See F AUST example spectral level.dsp • filter banks oscillator.lib Conclusion • “Filterbank ∆ = Allpass-Complementary Band-Division (Bands Summable Without Notch Formation) See F AUST example graphic eq.dsp • Filterbanks in filter.lib are implemented as analyzers in cascade with delay equalizers that convert the (power-complementary) analyzer to an (allpass-complementary) filter bank Julius Smith LAC-12 – 15 / 30

  16. Overview effect.lib filter.lib oscillator.lib Conclusion oscillator.lib Julius Smith LAC-12 – 16 / 30

  17. oscillator.lib Overview Reference implementations of elementary signal generators: effect.lib filter.lib • sinusoids (filter-based) oscillator.lib • sinusoids • sawtooth (bandlimited) • oscb • oscr ◦ pulse-train = saw minus delayed saw • oscs • oscw ◦ square = 50% duty-cycle pulse-train • virtual analog • sawN ◦ triangle = (leakily) integrated square • sawtooth examples • pink noise ◦ impulse-train = differentiated saw Conclusion ◦ (all alias-suppressed) • pink-noise ( 1 /f noise) Julius Smith LAC-12 – 17 / 30

  18. Sinusoid Generators in oscillator.lib Overview oscb “biquad” two-pole filter section effect.lib (impulse response) filter.lib oscr 2D vector rotation oscillator.lib (second-order normalized ladder) • sinusoids • oscb provides sine and cosine outputs • oscr • oscs oscrs sine output of oscr • oscw oscrc cosine output of oscr • virtual analog • sawN oscs state variable osc., cosine output • sawtooth examples (modified coupled form resonator) • pink noise oscw Conclusion digital waveguide oscillator oscws sine output of oscw oscwc cosine output of oscw Julius Smith LAC-12 – 18 / 30

  19. Block Diagrams Overview Inspect the following test program: effect.lib filter.lib oscillator.lib import("oscillator.lib"); • sinusoids • oscb • oscr freq = 100; • oscs • oscw • virtual analog process = oscb(freq), • sawN • sawtooth examples oscrs(freq), • pink noise oscs(freq), Conclusion oscws(freq); Julius Smith LAC-12 – 19 / 30

  20. Sinusoidal Oscillator oscb oscb (impulsed direct-form biquad) Overview effect.lib • One multiply and two adds per sample of output filter.lib oscillator.lib • Amplitude varies strongly with frequency • sinusoids • oscb • oscr • Numerically poor toward freq=0 (“dc”) • oscs • oscw • virtual analog • Nice choice for high, fixed frequencies • sawN • sawtooth examples • pink noise Conclusion Julius Smith LAC-12 – 20 / 30

  21. Sinusoidal Oscillator oscr oscr (2D vector rotation) Overview effect.lib • Four multiplies and two adds per sample filter.lib oscillator.lib • Amplitude is invariant wrt frequency • sinusoids • oscb • oscr • Good down to dc • oscs • oscw • virtual analog • In-phase (cosine) and phase-quadrature (sine) outputs • sawN • sawtooth examples • Amplitude drifts over long durations at most frequencies • pink noise (coefficients are roundings of s = sin(2*PI*freq/SR) Conclusion and c = cos(2*PI*freq/SR) , so s 2 + c 2 � = 1 ) • Nice for rapidly varying frequencies Julius Smith LAC-12 – 21 / 30

  22. Sinusoidal Oscillator oscs oscs (digitized “state variable filter”) Overview effect.lib • “Magic Circle Algorithm” in computer graphics filter.lib oscillator.lib • Two multiplies and two additions per output sample • sinusoids • oscb • oscr • Amplitude varies much less with frequency than oscr • oscs • oscw • virtual analog • Good down to dc • sawN • sawtooth examples • No long-term amplitude drift • pink noise Conclusion • In-phase and quadrature components available at low frequencies (exact at dc) • Nice lower-cost replacement for oscr when amplitude can vary slightly with frequency, and exact phase-quadrature outputs are not needed Julius Smith LAC-12 – 22 / 30

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend