Digital Guitar Effects in MATLAB
Signal Processing Implementation & Spectrogram Analysis
Andac Y. Kaya
June 23, 2025
Digital Guitar Effects in MATLAB Andac Y. Kaya
1. Introduction
This project demonstrates a set of audio effects implemented entirely in MATLAB using
signal processing fundamentals. Rather than relying on external plugins or toolboxes,
the effects were created through direct manipulation of discrete-time signals, emulating
classic guitar effects such as delay, reverb, chorus, flanger, and distortion.
The input is a raw waveform of a clean electric guitar recording. Each effect is applied
digitally, and its result is visualized through time-frequency analysis using spectrograms.
This report provides a technical summary of each effect along with its audible and visual
characteristics. The input guitar signal used in this project is an isolated solo section
from an original song by my band, Buluşalım Rüyalarda- Siyah Orkide.
*This solo was performed, recorded, and processed by the author.*
Audio Samples: Audio files for each effect are available here: Google Drive
2. Methodology
Each effect was implemented in MATLAB using time-domain operations. The following
sections outline the core logic behind each effect, accompanied by observations of their
impact on the signal’s spectrogram.
3. Delay
Effect description: A delayed copy of the signal is added to the original, creating an
echo-like result. The delay time is adjustable in samples.
Core equation:
y[n] = x[n] + a0 · x[n − D]
1
Digital Guitar Effects in MATLAB Andac Y. Kaya
Figure 1: Spectrogram of the guitar signal with delay effect
Spectrogram Observation – Delay
Repeating diagonal traces appear at regular intervals, indicating temporal echoes.
Frequency content remains unchanged, but delayed energy bands are visible.
4. Reverb
Effect description: Multiple delayed and attenuated copies of the input are layered to
simulate spatial reflections, resulting in a more ambient and sustained sound.
Core equation:
y[n] = x[n] + a1 · (x[n − D] + a0 · x[n − 2D])
2
Digital Guitar Effects in MATLAB Andac Y. Kaya
Figure 2: Spectrogram of the guitar signal with reverb effect
Spectrogram Observation – Reverb
Frequency components become smeared over time — vertical edges in the original
become blurred. Sustained harmonics and a cloud of energy appear in the higher
frequencies.
5. Chorus & Octaver
Effect description: This effect mixes the original signal with pitch-shifted versions,
creating a layered, richer tone. Semitone shifts are applied using a time-scaling technique.
Core concept:
α = 2δ/12 , y[n] = x[n] + x[αn]
3
Digital Guitar Effects in MATLAB Andac Y. Kaya
Figure 3: Spectrogram of the guitar signal with chorus effect
Spectrogram Observation – Chorus
Additional frequency bands appear slightly above or below the original harmonics.
The result is a thicker, modulated frequency distribution.
6. Flanger
Effect description: A short delay is modulated with a low-frequency oscillator (LFO),
creating phase cancellations and comb-filtering effects.
Core equation:
y[n] = x[n] + x[n − D(t)] + g · y[n − D(t)]
Where:
D(t) = Dmax · (1 + d · sin(2πfLFO t))
4
Digital Guitar Effects in MATLAB Andac Y. Kaya
Figure 4: Spectrogram of the guitar signal with flanger effect
Spectrogram Observation – Flanger
Repeating notches and sweeping wave-like interference patterns occur in the fre-
quency domain, caused by LFO-modulated comb filtering.
7. Distortion
Effect description: Clipping the waveform introduces additional harmonics, resulting
in a more aggressive tone.
Core equation (simplified):
y[n] = G · x[n] with clipping
5
Digital Guitar Effects in MATLAB Andac Y. Kaya
Figure 5: Spectrogram of the guitar signal with distortion effect
Spectrogram Observation – Distortion
High-frequency harmonics become more pronounced. New frequency content ap-
pears above the original, resulting in a denser and brighter spectrogram.
8. Conclusion
All effects were implemented using sample-based processing in MATLAB. Spectrogram
analysis revealed unique and characteristic frequency patterns for each effect. These
visual tools not only confirm expected outcomes but also provide insights into how signal
processing transforms audio perceptually and spectrally.
Further developments could include real-time implementations or porting these algorithms
into VST plugins or embedded DSP platforms.
6
Digital Guitar Effects in MATLAB Andac Y. Kaya
Appendix: Equations and Abbreviations
Abbreviations and Mathematical Symbols
x[n] Input signal at time step n
y[n] Output signal at time step n
∆t Sampling period
G Filter gain or amplification factor
D Fixed delay (in samples)
D(t) Time-varying delay (modulated by LFO)
Dmax Maximum delay time
d Modulation depth (LFO amplitude factor)
fLFO Frequency of low-frequency oscillator (Hz)
a0 , a 1 Attenuation coefficients (feedback/echo gain)
g Feedback gain in flanger
δ Semitone shift amount in pitch shifting
α Time-scaling factor for pitch shifting: α = 2δ/12