دانلود کتاب Designing Audio Effect Plugins in C++. For AAX, AU and VST3 with DSP Theory
by Will C. Pirkle
|
عنوان فارسی: طراحی صدا, اثر پلاگین ها در C++. برای AAX, AU و VST3 با DSP نظریه |
دانلود کتاب
جزییات کتاب
(even when Hurricane Irma comes for a brief visit), the revival and rebirth as each graduating class
of seniors gives way to a new batch of freshmen, and of course there’s summer break. But one of the
coolest parts is the fact that you get to reshape, revitalize, and reinvent your classes every year. You get
a perpetual “do-over” to fix the mistakes, the off-topic tangents, and the badly timed pop quizzes with
each new school year—and each year on the day of spring graduation, I make a list of the stuff to do
differently the next year.
The day I received my first copy of Designing Audio Effect Plug-Ins in C++ I began a list of the stuff
I’d do differently if given another chance to write a second edition. That happened in the fall of 2016
when I met with my Focal Press editor at the Audio Engineering Society (AES) Convention and I
bounced the idea off of her for a new edition that fixed the issues with the first edition.
I wrote Designing Audio Effect Plug-Ins in C++ from a notebook of class notes I had made and used
during the 1990s in the Music Engineering Technology program at the University of Miami. There
were few sources on the practical implementation of audio effects in C++ or digital signal processing
(DSP) assembly. We wrote flangers, choruses, long delays, and even a plucked string model, right out
of those original class notes.
When I put the first book together, the idea was to combine DSP theory and C++ practice to show
how those algorithms could be implemented in code. I used my RackAFX platform and application
programming interface (API) for two reasons: the API was stunningly lightweight and simple to
understand, and it was not tied to any other software. I didn’t have to worry about it becoming
obsolete. But some of the readers didn’t like the fact that the plugins didn’t run in Virtual Studio
Technology (VST®) or Audio Unit (AU®), and at first I didn’t understand that. The book wasn’t
supposed to be about those things; it was about the algorithms and the C++. RackAFX was an example
API to use as a conduit to demonstrate the ideas. After all, the other API’s are all basically the same
and do the same exact stuff.
The need to generate plugins for these APIs caused a ripple effect in the RackAFX software and the
original API, now named RAFX1 and gracefully retired. The last versions of RAFX1 could be exported
to AAX® (Avid Audio eXtension), AU, and VST2/3 on Windows or MacOS in Microsoft Visual Studio
and Apple Xcode projects, and they ran directly as VST2 and VST3 plugins on Windows 32-bit digital
audio workstations (DAWs). This all came with a price: there was a lot of code dating back to 2004 or
earlier, much of it now considered “illegal” in C++11. Back then, a lot of programmers didn’t use the
std:: library, preferring to hand-code the linked lists and hash tables. In addition, the original RAFX1
was never intended to need to display a custom graphical user interface (GUI). The original API was
written for a consulting project that involved a hardwired DSP chip—there was no GUI required. So
when I approached my Focal Press editor that fall in 2016, I had a new premise to work on: first, the
algorithms should be implemented in C++ objects that are fully portable across all APIs. After all, the
title does say “. . . in C++.”
Second, and more importantly, the second edition could not be RackAFX-centric, and there needed to
be a platform that anyone could use to write and design plugins on their DAW and operating system of
choice (Windows or MacOS). On top of that, this platform needed to be free from third parties for the
same reasons as before—no worrying about someone making the product obsolete, and no worrying
about someone deciding to charge fees or royalties for its use. I would have to write that new platform
myself, independently of RackAFX or any software development kit (SDK) or operating system (OS).
So, after saying goodbye to my editor at the AES show, I got on the airplane and began the notes
for what is now called ASPiK (Audio Specific Plugin Kernel). Two years later, the new platform is
complete, along with a new book to show off dozens of algorithms in more than 55 C++ objects for
you to use in your own projects. These objects are written for any API and may easily be used across
platforms and SDKs. If you are already committed to using another framework, like JUCE, you will
see that the C++ objects will snap into any API or framework—“Abstraction 101” as my grad student
Madhur used to say. The book is not about ASPiK (although it is there if you need it) and it doesn’t
rely on any platform. Those 55 C++ objects are not ASPiK objects either: they are straight C++ and
ready to rock right out of the box.
Chapters 1–8 are about plugins and the various plugin APIs. Instead of trying to re-print complete
code for all of the plugins across all of the APIs (something I won’t try again), each API gets its own
“Programming Guide” chapter. If you look at the Table of Contents you can see that each chapter’s
section lists are virtually identical. These programming guides are to help you navigate the various
API documentation and sample code. As you move through them, you will start to notice something:
the API’s are all basically the same and do the same exact stuff, only the implementation details are
different. If you are new to plugin programming, you can use the free ASPiK platform. It is completely
self-contained, including a built-in drag-and-drop GUI designer that launches from any plugin window
(AAX, AU, or VST) on any platform (Windows or MacOS). Chapters 6 and 7 cover ASPiK basics, and
how to use RackAFX to generate ASPiK projects—this is optional, and you don’t need RackAFX to
use ASPiK or generate new blank projects. Chapter 8 explains how the C++ book objects are packaged
and how an example plugin GUI parameter list is shown. There are DSP objects for low-level signal
processing chores, effect objects that encapsulate complete effect algorithms and are designed to
interface with a GUI in any plugin framework, and finally an entire library of wave digital filter (WDF)
components and adaptors for generating countless types of digital ladder filters.
Chapters 9 through 22 encompass the DSP theory, effect algorithms, and C++ objects and their use
in audio plugins. Chapters 9 and 10 are the basic DSP theory chapters and remain almost unchanged
from the first edition, as they seemed to be reader favorites. However, Chapter 10 has been beefed up
with the rest of the common biquadratic filter structures, along with a bonus structure in the Homework
section. Chapters 11–22 cover everything else—all of the original effects plus new chapters on
modulation, WDF and virtual analog filters, a fantastic new reverb, nonlinear processing, FFTs (fast
Fourier transforms), the phase vocoder, and finishing with sample rate conversion. The effects have all
been re-coded from scratch, and they sound fantastic and professional across the board.
If you look at the flow of the sections of each half of the book in the table of contents, you can see
that there are built-in “through lines” that run parallel across the chapters. This is most evident by the
ordering and naming of the sections, which repeat in sets, at first along with the various SDKs, and
later around the different DSP and effect objects. You can find the information on setting the plugin
latency for AAX, AU, or VST in the same spot in each chapter. Likewise, once you get the hang of
doing the first few C++ projects, then the rest will be easy because they all follow very consistent
design and coding patterns. Using ASPiK is extremely simple, and there are numerous tutorial videos
at www.willpirkle.com/support/video-tutorials/ to get you started. ASPiK is also very deep, including
very complex GUI and drawing options, GUI zooming, and other topics too advanced for this text—all
of this is also documented along with the ASPiK product and at my website as well.
Thanks to Lara Zoble, my Focal Press editor who encouraged me and believed in the premise for
the second edition. In addition, I need to say thanks to all those at the University of Miami’s Frost
School of Music who’ve both supported me and entrusted me with the Music Engineering Technology
program. They include Dean Shelly Berg, Rey Sanchez, and Serona Elton, along with my faculty
colleagues Joe Abbati, Chris Bennett, Dana Salminen and of course my old boss, Ken Pohlmann, who
is now surfing somewhere in north Florida, and having finally attained the “higher plane” we used
to dream about, is blissfully ignorant of the yearly SACS reports that need filing. Again. Thanks also
to my students who helped greatly with the RackAFX software and helped guide the directions of
my classes all these years. Most recently that would include Madhur Murli, Lucas Pylypczak, Luke
Habermehl, Akhil Singh, Jay Coggin, Hunter Garcia and Sanket Kulkarni, plus many more who also
played a role. I must include a massive shout-out to my former student Alex Zinn, who translated
various parts of the book Digitale Signalverarbeitung by Kammeyer and Kroschel—the original source
of the combined WDF RL, LC and RL models in Chapter 12—from German.
As with the original book, I look forward to hearing what you’ve cooked up in your own plugin labs.
You can find me at www.willpirkle.com. Please send videos and recordings of your plugin audio
madness!