Designing Audio Effect Plugins in C++
eBook - ePub

Designing Audio Effect Plugins in C++

For AAX, AU, and VST3 with DSP Theory

Will Pirkle

Condividi libro
  1. 656 pagine
  2. English
  3. ePUB (disponibile sull'app)
  4. Disponibile su iOS e Android
eBook - ePub

Designing Audio Effect Plugins in C++

For AAX, AU, and VST3 with DSP Theory

Will Pirkle

Dettagli del libro
Anteprima del libro
Indice dei contenuti
Citazioni

Informazioni sul libro

Designing Audio Effect Plugins in C++ presents everything you need to know about digital signal processing in an accessible way. Not just another theory-heavy digital signal processing book, nor another dull build-a-generic-database programming book, this book includes fully worked, downloadable code for dozens of professional audio effect plugins and practically presented algorithms.

Sections include the basics of audio signal processing, the anatomy of a plugin, AAX, AU and VST3 programming guides; implementation details; and actual projects and code. More than 50 fully coded C++ audio signal-processing objects are included. Start with an intuitive and practical introduction to the digital signal processing (DSP) theory behind audio plug-ins, and quickly move on to plugin implementation, gain knowledge of algorithms on classical, virtual analog, and wave digital filters, delay, reverb, modulated effects, dynamics processing, pitch shifting, nonlinear processing, sample rate conversion and more. You will then be ready to design and implement your own unique plugins on any platform and within almost any host program.

This new edition is fully updated and improved and presents a plugin core that allows readers to move freely between application programming interfaces and platforms. Readers are expected to have some knowledge of C++ and high school math.

Domande frequenti

Come faccio ad annullare l'abbonamento?
È semplicissimo: basta accedere alla sezione Account nelle Impostazioni e cliccare su "Annulla abbonamento". Dopo la cancellazione, l'abbonamento rimarrà attivo per il periodo rimanente già pagato. Per maggiori informazioni, clicca qui
È possibile scaricare libri? Se sì, come?
Al momento è possibile scaricare tramite l'app tutti i nostri libri ePub mobile-friendly. Anche la maggior parte dei nostri PDF è scaricabile e stiamo lavorando per rendere disponibile quanto prima il download di tutti gli altri file. Per maggiori informazioni, clicca qui
Che differenza c'è tra i piani?
Entrambi i piani ti danno accesso illimitato alla libreria e a tutte le funzionalità di Perlego. Le uniche differenze sono il prezzo e il periodo di abbonamento: con il piano annuale risparmierai circa il 30% rispetto a 12 rate con quello mensile.
Cos'è Perlego?
Perlego è un servizio di abbonamento a testi accademici, che ti permette di accedere a un'intera libreria online a un prezzo inferiore rispetto a quello che pagheresti per acquistare un singolo libro al mese. Con oltre 1 milione di testi suddivisi in più di 1.000 categorie, troverai sicuramente ciò che fa per te! Per maggiori informazioni, clicca qui.
Perlego supporta la sintesi vocale?
Cerca l'icona Sintesi vocale nel prossimo libro che leggerai per verificare se è possibile riprodurre l'audio. Questo strumento permette di leggere il testo a voce alta, evidenziandolo man mano che la lettura procede. Puoi aumentare o diminuire la velocità della sintesi vocale, oppure sospendere la riproduzione. Per maggiori informazioni, clicca qui.
Designing Audio Effect Plugins in C++ è disponibile online in formato PDF/ePub?
Sì, puoi accedere a Designing Audio Effect Plugins in C++ di Will Pirkle in formato PDF e/o ePub, così come ad altri libri molto apprezzati nelle sezioni relative a Technology & Engineering e Acoustical Engineering. Scopri oltre 1 milione di libri disponibili nel nostro catalogo.

Informazioni

Editore
Routledge
Anno
2019
ISBN
9780429954313

Chapter 1
Introduction

The first affordable digital audio devices began appearing in the mid-1980s. Digital signal processing (DSP) mathematics had been around since the 1960s. Commercial digital recordings first appeared in the early 1970s, but the technology did not become available for widespread distribution until about 15 years later when the advent of the compact disc ushered in the age of digital audio. Digital sampling refers to the acquisition of data points from a continuous analog signal. The data points are sampled on a regular interval known as the “sample period” or “sample interval.” The inverse of the sample period is the sampling frequency, which we denote as fs. A compact disc uses a sampling frequency of 44,100 Hz, producing 44,100 discrete samples per channel each second, with a sample interval of about 22.7 microseconds (μS). While digital sampling applies to many different systems, this book is focused on only one of those applications: audio. Prior to the early 1990s digital audio effects and synthesizers were implemented in hardware devices that consisted of microprocessors, microcontrollers, DSP chips, and other components. These devices almost exclusively featured analog input and output connections at first, and then later began to incorporate digital I/O. Digital audio workstations (DAWs) appeared in the late 1980s and audio software began to bloom. Microsoft released a software development kit (SDK) called DirectX® aimed at what was originally termed multimedia—a phrase many used at the time, but few really understood. Within DirectX were signal processing specifications to process audio and video data streams, and in short time the first DAWs appeared that supported DirectX “plugins.” Around the same time, Steinberg Media Technology published a specification for its Virtual Studio Technology (VST), which became arguably the most popular plugin format ever conceived.
During the course of this book, you will learn both DSP theory and C++ software applications. You have instant access to dozens of C++ objects that implement every signal processing algorithm in the book, and Chapters 9 through 22 will specifically reveal the conversion of the algorithms into C++ code. Each of these chapters will include one to three of these C++ objects. These objects are not tied to any plugin format or operating system. You may easily combine them with other signal processing objects or frameworks, and you have license to use them as you wish for commercial or noncommercial plugins. The resulting products sound fantastic. You will get great satisfaction when you begin inventing your own unique plugins, or implementing cutting-edge audio algorithms as soon as they are published.

1.1 Using This Book

Included are individual chapters for the three major commercially available effects specifications AAX (Avid Audio eXtension), Audio Unit (AU), and VST3 (Steinberg Media Technology GmbH). Plugin specifications are also known as APIs. The most important aspect of the book design is that you may use whatever platform you wish for writing and testing your plugins on MacOS or Windows and in the DAW of your choice. The DSP algorithms encapsulated in the aforementioned C++ objects are platform and API neutral. As you study the API-specific chapters, you will learn that all three of these APIs are really very similar in their internal functionality, but the implementation details for the different APIs can be overwhelming. This has lead to the use of third party plugin development frameworks.
You may already be using one of these frameworks, such as JUCE—if so, that is fine. You can easily incorporate the C++ signal processing objects into these frameworks because the objects are not API or platform centric. Make sure you adhere to any licensing restrictions that these frameworks require and follow their rules for software release or code publication. You will need to know how to get audio in and out of the frameworks as well as how to design your graphical user interface (GUI) and handle parameter changes from the GUI or DAW automation so please refer to documentation for those frameworks for that information.
If you are like most readers you probably have not developed a plugin using one of those frameworks—or perhaps you tried, but got bogged down in the steep learning curves and the new implementation details that the frameworks were supposed to help alleviate. Or you may have downloaded one of the SDKs and were bewildered by its contents. That is also fine because we’ve spent the last three years developing a fully functional, truly professional, license-free platform for you to use called ASPiK™ (which stands for “Audio Specific PlugiIn Kernel”). ASPiK consists of a set of C++ objects that are custom tailored to interface directly with AAX, AU, and VST3 plugins, along with a mechanism for easily generating new plugin projects.
The projects for the book are packaged as ASPiK plugin projects and are simple to integrate into other third party frameworks if you would rather use them instead. All of the plugin projects in the book are written in a way that will make the code simple to transport to other development systems. In addition, the code in the individual chapters does not focus on any API, or on ASPiK itself. The fundamental goal of the book is to help you understand audio signal processing algorithms and how to convert them into C++ objects; it tries to be as platform, framework, and API neutral as possible.
Included in the ASPiK framework is a complete, platform-independent GUI design system called the PluginGUI object, with a drag-and-drop interface for creating beautiful and professional looking GUIs without writing a single line of code. If you want to experiment with GUI programming, you can find out about custom GUI design in Chapter 21.
If you are new to plugin programming, or you want to develop new plugins or test algorithms in the most efficient manner possible, you might want to use the RackAFX™ software, however this book is not RackAFX-centric nor requires it for use. There is absolutely no RackAFX-specific code in ASPiK or its accompanying objects. However, RackAFX simplifies plugin programming and design by allowing you to quickly define the plugin parameters and user interface, and it includes tools for testing your plugin algorithm such as an oscillator, oscilloscope, spectrum analyzer, and more. You may also use RackAFX to generate ASPiK projects based off of your designs, and these ASPiK projects do not rely upon, nor include anything RackAFX-specific. Almost all of the real-time response plots you see in this book—including frequency, impulse, step, and phase responses—were done using RackAFX’s plugin analyzer, which can make analytical measurements on your plugin’s algorithm while it is running.

1.2 Fundamentals of Audio Signal Processing

Because plugins are software variations on hardware designs, it’s worth examining how the hardware systems operate: acquisition of data, audio reconstruction, and numerical representation of the audio signal. Then we define our analytical test signals and the basic signal processing blocks.

1.2.1 Acquisition of Audio Samples

The incoming analog audio signal is sampled with an analog to digital converter (ADC or A/D). Analog to digital converters must accurately sample and convert an incoming signal, producing a valid digitally coded number that represents the analog voltage within the sampling interval. This means that for CD audio, a converter must produce an output every 22.7 μS. Figure 1.1a shows the block diagram of the input conversion system with low-pass filter, A/D, and encoder while Figure 1.1b demonstrates the Nyquist frequency’s encoding consisting of only two points.
The sampling theorem states that a continuous analog signal can be sampled into discrete data points and then reconstructed into the original analog signal without any loss of information—including inter-sample fluctuations—if and only if the input signal has been band-limited so that it contains no frequencies higher than half the sample rate, also known as the Nyquist frequency or Nyquist rate. Band-limited means low-pass filtered (LPF). Band-limiting the input signal prior to sampling is known as adhering to the Nyquist criteria.
Violating the Nyquist criteria will create audible errors in the signal in the form of an erroneously encoded signal. We will refer to the Nyquist frequency simply as “Nyquist” from now on. Frequencies higher than Nyquist will fold back into the spectrum. This effect is called aliasing since the higher-than-Nyquist frequencies are encoded “in disguise” or as an “alias” of the actual frequency. This is easiest explained with a picture of an aliased signal shown in Figure 1.1c where the encoding error is shown in the dotted waveform—it is clearly not the correct frequency.
Once the aliased signal is created it will remain as a permanent error in the signal. The LPF that band-limits the signal at the input is called the “anti-aliasing filter.” Another form of aliasing occurs at the movies. An analog movie camera takes 30 pictures (frames) per second. However, it must often film objects that are rotating at much higher rates than 30 per second, like helicopter blades or car wheels.
Figure 1.1: (a) An analog-to-digital encoding system. (b) The Nyquist frequency is the highest frequency that can be encoded with two samples per period. (c) Increasing the frequency above Nyquist but keeping the sampling interval the same results in an obvious coding error—the aliased signal (dotted line) is the result.
Figure 1.1: (a) An analog-to-digital encoding system. (b) The Nyquist frequency is the highest frequency that can be encoded ...

Indice dei contenuti