Contents
- 12.3.3 Feedforward Comb Filter with Gain =-1
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 are computer programs run on a mobile device. All these tools are created by programming a computer.
Hack Audio: An Introduction to Computer Programming and Digital Signal Processing in MATLAB provides an introduction for musicians and audio engineers interested in computer programming.
It is intended for a range of readers including those with years of programming experience and those ready to write their first line of code. In the book, computer programming is used to create audio effects using digital signal processing. By the end of the book, readers implement the following effects: signal gain change, digital summing, tremolo, auto-pan, mid/side processing, stereo widening, distortion, echo, filtering, equalization, multi-band processing, vibrato, chorus, flanger, phaser, pitch shifter, auto-wah, convolution and algorithmic reverb, vocoder, transient designer, compressor, expander, and de-esser. Throughout the book, several types of test signals are synthesized, including sine wave, square wave, sawtooth wave, triangle wave, impulse train, white noise, and pink noise. Common visualizations for signals and audio effects are created including waveform, characteristic curve, goniometer, impulse response, step response, frequency spectrum, and spectrogram. Eric Tarr is an assistant professor of Audio Engineering Technology at Belmont University in Nashville, TN. Eric Tarr is an assistant professor of Audio Engineering Technology at Belmont University in Nashville, TN.
He teaches classes on digital audio, computer programming, and signal processing. He received a Ph.D., M.S., and B.S. in Electrical and Computer Engineering from the Ohio State University. He received a B.A. in Mathematics and a minor in Music from Capital University in Columbus, OH. His work has spanned across the topics of speech signal processing, musical robotics, sound spatialization, acoustic and electronic system modeling, hearing loss, perception, and cognition.
He has published articles in the Journal of the Acoustical Society of America, Journal of Speech, Language, and Hearing Research, International Journal of Audiology, and Mechanical Engineering Research. He is a member of the Audio Engineering Society. In 2015, Dr. Tarr received the Gibson Foundation Les Paul Music Innovation Award as the principal investigator of a research grant on Blockchain Technology in the Music Industry. AUDIO ENGINEERING SOCIETY PRESENTS http://www.aes.org/ Editorial Board Chair: Francis Rumsey, Logophon Ltd. Hyun Kook Lee, University of Huddersfield Natanya Ford, University of West England Kyle Snyder, Ohio University Other titles in the Series:Handbook for Sound Engineers, 5th Edition Edited by Glen Ballou Audio Production and Critical Listening, 2nd Edition Authored by Jason Corey Recording Orchestra and Other Classical Music Ensembles Authored by Richard King Recording Studio Design, 4th Edition Authored by Philip Newell Modern Recording Techniques, 9th Edition Authored by David Miles Huber Immersive Sound: The Art and Science of Binaural and Multi-Channel Audio Edited by Agnieszka Roginska and Paul Geluso Hack Audio: An Introduction to Computer Programming and Digital Signal Processing in MATLAB Authored by Eric Tarr
Hack Audio
An Introduction to Computer Programming and Digital Signal Processing in MATLAB
Eric Tarr
First published 2019 by Routledge 711 Third Avenue, New York, NY 10017 and by Routledge 2 Park Square, Milton Park, Abingdon, Oxon, OX14 4RN Routledge is an imprint of the Taylor & Francis Group, an informa business 2019 by Taylor & Francis The right of Eric Tarr to be identified as author of this work has been asserted by him in accordance with sections 77 and 78 of the Copyright, Designs and Patents Act 1988.
All rights reserved. No part of this book may be reprinted or reproduced or utilised in any form or by any electronic, mechanical, or other means, now known or hereafter invented, including photocopying and recording, or in any information storage or retrieval system, without permission in writing from the publishers. Reprint with permission of The MathWorks, Inc. MATLAB and Simulink are registered trademarks of The MathWorks, Inc. and are used with permission. The MathWorks does not warrant the accuracy of the text or exercises in this book.
This books use or discussion of MATLAB and Simulink software or related products does not constitute endorsement or sponsorship by the MathWorks of a particular pedagogical approach or particular use of the MATLAB and Simulink software. For MATLAB and Simulink product information, please contact: The MathWorks, Inc. 3 Apple Hill Drive Natick, MA 01760-2098 USA Tel: 508-647-7000 Fax: 508-647-7001 E-mail: Web: mathworks.com How to buy: www.mathworks.com/store Trademark notice: Product or corporate names may be trademarks or registered trademarks, and are used only for identification and explanation without intent to infringe. Library of Congress Cataloging-in-Publication Data Names: Tarr, Eric, author. Title: Hack audio : an introduction to computer programming and digital signal processing in MATLAB / Eric Tarr. | Series: Audio Engineering Society presents Identifiers: LCCN 2018006035| ISBN 9781138497542 (hardback : alk. paper) | ISBN 9781138497559 (pbk. : alk. paper) | ISBN 781351018463 (ebook) Subjects: LCSH: MATLAB. | Computer sound processing. | Computer sound processing.
Classification: LCC ML74.4.M36 T37 2018 | DDC 006.5dc23 LC record available at https://lccn.loc.gov/2018006035 ISBN: 978-1-138-49754-2 (hbk) ISBN: 978-1-138-49755-9 (pbk) ISBN: 978-1-351-01846-3 (ebk) Typeset in Times by diacriTech Dedicated to my supportive wife, Kate
Contents
12.3.3Feedforward Comb Filter with Gain =-1
List of Tables
List of Figures
10.3THD for infinite clipping with sine wave input, f=2500 10.5THD for half-wave rectification with sine wave input, f=2500 10.7THD for full-wave rectification with sine wave input, f=2500 10.9THD for hard-clipping distortion with sine wave input, f=2500 10.11THD for soft-clipping, cubic distortion with sine wave input, f=2500 10.13Characteristic curve for arctangent distortion with various values 10.14THD for arctangent distortion with sine wave input, f=2500 10.16THD for sine distortion with sine wave input, f=2500 10.18THD for exponential distortion with sine wave input, f=2500 10.20THD for piecewise overdrive with sine wave input, f=2500 10.22THD for diode clipping with sine wave input, f=2500 10.25THD for bit reduction with sine wave input, f=2500 10.28THD for asymmetrical distortion with sine wave input, f=2500 12.9Block diagram of comb filter using M-sampledelay 12.13Block diagram of feed-forward comb filter with gain=-1 12.14Magnitude response of comb filters with gain=-1 12.17Frequency response of feed forward filter with >1 15.14A2 = 110 Hzpitch shifted to A1 = 55 Hz 18.29Step response of a bi-quad LPF with several Q values