Last week, I stated that given a multichannel pickup with a wide and flat frequency response such as the Neo, it is possible to reproduce the frequency response of various pickup positions (bridge, neck, middle —anywhere from the nut to the bridge) without actually moving the pickup. But we can do better! We can actually emulate multiple pickups using multiple comb filters. Scroll down for some sound clips!
To be clear, I am not aiming for emulation of specific guitars (On Emulation, July 2013). I want to use emulation only as a starting point so the user will have something familiar to start with. Once that is established, we can move on to explore entirely new tonal palette —timbres we’ve never heard before. It’s just one of the filtering possibilities, and one that we guitar players are familiar with.
To recap, we can use comb filters to simulate pickup placement. A Feedforward comb filter with a delay of 133.78 samples (at 44100 samples per second) can simulate the neck pickup for the low-E string. By varying the delay line, you can simulate various pickup placements.
Again, if you want to learn the math, read the splendid article by J. Donald Tillman: Response Effects of Guitar Pickup Position and Width. I am using that as reference in this article.
Delay lines and comb filters are quite powerful beasts. They are the fundamental building blocks of Waveguide and Karplus-Strong Synthesis, which we’ll explore in the future. To give you a hint, we’ll be combining processing and direct manipulation of sound together with synthesis.
I particularly like the neck plus middle pickups on a Strat or Super-strat (e.g. SSS, HSH), especially when playing clean. I love the glassy, chime-like timbre. It’s the interaction between the two pickups that gives it its nice flavour (it is well known that this switch setting was discovered by accident). Here’s the computed frequency response of the neck plus middle pickup on the Strat. This graph was lifted from another Donald Tillman article about Response Effects of Guitar Pickup Mixing.
Following the article, I was able to build the comb-filter configuration in the figure below:
Where D1 is the average pickup delay of two pickups: (P2 + P1) / 2 and D2 is the distance between the two pickups divided by two: (P2 – P1) / 2. I won’t bore you with the math. Again, if you want to know more, read up on the articles mentioned above.
The cascaded comb filters are basically the same as before, but notice that the gain of the second comb filter is +1. It is called a Cosine Comb filter. The first is a Sine Comb filter. They behave differently in terms of frequency response. The Cosine Comb filter has peaks (with unity gain at D.C) where the Sine Comb filter has dips (and vice-versa: The Cosine Comb filter has dips where the Sine Comb filter has peaks).
With that configuration wired up in C++ code, I was able to get the expected frequency response:
Take note that these are actual frequency response plots. I am using Blue Cat’s FreqAnalyst, a realtime spectrum analyser plug-in, to monitor the output using a sine sweep from 20Hz to 20kHz as input to the filter. These graphs correspond exactly to the computed plots in the Response Effects of Guitar Pickup Mixing article.
Three or more Pickups
Alas, the two pickup configuration above does not extend to three or more pickups. That’s where the article stopped with a rather unfulfilling conclusion: “It’s pretty complicated; I will not be going in an analysis of this here”. So it took quite a bit of time for me to figure out how to implement mixing multiple pickups. You can’t just run the filters in parallel and mix the results, no! If you add two sine waves, both 1kHz, the result will not necessarily be 2x sine wave at 1kHz. If the sine waves are out of phase, you will get 0! They will cancel out. We need to account for the phase! Now, we are going into the Superposition territory.
To cut the long story short, the bottom line is that you need to adjust for the additional phase (delays) for each pickup relative to a fixed reference point. That reference point is arbitrary. I chose the middle of the neck as my reference point. That way, I can dynamically move the pickups anywhere from the bridge to the 12th fret (Say again? A pickup in the 12th fret?), in realtime, while performing!
The diagram below depicts the three comb configuration for simulating three pickups:
This configuration can be extended for any number of pickups. What’s really nice about this configuration is that it is also possible to do all sorts of nifty things such as reverse phase connections and arbitrary control of mix levels for each pickup. Adjusting the mix between the two pickups makes it possible to cancel the fundamental, for example.
D1, D2 and D3 are the individual pickup delays as usual. D1C, D2C and D3C are the phase compensation delays. They are there to normalise the phase of each pickup to a common reference point at ½ the full length of the guitar from the nut to the bridge (i.e. the 12th fret). Given Ref, the reference point delay, D1C, D2C and D3C are computed as follows:
D1C = (Ref – D1) / 2
D2C = (Ref – D2) / 2
D3C = (Ref – D3) / 2
For example, for the low E string (at 82.406889 Hz), and a sampling frequency at 44100 samples per second, the reference delay, Ref, is (44100 / 82.406889) / 2 = 267.574717. D1, D2 and D3 are computed as ratios using the actual pickup positions of a Strat with a 25.5 inch scale:
Neck Pickup: 6.375 inches from bridge = 133.7873585 samples delay
Middle Pickup: 3.875 inches from bridge = 81.3217277 samples delay
Bridge Pickup: 1.625 inches from bridge = 34.10266001 samples delay
The observant reader will notice the fractional delays used here. They are needed for accurate frequency computations.
So, finally, with this three comb filter configuration, I was able to recreate the graph near the bottom of the Response Effects of Guitar Pickup Mixing article. Here’s the computed frequency response:
Here’s the actual frequency response:
Finally, here are some audio samples. These are all recorded without effects (except the comb filters of course) from a Neo6 master sample (sustained E string). Yes, all these timbres came from a single source pickup!
|Raw Neo (No filter)|
|Neck + Middle|
|Neck + Bridge|
|Neck + Middle + Bridge|
|Middle + Bridge|
|Pickup at the 12th fret|
‘Till Next Week
Okidoki, that’s it for today. Next time, we’ll wrap up this three part article with a few more bits and pieces such as simulation of pickup aperture and compensation for the comb filter notches of the actual pickup. We’ll also cover emulation of humbuckers. Also, we might touch up a bit on user interfaces and real time control.