Hack Audio

Book description

Computers are at the center of almost everything related to audio. Whether for synthesis in music production, recording in the studio, or mixing in live sound, the computer plays an essential part. Audio effects plug-ins and virtual instruments are implemented as software computer code. Music apps are computer programs run on a mobile device. All these tools are created by programming a computer.

Table of contents

  1. Cover
  2. Half Title
  3. Series Page
  4. Title Page
  5. Copyright Page
  6. Dedication Page
  7. Table of Contents
  8. List of Tables
  9. List of Figures
  10. List of Examples
  11. Acknowledgements
  12. Chapter 1: Introduction
    1. 1.1 Introduction: Computer Programming and Digital Signal Processing
    2. 1.2 The Purpose of This Book
    3. 1.3 Intended Readers
    4. 1.4 Topics Covered
    5. 1.5 Additional Content
  13. Chapter 2: Basics of Programming in MATLAB
    1. 2.1 Introduction: Computer Programming in MATLAB
    2. 2.2 Programming Languages
    3. 2.3 Executed Commands
      1. 2.3.1 Error Statements
    4. 2.4 Mathematics
      1. 2.4.1 Operators
      2. 2.4.2 Variables
    5. 2.5 Data Types
      1. 2.5.1 Numbers
      2. 2.5.2 Characters
      3. 2.5.3 Strings
    6. 2.6 Arrays
      1. 2.6.1 Basic Array Creation
      2. 2.6.2 Plotting Arrays
    7. 2.7 Mathematical Functions
      1. 2.7.1 Plotting Mathematical Functions
    8. 2.8 APPENDIX: Additional Plotting Options
      1. 2.8.1 Line Specification
      2. 2.8.2 Axis Labels
      3. 2.8.3 Figure Title
      4. 2.8.4 Figure Legend
      5. 2.8.5 Axis Scale
      6. 2.8.6 Axis Dimensions
      7. 2.8.7 Multiple Arrays
  14. Chapter 3: Basics of Audio in MATLAB
    1. 3.1 Introduction: Digital Audio Signals
    2. 3.2 MATLAB Audio Functions
      1. 3.2.1 audioread
      2. 3.2.2 sound
      3. 3.2.3 audiowrite
      4. 3.2.4 audioinfo
    3. 3.3 Working with Audio Signals in Arrays
      1. 3.3.1 Indexing Arrays
      2. 3.3.2 Array Reversal
      3. 3.3.3 Additional Methods to Create Arrays
      4. 3.3.4 Array Transposition
      5. 3.3.5 Determining Dimensions of Arrays
    4. 3.4 Visualizing the Waveform of an Audio Signal
    5. Bibliography
  15. Chapter 4: MATLAB® Programming Environment
    1. 4.1 Introduction: MATLAB Application
      1. 4.1.1 Command Window
      2. 4.1.2 Workspace
      3. 4.1.3 Current Folder
    2. 4.2 MATLAB m-Files
      1. 4.2.1 Scripts
      2. 4.2.2 Commenting Code
    3. 4.3 MATLAB Debugging Mode
    4. 4.4 MATLAB Help Documentation
  16. Chapter 5: Logicals and Control Structures in Programming
    1. 5.1 Introduction: Controlling the Flow of Execution
    2. 5.2 Logical Data Type
      1. 5.2.1 Logical Operations
      2. 5.2.2 Combining Logical Operators
      3. 5.2.3 String Compare
    3. 5.3 Types of Control Structures
      1. 5.3.1 Conditional Statements
      2. 5.3.2 Loops
      3. 5.3.3 Functions
  17. Chapter 6: Signal Gain and DC Offset
    1. 6.1 Introduction: Digital Signal Processing
      1. 6.1.1 Element-Wise Processing
      2. 6.1.2 Element-Wise Referencing
      3. 6.1.3 Block Diagrams
    2. 6.2 Scalar Operations with Arrays
      1. 6.2.1 Scalar Multiplication: Converting Time Units
    3. 6.3 Scalar Multiplication: Signal Gain
      1. 6.3.1 Signal Gain Block Diagram
      2. 6.3.2 Polarity Inversion
      3. 6.3.3 Decibel Scale
    4. 6.4 Visualizing the Amplitude Change
      1. 6.4.1 Input versus Output Characteristic Curve
    5. 6.5 Scalar Addition: DC Offset
      1. 6.5.1 DC Offset Block Diagram
    6. 6.6 Combined Signal Gain and DC Offset
    7. 6.7 Amplitude Measurements
      1. 6.7.1 Signal Peak Amplitude
      2. 6.7.2 Peak-to-Peak Amplitude
      3. 6.7.3 Root-Mean-Square Amplitude
      4. 6.7.4 Dynamic Range Crest Factor
    8. 6.8 Amplitude Normalization
      1. 6.8.1 Peak Normalization
      2. 6.8.2 Root-Mean-Square Normalization
    9. Bibliography
  18. Chapter 7: Introduction to Signal Synthesis
    1. 7.1 Introduction: Signal Synthesis
    2. 7.2 Visualizing the Frequency Spectrum of an Audio Signal
    3. 7.3 Periodic Signals
      1. 7.3.1 Sine Wave
      2. 7.3.2 Cosine Function
      3. 7.3.3 Square Wave
      4. 7.3.4 Sawtooth Wave
      5. 7.3.5 Triangle Wave
      6. 7.3.6 Impulse Train
    4. 7.4 Aperiodic Signals
      1. 7.4.1 White Noise
    5. Bibliography
  19. Chapter 8: Digital Summing, Signal Fades, and Amplitude Modulation
    1. 8.1 Introduction: Combining Signals
      1. 8.1.1 Array Operations with Arrays
      2. 8.1.2 Using Array Operations to Combine Signals
    2. 8.2 Array Addition: Signal Summing
      1. 8.2.1 Addition Block Diagram
      2. 8.2.2 Array Subtraction
    3. 8.3 Array Multiplication: Ring Modulation
    4. 8.4 Array Multiplication: Amplitude Fade
      1. 8.4.1 Linear Fade
      2. 8.4.2 Exponential Fade
      3. 8.4.3 S-Curve Fade
      4. 8.4.4 Equal-Amplitude and Equal-Power Fades
    5. 8.5 Array Multiplication: Amplitude Modulation
      1. 8.5.1 Amplitude Modulation Block Diagram
      2. 8.5.2 Tremolo
    6. 8.6 Appendix: Transforming Linear Scales
  20. Chapter 9: Stereo Panning and Mid/Side Processing
    1. 9.1 Introduction: Stereo Audio Signals
    2. 9.2 Stereo Panning
      1. 9.2.1 Panning Functions
      2. 9.2.2 Rhythmic Auto-Pan Effect
    3. 9.3 Mid/Side Processing
      1. 9.3.1 Mid/Side Background
      2. 9.3.2 Encoding
      3. 9.3.3 Decoding
      4. 9.3.4 Stereo Image Widening
    4. 9.4 Visualizing Stereo Width
      1. 9.4.1 Polar Coordinates
      2. 9.4.2 Goniometer
    5. Bibliography
  21. Chapter 10: Distortion, Saturation, and Clipping
    1. 10.1 Introduction: Linear and Nonlinear Processing
      1. 10.1.1 Audio Distortion Effects
    2. 10.2 Visualizing Nonlinear Processing
      1. 10.2.1 Total Harmonic Distortion Plot
    3. 10.3 Infinite Clipping
      1. 10.3.1 Sine Wave Analysis
    4. 10.4 Rectification
      1. 10.4.1 Half-Wave Rectification
      2. 10.4.2 Full-Wave Rectification
    5. 10.5 Hard Clipping
    6. 10.6 Soft Clipping
      1. 10.6.1 Cubic Distortion
      2. 10.6.2 Arctangent Distortion
      3. 10.6.3 Additional Clipping Functions
    7. 10.7 Bit reduction
      1. 10.7.1 Bit Depth Background
      2. 10.7.2 Bit-Reduction Algorithm
      3. 10.7.3 Dither Noise
    8. 10.8 Harmonic Analysis of Distortion Effects
      1. 10.8.1 Even and Odd Mathematical Functions
      2. 10.8.2 Asymmetrical Distortion Functions
    9. 10.9 Parallel Distortion
    10. Bibliography
  22. Chapter 11: Echo Effects
    1. 11.1 Introduction: Systems with Memory
    2. 11.2 Delay
      1. 11.2.1 Series Delay
      2. 11.2.2 Block Diagram Delay Notation
    3. 11.3 Converting Delay Time to Samples
      1. 11.3.1 Converting Seconds to Samples
      2. 11.3.2 Converting Tempo to Samples
    4. 11.4 Categorizing Echo Effects
      1. 11.4.1 Perceptual Temporal Fusion
    5. 11.5 Feedforward Echo
      1. 11.5.1 Difference Equation
      2. 11.5.2 Multi-Tap Echo
    6. 11.6 Feedback Echo
      1. 11.6.1 Feedback Gain Convention
      2. 11.6.2 Delayed Repetitions
      3. 11.6.3 System Stability
      4. 11.6.4 Combined Feedforward and Feedback Echo
      5. 11.6.5 Stereo Echo
      6. 11.6.6 Ping-Pong Echo
    7. 11.7 Impulse Response
      1. 11.7.1 Finite Impulse Response Systems
      2. 11.7.2 Infinite Impulse Response Systems
    8. 11.8 Convolution
      1. 11.8.1 MATLAB Convolution Function
      2. 11.8.2 Mathematical Equation for Convolution
      3. 11.8.3 Convolution Reverberation
    9. 11.9 Necessary Requirements for Modeling a System with an Impulse Response and Convolution
      1. 11.9.1 Linearity
      2. 11.9.2 Time Invariance
  23. Chapter 12: Finite Impulse Response Filters
    1. 12.1 Introduction: Spectral Processors
      1. 12.1.1 Filter Characteristics
      2. 12.1.2 Visualizing the Spectral Response of a Filter
      3. 12.1.3 Units of Time Delay
    2. 12.2 Basic Feedforward Filters
      1. 12.2.1 Low-Pass Filter
      2. 12.2.2 High-Pass Filter
    3. 12.3 Additional Feedforward Filters
      1. 12.3.1 Comb Filter
      2. 12.3.2 Band-Pass Filter
      3. 12.3.3 Feedforward Comb Filter with Gain = -1
    4. 12.4 Changing the Relative Gain of a Filter
      1. 12.4.1 Changing the Gain of the Delay Line
      2. 12.4.2 Normalizing the Overall System Gain
    5. 12.5 Generalized Finite Impulse Response Filters
      1. 12.5.1 MATLAB FIR Filter Functions
    6. 12.6 Changing the Filter Order
    7. 12.7 Processing a Signal Using an FIR Filter
      1. 12.7.1 Convolution
    8. 12.8 Appendix I: Combining Multiple Filters
      1. 12.8.1 Series Filters
      2. 12.8.2 Parallel Filters
    9. 12.9 Appendix II: Using an FIR Filter to Synthesize Pink Noise
    10. Bibliography
  24. Chapter 13: Infinite Impulse Response Filters
    1. 13.1 Introduction: Filters with Feedback
      1. 13.1.1 Spectral Analysis of Filters with Feedback
    2. 13.2 Basic Feedback Filters
      1. 13.2.1 Negative Feedback
      2. 13.2.2 Inverted Comb Filter
    3. 13.3 Combined Feedforward and Feedback Filters
      1. 13.3.1 All-Pass Filter
      2. 13.3.2 Bi-Quadratic Filter
    4. 13.4 MATLAB IIR Filter Design Functions
      1. 13.4.1 MATLAB butter Function
      2. 13.4.2 MATLAB ellip Function
      3. 13.4.3 Filter Order, Ripple, Slope, Attenuation
    5. 13.5 Series and Parallel Filter Configurations
      1. 13.5.1 Equalizer
      2. 13.5.2 Multi-Band Processing
    6. 13.6 Processing a Signal Using an IIR Filter
      1. 13.6.1 Approximating an IIR Filter as an FIR Filter
    7. 13.7 Appendix I: Additional Filter Forms
      1. 13.7.1 APF Direct Form II
      2. 13.7.2 Nested APF
      3. 13.7.3 Bi-Quad Filter Topologies
    8. 13.8 Appendix II: Slew Rate Distortion
    9. 13.9 Appendix III: Using an IIR Filter to Synthesize Pink Noise
    10. 13.10 Appendix IV: The LKFS/LUFS Standard Measurement of Loudness
    11. Bibliography
  25. Chapter 14: Delay Buffers and Fractional Delay Interpolation
    1. 14.1 Introduction: Fractional Delay Using Buffers
    2. 14.2 Delay Buffers
      1. 14.2.1 Linear Buffers
      2. 14.2.2 Circular Buffers
    3. 14.3 Fractional Delay
      1. 14.3.1 Linear Interpolation
      2. 14.3.2 Cubic Interpolation
    4. Bibliography
  26. Chapter 15: Modulated Delay Effects
    1. 15.1 Introduction: Modulated Delay Effects
      1. 15.1.1 Time-Invariant and Time-Variant Systems
      2. 15.1.2 Types of Modulated Delay Effects
    2. 15.2 Visualizing Time-Varying Information
      1. 15.2.1 Spectrogram
    3. 15.3 Low-Frequency Oscillator
    4. 15.4 Series Delay
      1. 15.4.1 Vibrato Effect
    5. 15.5 Parallel Delay
      1. 15.5.1 Chorus Effect
      2. 15.5.2 Flanger Effect
    6. 15.6 Pitch Shifter
      1. 15.6.1 Shifting by Scale Intervals
      2. 15.6.2 Delay Change and Pitch Change
      3. 15.6.3 Rate of Change in Delay Time
      4. 15.6.4 Preserving Signal Duration
      5. 15.6.5 Parallel Modulated Delay
      6. 15.6.6 Harmony Pitch Shifter Effect
    7. 15.7 Modulated All-Pass Filters
      1. 15.7.1 Phaser Effect
    8. 15.8 Modulated Low-Pass Filters
      1. 15.8.1 Auto-Wah Effect
    9. Bibliography
  27. Chapter 16: Algorithmic Reverb Effects
    1. 16.1 Introduction: Algorithmic Reverb Effects
      1. 16.1.1 Combining Modulated Delay Effects
      2. 16.1.2 Advantages of Algorithmic Reverb
    2. 16.2 Schroeder
      1. 16.2.1 Feedback Comb Filters
      2. 16.2.2 All-Pass Filter: Colorless Delays
      3. 16.2.3 Schroeder Algorithm Implementation
    3. 16.3 Moorer
      1. 16.3.1 Early Reflections
      2. 16.3.2 Low-Pass Filtered Feedback Delay
      3. 16.3.3 Moorer Algorithm Implementation
    4. 16.4 Feedback Delay Networks
      1. 16.4.1 Crossover Feedback
      2. 16.4.2 FDN Algorithm Implementation
    5. 16.5 Appendix: Estimating Reverb Time
    6. Bibliography
  28. Chapter 17: Amplitude Envelope Effects
    1. 17.1 Introduction: Amplitude Envelope Effects
      1. 17.1.1 Defining the Amplitude Envelope
      2. 17.1.2 Effects Based on the Amplitude Envelope
    2. 17.2 Signal Synthesis: ADSR
      1. 17.2.1 Creating the ADSR Amplitude Envelope
      2. 17.2.2 Applying the ADSR Amplitude Envelope
    3. 17.3 Measuring the Amplitude Envelope
      1. 17.3.1 Linear Method
      2. 17.3.2 Decibel Method
      3. 17.3.3 RMS Method
    4. 17.4 Envelope Amplitude Modulation
    5. 17.5 Vocoder
      1. 17.5.1 Multi-Band Envelope Modulation
      2. 17.5.2 Cochlear Implant Simulation
    6. 17.6 Envelope Parameter Modulation
      1. 17.6.1 Envelope-Wah Effect
    7. 17.7 Transient Designer
      1. 17.7.1 Envelope Detection Analysis
      2. 17.7.2 Controls
      3. 17.7.3 Implementation of the Transient Designer
    8. Bibliography
  29. Chapter 18: Dynamic Range Processors
    1. 18.1 Introduction: Dynamic Range Processors
      1. 18.1.1 Basics of Amplitude Processing
      2. 18.1.2 Compressors: Reduce Dynamic Range
      3. 18.1.3 Expanders: Increase Dynamic Range
    2. 18.2 Detection Path
    3. 18.3 Conversion to Decibel Scale
    4. 18.4 Static Characteristics
      1. 18.4.1 Threshold
      2. 18.4.2 Ratio
      3. 18.4.3 Knee
      4. 18.4.4 Gain Change Amount
    5. 18.5 Response Time
      1. 18.5.1 Step Response Analysis
      2. 18.5.2 MATLAB stepz Function
      3. 18.5.3 System Response Due to Step Input
      4. 18.5.4 Rise Time of Step Response
      5. 18.5.5 Using Response Time for a Compressor
      6. 18.5.6 Attack and Release Time
    6. 18.6 Additional Detection Path Methods
      1. 18.6.1 Feedback Detection
      2. 18.6.2 RMS Detection
      3. 18.6.3 Side-Chain Compressor
    7. 18.7 Expander
      1. 18.7.1 Gate
    8. 18.8 Upwards Compressor and Expander
    9. 18.9 Appendix I: De-Esser Effect
    10. 18.10 Appendix II: Second-Order Control Systems
      1. 18.10.1 Characteristics of a Second-Order Control System
      2. 18.10.2 Bi-quad Parameters and Step Response Characteristics
      3. 18.10.3 Second-Order System Design Function
    11. Bibliography
  30. Index

Product information

  • Title: Hack Audio
  • Author(s): Eric Tarr
  • Release date: June 2018
  • Publisher(s): Routledge
  • ISBN: 9781351018449