Virtual Pickups Part 1

It’s Sunday. What better way to spend the day than to do some DSP hacking. Today, it will be about Virtual Pickup Placement.

A well-known DSP guru remarked, “When you think about it, everything is a filter”. 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.

This can be done using delay lines. I love delay lines. There’s a lot you can do using delays. Here, I’m not talking about echoes and reverbs. I’m talking about delays in the nanoseconds to milliseconds range with or without feedback (like the chorus or flanger, respectively) possibly with multi-taps. A delay line is a filter!

If you like math, here’s a good article explaining all these: Response Effects of Guitar Pickup Position and Width. If not, I’ll try to explain it as simply as I can.

Standing Waves

The string is a very resonant filter. It’s all about standing waves. When you pluck an open E string, it vibrates in multiple ways. Try it and observe. You’ll see waves like these happening all at the same time:waves The most obvious is the fundamental frequency centered on the 12th fret (In the figure above, imagine the nut at the left and the bridge at the right). If you have a keen eye, the other harmonics are quite visible too (Get a strobe light, if you have one, to freeze the waves!). No, your eyes can’t really see a wave moving at 82 cycles per second (the open E string frequency). Instead, what you are actually seeing are the standing waves.

Nodes, Antinodes and Pickup Position

Some definitions: A node is a point where a string has minimal motion and an antinode is the point where the string has maximum motion. The 2nd harmonic, for example, has a node exactly at the middle (the 12th fret). It has two antinodes at ¼ (the 5th fret) and ¾ the length of the string. The fundamental has nodes only at the nut and the bridge and an antinode in the middle (the 12th fret).

Now here’s the thing: if you place a pickup pole at a certain node, the harmonic, and its multiples, will be attenuated. On the other hand, if the pickup is positioned at an antinode, the harmonic, and multiples thereof, will be prominent. For example, the Strat neck pickup happens to be positioned at about ¾ the distance from the nut to the bridge. Hence, that pickup will not be able to sense the 4th harmonic and all its mulitples (8th, 16th, etc.). Take note however that the Strat’s neck pickup also happens to be placed at an antinode of the 2nd harmonic (see figure below). These are the reasons why the 2nd harmonic is very prominent (stronger than the fundamental in fact) and for the dead 4th harmonic of E, when using the neck pickup.


Comb Filters

The effect of pickup placement gives us a frequency response like that of a comb filter. It is called a comb filter because its frequency response consists of a series of notches and spikes reminiscent of a comb. There are two varieties: feedforward and feedback comb filters.

The Feedforward comb filter subtracts a delayed version of the signal from the incoming signal. A good example of a Feedforward comb filter is the Chorus effect. The Feedback comb filter reverses this configuration. The Feedback comb filter mixes the incoming signal with the delayed version of the outgoing signal, fed back to the delay line (feedback). The amount of signal being fed back should be less than 100% for this to be stable, otherwise, you will get infinite repeats. The flanger is a good example of a Feedback comb filter.


For the E string, at 82.41 Hz, and the pickup positioned ¾ the distance from the nut to the bridge (the Strat neck position), the nodes will start from 329.64 Hz (82.41 Hz x 4 —the 4th harmonic), repeating in regular intervals (multiples of 329.64): 659.28, 988.92, 1318.56, 1648.2, 1977.84, 2307.48, 2637.12 and so on.

The article I mentioned above (Response Effects of Guitar Pickup Position and Width) includes this graph of the computed frequency response:

Computed Frequency Response of the neck pickup (E string, 82 Hz, 25.5-inch scale, pickup located 6.375 inches from the bridge).

This spectrum is equivalent to that of a feedforward comb filter. I hacked one in C++ and the actual result I got was exactly as expected. This is the actual frequency response:

feedforward-spectrumTo get the graph above, I wrote the comb filter as an AU plugin so I can use it in Logic Pro (my preferred audio workstation). In this test, I used a sine sweep from 20Hz to 20kHz as input to the comb filter plugin. I am using Blue Cat’s FreqAnalyst, a realtime spectrum analyser plug-in.

The example above is for the low E string. You will need one of these comb filters per string because the length of the delay is related to the frequency of the open string. At 44100 samples per second, the delay line for the E string will require at most 535.12 samples (44100 / 82.41). What? 535.12 samples? Yes, that implies that we actually need fractional delay lines using some kind of interpolation. To simulate the neck pickup, you will need a delay of 535.12 / 4 = 133.78 samples.

By varying the delay line, you can simulate various pickup placements and even smoothly change the pickup position in realtime while performing!

OK, that’s all for now, next time, we’ll talk about simulating two or more pickups, we’ll investigate other factors such as pickup width and how to compensate for the effects of the actual (non virtual) pickup placement. We’ll also talk about user interfaces and other details pertaining to performance and control of a multichannel pickup.

Further Reading

  1. What is a Filter?
  2. Standing Waves
  3. Standing Waves and Musical Instruments
  4. Response Effects of Guitar Pickup Position and Width
  5. Guitar Pickups – Tone & Timbre
  6. Comb Filters
  7. Fractional Delay Filtering by Linear Interpolation

Notify of

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Inline Feedbacks
View all comments
Would love your thoughts, please comment.x