Jon’s Software – Free Custom Acoustic Guitar IR

Free Custom Open-Source IR for Your Acoustic Guitar and Its Pickup

  • Octave script now requires only a 30 second sample
  • For use with inexpensive cabinet IR loaders with no mix function the script generates bypass blended IR options
  • .wav file, pickup left, mic right, open position strumming is best
  • The latest script name is jf45irv4.m

Check out this very brief demo that shows where you can take a bottom-of-the-line piezo under saddle transducer with the cheapest of guitar cabinet IR loaders:

The Easy Way to Generate a Custom IR for Your Guitar:

Email me jonfields45@gmail.com your .wav file. Generating the IR takes only seconds in Octave. Octave is the free open-source GNU MATLAB clone. MATLAB is a math software integrated development environment used in almost every technical field.

If you want, send a few recordings with different mic placements. 8” from the neck/body joint is a good starting point. In the years since this script has been released, I’ve concluded simple open position strumming does as good a job as anything you could choose to play. Listen to your mic recording, that is the IR’s target, and the IR will not be better than what it is used to calculate it.

  1. .WAV file at least 30 seconds long. My program only uses the first 30 seconds of the recording.
  2. Pickup left, Mic right, set your DAW for the two to be about equal in volume.
  3. No clipping.
  4. Try to keep your peaks within 15 dB of clipping (decent SNR, peaks above mid-scale on your recording software linear scale is best).
  5. The IRs generated will be at the same sample rate as the recording. All IR loaders support resample on download and will translate the sample rate to the one required by the IR pedal you’ve chosen.

I will email you back the IRs for each recording (IRs are 4KB .wav files):

  1. jf45ir – 2048 sample 100% IR, for pedals with a bypass mix function
  2. jf45ir7525 – 75% IR, 25% bypass, 2048 samples, best for under saddle transducers
  3. jf45ir5050 – 50% IR, 50% bypass, 2048 samples, best for sound board transducers
  4. jf45irbypass – 100% bypass with the same gain as the custom IRs for that recording.

Unlike electric guitar speaker cabinet IRs which are directly measured and sound great at 100% IR, acoustic guitar IRs are calculated and you will want some direct (bypass) pickup in the mix.

The Do-It-Yourself Way:

The primary advantage of doing this yourself at home is the ability to add your own EQ to the mic recording before generating the IR. This way you can cook your EQ choices into the IR. If you buy new guitars, mic’s, and pickups with any regularity, you can independently generate your own custom IRs.

  1. You will find the script below, first as a .pdf file, and second as a .txt file. Download the .txt and rename it jf45irv4.m
  2. Download the free GNU math development environment Octave and follow the installation instructions. https://www.gnu.org/software/octave/download.html For a Mac App (.dmg) look here. https://octave-app.org/Download.html The latest version is “unsigned” and be sure to follow the instructions on how to remove the quarantine, which must be done BEFORE double clicking the .dmg for installation. If you make an error and need to start over, make sure you eject Octave before starting over.

Place your guitar pickup/mic recordings in the same directory as the jf45irv4.m and run the script. If you start Octave directly, make sure the working directory, upper left corner of the Octave window, is set to the one with the script and your recording.

If your recording is called mgit.wav, for example, then type the following in the Octave command window (right side of window) followed by a carriage return. WordPress is overriding my font selection, and you must use vertical single quotes.

jf45irv4(‘mgit’)

Octave will then generate the IRs plus the frequency plot. They will be in the same directory.

Optional Reading: How Does jf45ir Work?

Unlike ToneDexter or the Baggs Voiceprint, I am only trying to solve the IR generation problem. You still need a pedal for playback in performance.

I am taking a purely mathematical approach to the problem of coming up with an IR that makes the left channel (pickup) of the sample sound like the right channel (mic). There are no assumptions about the instrument, pickup, or mic being made. This simplified approach seems to work well and does not have hidden optimizations which might interfere with your guitar, pickup, or mic selection.

The script itself should make sense to anyone with two semesters of college calculus and access to Wikipedia to get a basic understanding of a Fourier Transform and a Window Function.

You can think of the system we are analyzing as two parallel IRs. One takes the real guitar and gives you the pickup output, and the other takes the real guitar and creates the mic output. Since both systems are assumed to be linear and time invariant, there should be a third IR that can take you directly from the pickup to the mic. It is that third IR we are attempting to calculate.

First, I extract segments of the recorded pickup and mic. I tried 1, 2, 4, 8, and 10 segments of lengths 2^15, 2^16, 2^17, 2^18, 2^19. Too short a sample sounded not as good as longer, and after a certain point longer was not better. The math of Discrete Fourier Transforms has a quantization noise problem that favors longer segments.

I settled on 4 segments, 2^17 samples (~3 seconds) long. I skip 6 seconds into the source wav file and grab a segment. I check it for clipping and having a peak lower than 15 dB down from clipping. The segment is rejected for clipping or low SNR. I then skip ahead 3 seconds and grab the next segment and repeat the clip/SNR test. I do this up to 7 times to yield 4 segments of your sample.

Those of you who are familiar with how clipping distortion creates sharp edges and generates harmonics would probably not be surprised that taking a segment out of a longer sample does something similar at the beginning and end of the sample. A window function takes your segment and slowly raises the volume from zero and back to zero. I chose Blackman. The math again prefers a longer segment for less windowing harmonic generation.

Next all the segments get Fast (Discrete) Fourier Transformed (FFT). The mic FFT is divided by the pickup FFT. The four division results are averaged together and then an Inverse Discrete Fourier Transform (IFFT) generates the IR.

The big picture is sort of pickup (output of your guitar), times mic divided by pickup IR (the calculated IR running in your pedal), equals mic. I’m avoiding that convolution word.

Minimum phase is an option mentioned in the ToneDexter patent and I also calculated minimum phase versions. I confirmed with frequency plots that the code works correctly. I could not hear any difference and gave up on that approach. This IR approach does not gain up the bass response and I am thinking without the bass boost of other IRs the minimum phase version is not that important.

My one piece of unique intellectual property (as far as I know) was a “no near zero” criteria in the pickup FFT. Dividing by zero is a bad idea and the IR can’t create something from nothing. I search the pickup FFT for coefficients (frequency bands) where the magnitude is more than 65 dB down from the peak. Those coefficients get replaced with “1” in both the pickup and mic FFTs (the resulting IR has a 0 dB gain for those frequencies). This produces a better sounding result with a better-behaved frequency plot (no motivation to add Tone Match to this algorithm). High and low-cut filtering often needed by other IR generation techniques are not needed here. Post processing to notch resonant peaks in the lowest few 100 Hz for live performance feedback control is also not required with this algorithm.

To summarize, I am producing IRs from four 2^17 sample segments, no pickup FFT near zeros with a 65 dB down criteria, no minimum phase transformation, and truncated to 2048 samples, along with a selection of IR/bypass blended IRs.

jf45irv4.pdf (will display jf45irv4.m source code in some browsers)

jf45irv4.txt (download and rename to jf45irv4.m)

Python Version Saved as MS Word file

Python is not as easy to set up and run as Octave for a beginner. I debugged this code some time ago. I verified its functionality, but I am a Python novice at best and can’t offer any support on how to use it.