Hack audio an introduction to computer programming and digital signal processing in MATLAB
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 a...
Otros Autores: | |
---|---|
Formato: | Libro electrónico |
Idioma: | Inglés |
Publicado: |
London :
Routledge
2018.
|
Edición: | 1st edition |
Colección: | Audio Engineering Society presents.
|
Materias: | |
Ver en Biblioteca Universitat Ramon Llull: | https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009630651906719 |
Tabla de Contenidos:
- Cover
- Half Title
- Series Page
- Title Page
- Copyright Page
- Dedication
- Contents
- List of Tables
- List of Figures
- List of Examples
- Acknowledgements
- 1. Introduction
- 1.1 Introduction: Computer Programming and Digital Signal Processing
- 1.2 The Purpose of This Book
- 1.3 Intended Readers
- 1.4 Topics Covered
- 1.5 Additional Content
- 2. Basics of Programming in MATLAB®
- 2.1 Introduction: Computer Programming in MATLAB
- 2.2 Programming Languages
- 2.3 Executed Commands
- 2.3.1 Error Statements
- 2.4 Mathematics
- 2.4.1 Operators
- 2.4.2 Variables
- Variable Naming Rules and Conventions
- 2.5 Data Types
- 2.5.1 Numbers
- 2.5.2 Characters
- 2.5.3 Strings
- String Concatenation
- 2.6 Arrays
- 2.6.1 Basic Array Creation
- 2.6.2 Plotting Arrays
- 2.7 Mathematical Functions
- 2.7.1 Plotting Mathematical Functions
- 2.8 APPENDIX: Additional Plotting Options
- 2.8.1 Line Specification
- Line Color and Style
- Line Width
- Stem Plot
- 2.8.2 Axis Labels
- 2.8.3 Figure Title
- 2.8.4 Figure Legend
- 2.8.5 Axis Scale
- 2.8.6 Axis Dimensions
- 2.8.7 Multiple Arrays
- Multiple Windows
- Identical Dimensions
- Figure Hold
- Subplot
- 3. Basics of Audio in MATLAB®
- 3.1 Introduction: Digital Audio Signals
- 3.2 MATLAB Audio Functions
- 3.2.1 audioread
- 3.2.2 sound
- 3.2.3 audiowrite
- 3.2.4 audioinfo
- 3.3 Working with Audio Signals in Arrays
- 3.3.1 Indexing Arrays
- Audio Edit Signal Splice
- 3.3.2 Array Reversal
- 3.3.3 Additional Methods to Create Arrays
- 3.3.4 Array Transposition
- 3.3.5 Determining Dimensions of Arrays
- 3.4 Visualizing the Waveform of an Audio Signal
- Bibliography
- 4. MATLAB® Programming Environment
- 4.1 Introduction: MATLAB Application
- 4.1.1 Command Window
- Execute Multiple Commands
- 4.1.2 Workspace
- Clear the Workspace.
- Save and Load Variables in the Workspace
- 4.1.3 Current Folder
- 4.2 MATLAB m-Files
- 4.2.1 Scripts
- 4.2.2 Commenting Code
- 4.3 MATLAB Debugging Mode
- 4.4 MATLAB Help Documentation
- 5. Logicals and Control Structures in Programming
- 5.1 Introduction: Controlling the Flow of Execution
- 5.2 Logical Data Type
- 5.2.1 Logical Operations
- 5.2.2 Combining Logical Operators
- 5.2.3 String Compare
- 5.3 Types of Control Structures
- 5.3.1 Conditional Statements
- if Statement
- else and elseif Statements
- switch Statement
- Comparison of if and switch Statements
- 5.3.2 Loops
- for Statement
- while Statement
- Comparison of for and while Statements
- 5.3.3 Functions
- Local Functions
- Programmer-Created Documentation
- 6. Signal Gain and DC Offset
- 6.1 Introduction: Digital Signal Processing
- 6.1.1 Element-Wise Processing
- 6.1.2 Element-Wise Referencing
- 6.1.3 Block Diagrams
- 6.2 Scalar Operations with Arrays
- 6.2.1 Scalar Multiplication: Converting Time Units
- 6.3 Scalar Multiplication: Signal Gain
- 6.3.1 Signal Gain Block Diagram
- 6.3.2 Polarity Inversion
- 6.3.3 Decibel Scale
- Background
- Decibel Scale Processing
- 6.4 Visualizing the Amplitude Change
- 6.4.1 Input versus Output Characteristic Curve
- 6.5 Scalar Addition: DC Offset
- 6.5.1 DC Offset Block Diagram
- 6.6 Combined Signal Gain and DC Offset
- 6.7 Amplitude Measurements
- 6.7.1 Peak Amplitude
- 6.7.2 Peak-to-Peak Amplitude
- 6.7.3 Root-Mean-Square Amplitude
- RMS Definition
- Summation Notation
- Full-scale RMS Amplitude
- 6.7.4 Dynamic Range Crest Factor
- 6.8 Amplitude Normalization
- 6.8.1 Peak Normalization
- 6.8.2 Root-Mean-Square Normalization
- Changing the RMS amplitude relative to another signal
- Bibliography
- 7. Introduction to Signal Synthesis
- 7.1 Introduction: Signal Synthesis.
- 7.2 Visualizing the Frequency Spectrum of an Audio Signal
- 7.3 Periodic Signals
- 7.3.1 Sine Wave
- Trigonometric Sine Function
- Synthesizing a Sine Wave Signal
- Phase Angle of Rotation Over Time
- 7.3.2 Cosine Function
- 7.3.3 Square Wave
- Square Wave Additive Synthesis
- Duty Cycle
- 7.3.4 Sawtooth Wave
- Sawtooth Wave Additive Synthesis
- 7.3.5 Triangle Wave
- Triangle Wave Additive Synthesis
- 7.3.6 Impulse Train
- Impulse Train Additive Synthesis
- 7.4 Aperiodic Signals
- 7.4.1 White Noise
- Bibliography
- 8. Digital Summing, Signal Fades, and Amplitude Modulation
- 8.1 Introduction: Combining Signals
- 8.1.1 Array Operations with Arrays
- 8.1.2 Using Array Operations to Combine Signals
- 8.2 Array Addition: Signal Summing
- 8.2.1 Addition Block Diagram
- 8.2.2 Array Subtraction
- Subtraction Block Diagram
- 8.3 Array Multiplication: Ring Modulation
- 8.4 Array Multiplication: Amplitude Fade
- 8.4.1 Linear Fade
- 8.4.2 Exponential Fade
- 8.4.3 S-Curve Fade
- Sine Function S-Curve
- 8.4.4 Equal-Amplitude and Equal-Power Fades
- 8.5 Array Multiplication: Amplitude Modulation
- 8.5.1 Amplitude Modulation Block Diagram
- 8.5.2 Tremolo
- Morphing the LFO from a Triangle Wave to a Square Wave
- 8.6 Appendix: Transforming Linear Scales
- 9. Stereo Panning and Mid/Side Processing
- 9.1 Introduction: Stereo Audio Signals
- 9.2 Stereo Panning
- 9.2.1 Panning Functions
- Equal-Amplitude and Equal-Power Panning
- Functions for -4.5 dB Panning
- 9.2.2 Rhythmic Auto-Pan Effect
- 9.3 Mid/Side Processing
- 9.3.1 Mid/Side Background
- 9.3.2 Encoding
- 9.3.3 Decoding
- 9.3.4 Stereo Image Widening
- 9.4 Visualizing Stereo Width
- 9.4.1 Polar Coordinates
- 9.4.2 Goniometer
- Bibliography
- 10. Distortion, Saturation, and Clipping
- 10.1 Introduction: Linear and Nonlinear Processing.
- 10.1.1 Audio Distortion Effects
- 10.2 Visualizing Nonlinear Processing
- 10.2.1 Total Harmonic Distortion Plot
- Distortion Test Script
- 10.3 Infinite Clipping
- 10.3.1 Sine Wave Analysis
- 10.4 Rectification
- 10.4.1 Half-Wave Rectification
- 10.4.2 Full-Wave Rectification
- 10.5 Hard Clipping
- 10.6 Soft Clipping
- 10.6.1 Cubic Distortion
- Sine Wave Analysis
- 10.6.2 Arctangent Distortion
- Power Series Approximation of the Arctangent Function
- 10.6.3 Additional Clipping Functions
- Sine Distortion
- Exponential Soft Clipping
- Piece-Wise Overdrive
- Diode Clipping
- 10.7 Bit reduction
- 10.7.1 Bit Depth Background
- 10.7.2 Bit-Reduction Algorithm
- 10.7.3 Dither Noise
- 10.8 Harmonic Analysis of Distortion Effects
- 10.8.1 Even and Odd Mathematical Functions
- 10.8.2 Asymmetrical Distortion Functions
- Including a DC Offset with a Distortion Function
- 10.9 Parallel Distortion
- Bibliography
- 11. Echo Effects
- 11.1 Introduction: Systems with Memory
- 11.2 Delay
- 11.2.1 Series Delay
- 11.2.2 Block Diagram Delay Notation
- 11.3 Converting Delay Time to Samples
- 11.3.1 Converting Seconds to Samples
- 11.3.2 Converting Tempo to Samples
- 11.4 Categorizing Echo Effects
- 11.4.1 Perceptual Temporal Fusion
- 11.5 Feedforward Echo
- 11.5.1 Difference Equation
- 11.5.2 Multi-Tap Echo
- 11.6 Feedback Echo
- 11.6.1 Feedback Gain Convention
- 11.6.2 Delayed Repetitions
- 11.6.3 System Stability
- 11.6.4 Combined Feedforward and Feedback Echo
- Output Gain Convention
- 11.6.5 Stereo Echo
- 11.6.6 Ping-Pong Echo
- 11.7 Impulse Response
- 11.7.1 Finite Impulse Response Systems
- 11.7.2 Infinite Impulse Response Systems
- 11.8 Convolution
- 11.8.1 MATLAB Convolution Function
- 11.8.2 Mathematical Equation for Convolution
- 11.8.3 Convolution Reverberation.
- 11.9 Necessary Requirements for Modeling a System with an Impulse Response and Convolution
- 11.9.1 Linearity
- Examples of Nonlinear Systems
- 11.9.2 Time Invariance
- Examples of Time-Variant Systems
- 12. Finite Impulse Response Filters
- 12.1 Introduction: Spectral Processors
- 12.1.1 Filter Characteristics
- 12.1.2 Visualizing the Spectral Response of a Filter
- 12.1.3 Units of Time Delay
- 12.2 Basic Feedforward Filters
- 12.2.1 Low-Pass Filter
- Basic LPF Impulse Response
- Sine Wave Analysis
- 12.2.2 High-Pass Filter
- Basic HPF Impulse Response
- Sine Wave Analysis
- Filter Order
- 12.3 Additional Feedforward Filters
- 12.3.1 Comb Filter
- Comb Filter Impulse Response
- Additional Comb Filters
- Sine Wave Analysis
- 12.3.2 Band-Pass Filter
- BPF Impulse Response
- 12.3.3 Feed-forward Comb Filter with Gain = -1
- 12.4 Changing the Relative Gain of a Filter
- 12.4.1 Changing the Gain of the Delay Line
- Generalized Sine Wave Analysis
- 12.4.2 Normalizing the Overall System Gain
- 12.5 Generalized Finite Impulse Response Filters
- 12.5.1 MATLAB FIR Filter Functions
- MATLAB fir1 Function
- MATLAB fir2 Function
- 12.6 Changing the Filter Order
- 12.7 Processing a Signal Using an FIR Filter
- 12.7.1 Convolution
- 12.8 Appendix I: Combining Multiple Filters
- 12.8.1 Series Filters
- Series LPF and HPF
- Two Series LPFs
- 12.8.2 Parallel Filters
- 12.9 Appendix II: Using an FIR Filter to Synthesize Pink Noise
- Bibliography
- 13. Infinite Impulse Response Filters
- 13.1 Introduction: Filters with Feedback
- 13.1.1 Spectral Analysis of Filters with Feedback
- 13.2 Basic Feedback Filters
- 13.2.1 Negative Feedback
- 13.2.2 Inverted Comb Filter
- 13.3 Combined Feedforward and Feedback Filters
- 13.3.1 All-Pass Filter
- Frequency Response of APF
- 13.3.2 Bi-Quadratic Filter.
- 13.4 MATLAB IIR Filter Design Functions.