-
Recent Posts
Archives
- January 2023
- April 2022
- November 2021
- September 2021
- April 2021
- October 2020
- January 2020
- April 2019
- September 2018
- August 2017
- May 2017
- January 2017
- December 2016
- September 2016
- February 2016
- September 2015
- January 2015
- March 2014
- January 2014
- October 2013
- June 2013
- May 2013
- April 2013
- March 2013
- February 2013
- December 2012
- November 2012
- May 2012
- March 2012
- January 2011
- December 2010
- November 2010
- July 2007
- March 2003
- February 2003
- August 2002
- January 1997
- November 1996
- October 1996
- August 1996
- July 1996
Categories
- Digital Audio (67)
- Aliasing (9)
- Convolution (3)
- Dither (7)
- Filters (24)
- DC Blocker (1)
- FIR Filters (7)
- IIR Filters (18)
- Biquads (12)
- Fourier (3)
- FFT (3)
- Fun Facts (3)
- Impulse Response (5)
- Jitter (2)
- Oscillators (12)
- Phase (2)
- Reverb (2)
- Sample Rate Conversion (10)
- Sampling Theory (6)
- Effects (1)
- Envelope Generators (5)
- Math (5)
- MIDI (2)
- Source Code (10)
- Synthesizers (9)
- Uncategorized (4)
- Video (7)
- Widgets (14)
- Digital Audio (67)
Category Archives: Source Code
WaveUtils updated
WaveUtils needed only a minor change for compatibility with the WaveTableOsc update—addWaveTable changes to AddWaveTable. But I added something new while I was at it. The original wave table articles advocated minimizing the number of tables necessary—one per octave—by allowing … Continue reading
Posted in Source Code, Wavetable Oscillators
17 Comments
WaveTableOsc optimized
The wave table oscillator developed here in 2012 is pretty lightweight, but I never took a close look at optimization at the time. An efficient design is the number one optimization, and it already had that. I was curious how … Continue reading
Posted in Source Code, Wavetable Oscillators
6 Comments
How I write code
Next article I’ll post an update of our wave table oscillator, but first I’ll take the opportunity to discuss how I write code these days. Maybe it will help make sense of some of the choices in the code I … Continue reading
Posted in Source Code
18 Comments
More about source code
I was admonished (in not a nice way—not terribly rude, but quite to the point that I don’t know what I’m doing) by an anonymous visitor, who concluded that I don’t know much about C++ and maybe should have written … Continue reading
Posted in Source Code
7 Comments
Envelope generators—ADSR code
First, a brief example of how to use the ADSR code: // create ADSR env ADSR *env = new ADSR(); // initialize settings env->setAttackRate(.1 * sampleRate); // .1 second env->setDecayRate(.3 * sampleRate); env->setReleaseRate(5 * sampleRate); env->setSustainLevel(.8); … // at some … Continue reading
Posted in Envelope Generators, Source Code, Synthesizers
62 Comments
Replicating wavetables
My WaveTableOsc object uses a series of wavetables that are copies of single-cycle waveforms pre-rendered at a progressively smaller bandwidth. By “replicating wavetables” I mean taking a full-bandwidth single cycle waveform, and using it to make a complete set of … Continue reading
Posted in Oscillators, Source Code, Wavetable Oscillators
53 Comments
About source code examples
My goal is to teach audio DSP principles in a way that is more intuitive than most available material. And part of that goal is to help you to think about the your goals and how to solve them by … Continue reading
Posted in Source Code
2 Comments
A one-pole filter
Here’s a very simple workhorse of DSP applications—the one-pole filter. By comparison, biquads implement two zeros and two poles. You can see that our one-pole simply discards the zeros (the feed-forward delay paths) and the second pole (feedback path): We … Continue reading
Posted in DC Blocker, Digital Audio, IIR Filters, Source Code
40 Comments
Biquad C++ source code
I don’t want to get into the business of teaching people how to code—there are a huge number of free resources available on the internet to that do that. But I’ll give a small taste for those trying to get … Continue reading
Posted in Biquads, Digital Audio, Filters, IIR Filters, Source Code
96 Comments
A wavetable oscillator—the code
The wavetable oscillator code follows the basic structure of most audio processing blocks, with three types of functions: at the start: initialization—create the oscillator and its wavetables as needed: control—change the oscillator frequency, and pulse width for PWM every sample: … Continue reading
Posted in Digital Audio, Oscillators, Source Code, Wavetable Oscillators
27 Comments