Music Producer’s Guide To Basic Waveforms

As music producers, it's critical to understand the signals we work with, whether it's the audio itself, the control signals used to modulate other signals and parameters, or the overall signal flow within a session. Understanding the basic waveforms is an essential part of the job, a great place to start learning audio and a fantastic way to deepen our understanding of music.

What are basic waveforms in audio? Basic waveforms are simple single-cycle periodic waveforms (meaning their shapes repeat at set intervals) that create simple shapes (sine, triangle, square, sawtooth and rectangle) and, therefore, simple harmonic profiles. They're essential to both audio and modulation in music production.

In this article, we'll dive deep into the basic waveforms, examining their characteristics, what they sound like, how they're used in music production, and how they relate to one another.

If you prefer the video format for learning, please check out my video on this topic below:


What Are Waveforms In Audio?

Waveforms in audio are graphical representations of the audio signals, which are effectively representations of sound stored as audio.

These waveforms show how the signal voltage (representing potential sound pressure) changes over time. They visually depict the characteristics of a sound wave, including its amplitude (volume), frequency (pitch), and phase (timing).

Each type of waveform, whether basic (sine, square, sawtooth, triangle, etc.) or complex, has a distinct shape and sound quality, influencing the timbre or tone colour of the audio.

In music production and audio engineering, understanding and manipulating these waveforms is crucial for sound design and synthesis, as well as audio analysis and troubleshooting in editing, mixing and mastering.


What Are Basic Audio Waveforms?

The term basic audio waveform generally applies to the simple sine, triangle, square, sawtooth and pulse/rectangle waves, which we'll discuss in this article.

These waves are periodic, meaning their shapes repeat at set intervals (whatever frequency they happen to be at). It's also worth mentioning that each period (360° phase cycle) is repeated, which is different than having a signal that repeats after a series of cycles.

For example, if we look at the phase and periods/cycles of the following sine wave, we can see that it repeats every 360°:

Of course, envelopes and modulation can often be used to change such waveforms over time, but as a default, the basic waveforms themselves repeat perfectly.

Contrast that with complex waveforms, which are present in the real world and generally display similarities in their wave cycles but rarely, if ever, have perfect repeats. This is particularly the case in the transients (which have significant additional harmonic energy) and over the sustain of the notes (which decrease in amplitude over time).

Speaking of harmonic content, the basic audio waveforms will each have their own distinct, simple harmonic profiles. Additionally, if they're to be repeated perfectly, these harmonics will maintain their relative amplitudes compared to the fundamental.

Recap On Basic Waveforms

Basic audio waveforms have the following characteristics:

• Periodic, single-cycle wave shape.
• Distinct and simple harmonic profile.
• Consistent output (unless otherwise shaped with envelopes, modulation, automation or other effects)

With that, let's stay broad for a moment and consider how such waveforms are used as audio and as control/modulation signals.


Waveforms As Audio Vs. Waveforms As Control Signals/Modulators

In music production and sound design, waveforms are the backbone of audio synthesis and modulation, serving two distinct roles: audio signals and control signals.

As audio signals, we hear these waveforms and use them as audio in our sessions. Each basic waveform will have its own tone/timbre (due to its unique harmonic profile). We can use these waveforms (like all other audio) to produce sound and shape the waveforms as we please with processes and effects.

As control signals or modulators, we can use them to shape other sounds in a wide variety of ways, from LFO (low-frequency oscillators) to audio-rate modulators and more. A few common ways to utilize these waveforms as modulator/control signals include:

Delay-Based Modulation Effects

Delay-based modulation effects are achieved using a low-frequency oscillator (LFO) to modulate the delay time of one or more signal paths. These effects include vibrato, flanger and chorus, and the LFO is typically a basic waveform.

Phaser Modulation Effects

The phaser effect is achieved by modulating a series of all-pass filter cutoff frequencies in order to modulate the phase relationships between a dry and wet signal. A basic-waveform LFO is most commonly used for such modulation.

Tremolo & Ring Modulation Effects

In the case of the tremolo effect, an LFO modulates the amplitude of the audio signal. Once again, the modulating signal is most often a basic waveform.

The ring modulation effect is another amplitude modulation effect where two signals (an input/modulator signal and a carrier signal) are summed together to create two brand new frequencies: the sum and difference of the input and carrier signals.

Filter Sweeps & Wobbles

With repeating filter sweeps, an audio waveform, often basic, is used as an LFO to modulate the parameters of a filter or EQ to modulate the frequency content of a signal.

Frequency Modulation (FM) Synthesis

Frequency modulation synthesis is rather complex, but the basic premise is a modulator waveform that varies the frequency of the carrier, another waveform. This interaction creates complex harmonic content, generating a wide range of sounds from simple tones to intricate textures.

Understanding the dual nature of waveforms is crucial for any music producer or audio engineer looking to deepen their mastery of sound.

Alright, let's now move on to the different basic waveforms and how we can use them in music production!


The Sine Wave

A sine wave captured in SocaLabs Oscilloscope

When it comes to our “basic waveforms”, the sine wave (sinusoidal wave) can be described as the most basic.

Although it may not look as simple, visually speaking, it actually has the most basic mathematical equation:

y(t) = A \sin(2\pi ft + \phi)

We'll get into the maths of each basic waveform, but I wanted to start the discussion of the sine wave with this primer.

Here is an audio demonstration of a sine wave:

Sine Wave Characteristics

The physical characteristics of sine waves include:

  • A rounded waveform.
  • A symmetrical waveform, mirrored across time in the positive and negative amplitudes.
  • Producing a single frequency.

In terms of the subjectivity of their sound, the lack of harmonics makes sine waves sound warm and smooth.

The Mathematics Of Sine Waves

Mathematically, a sine wave is a single-frequency waveform because it is described by a simple, periodic function without any additional frequency components. The general equation for a sine wave is:

y(t) = A \sin(2\pi ft + \phi)

Where:

  • y(t) is the amplitude of the wave at any time t,
  • A is the peak amplitude of the wave,
  • f is the frequency of the wave (the number of cycles per second),
  • ϕ is the phase shift of the wave,
  • 2π represents a full cycle in radians.

This equation describes a wave that oscillates periodically with a single, constant frequency ff.

Sine Wave Use Cases In Music Production

Sine waves hold a unique place in music production due to their fundamental characteristics. Here are some key aspects:

  1. Sub-bass content: in electronic music and hip-hop, sine waves are often used to create deep sub-bass sounds. Their purity allows for powerful bass tones that can be felt physically, especially when played through systems capable of reproducing very low frequencies.
  2. Pads: their smooth and warm character makes them great as subtle pads.
  3. Modulation sources: sine waves are often used as modulation sources:
    • As LFOs, sine waves offer smooth control over many different parameters so long as they can be linked.
    • In modulation effects.
    • In ring modulation, as either a modulator or a carrier.
    • In frequency modulation (FM) synthesis, sine waves are used due to their smooth waveform. This can create complex and interesting timbres.
  4. Foundation for other sounds: since sine waves are the basic building blocks of more complex sounds, they are essential in synthesis techniques like additive synthesis.
  5. Test tones and calibration: sine waves are used as test tones in audio engineering. They are essential for calibrating equipment and room acoustics, as their single-frequency nature makes it easier to identify and adjust for room resonances and other audio system behaviours.

A Note On Additive Synthesis

Sine waves are the basis of additive synthesis, a sound synthesis technique that creates timbre by adding sine waves together. The fundamental principle is that any sound can be broken down into a series of sine waves at different frequencies, amplitudes, and phases.

More specifically, the theoretical foundation of additive synthesis is the Fourier theorem, which states that any periodic waveform can be represented as a sum of sine waves with different frequencies, amplitudes, and phases. This principle guides the process of decomposing complex sounds into their sine wave components and recombining sine waves to synthesize new sounds.

Complex sounds, like those of musical instruments, often consist of a fundamental frequency and a series of harmonics (overtones). By carefully selecting and combining these sine waves, a wide variety of timbres and sounds can be created.

In practice, additive synthesis is implemented using digital signal processing (DSP) techniques. Synthesizers and software that employ additive synthesis provide interfaces for manipulating the parameters of individual sine waves, allowing users to craft a wide range of sounds, from simple tones to intricate textures.


The Triangle Wave

A triangle wave captured in SocaLabs Oscilloscope

The triangle wave, like all the rest of the waveforms we'll be discussing, is non-sinusoidal. As you can see above, it is named after its triangular shape.

Here is an audio demonstration of a triangle wave:

Triangle Wave Characteristics

The physical characteristics of triangle waves include:

  • A triangle-looking waveform with two equal but opposite slopes.
  • A symmetrical waveform, mirrored across time in the positive and negative amplitudes.
  • A made up of odd-order harmonics, so harmonics 1 (also known as the fundamental), 3, 5 and so on.
  • The amplitudes of these harmonics decrease at a rate of 1 over the Harmonic Number Squared (1/n2), so for example, the fundamental would have a full amplitude (1/1), the third harmonic would be one-ninth of that full amplitude, the fifth harmonic would be one twenty-fifth of that full amplitude, and so on.

In terms of the subjectivity of their sound, triangle waves are relatively soft and mellow compared to their square, sawtooth and pulse counterparts. They're generally warm and more nuanced than single-frequency sine waves.

The Mathematics Of Triangle Waves

Mathematically, a triangle wave can be described using a combination of linear functions or, more commonly, through a Fourier series that approximates its shape by summing multiple sine waves of different frequencies and amplitudes.

The simplest mathematical representation of a triangle wave is a piecewise function. For a triangle wave with period T, amplitude A, and assuming it starts at the origin, the function over one period can be described as:

For 0 ≤ t < T2:

y(t) = \frac{4A}{T}t - A

For T2 ≤ t < T:

y(t) = -\frac{4A}{T}t + 3A

This function increases linearly from −A to A in the first half of its period and then decreases back to −A in the second half.

Alternatively, the Fourier series representation of a triangle wave (centred around zero and assuming it starts at a peak) is given by:

y(t) = \frac{8A}{\pi^2} \sum_{n=1,3,5,\ldots}^{\infty} \frac{(-1)^{\frac{n-1}{2}}}{n^2} \sin\left(\frac{2\pi n t}{T}\right)

This series sums over the odd harmonics (n = 1, 3, 5, …) of the fundamental frequency, with the amplitude of each harmonic inversely proportional to the square of its ordinal number. The (−1)(n—1)/2 term ensures alternating signs for the harmonics.

This Fourier series converges to the shape of a triangle wave, approximating it more closely as more terms are included.

Triangle Wave Use Cases In Music Production

Here are some key use cases of triangle waves in the context of music production:

  1. As lead instruments: the timbre of a triangle wave is often described as softer and more mellow compared to the bright and buzzy sound of a sawtooth wave or the hollow sound of a square wave. This makes it suitable for creating gentle, flute-like sounds, mellow lead tones, or as starting points in subtractive synthesis.
  2. Sub-bass and bass sounds: in electronic music, triangle waves are sometimes used for sub-bass and bass sounds, especially when a smoother or less aggressive bass tone is desired. The harmonic content of triangle waves makes them present in the mix while still being smoother and less overpowering than sawtooth waves.
  3. Use in low-frequency oscillators (LFOs): in synthesis, triangle waves are commonly used in LFOs for modulation purposes. Their linear rise and fall make them ideal for creating smooth, continuous modulation effects like vibrato or tremolo.
  4. Frequency modulation (FM) synthesis: triangle waves are also used in FM synthesis. When used as modulators, they can impart a softer modulation compared to using a more complex waveform, leading to subtler changes in timbre.
  5. As pads: due to their relatively simple harmonic structure, triangle waves can have a more subtle presence in a mix compared to brighter, more harmonically rich waveforms. This can be advantageous when crafting layered or nuanced sonic textures.
  6. Chiptune: the unique yet basic harmonic content of triangle waves is reminiscent of chiptune music.

The Square Wave

A square wave captured in SocaLabs Oscilloscope

The square wave is named after its square appearance, where we can see a maximum amplitude followed immediately by a minimum amplitude, back and forth at a 50% duty cycle (the percentage of time spent in either extreme in a single cycle/period is 50%).

I'll note, before we get into it, that the changes between the two amplitude levels are not perfectly instantaneous, and in the real world, there will be some amount of oscillation about the intended amplitude as the oscillator shoots from one extreme to the other.

Here is an audio demonstration of a square wave:

Square Wave Characteristics

The physical characteristics of square waves include:

  • A waveform that spends equal time between a maximum and negative value and minimal time switching between the two. This is known as a 50/50 duty cycle.
    • Note that if this mix/max shift were instant, it would cause digital clicking during playback as it tried to instantaneously change the position of the playback transducer (speaker) from one extreme to the other.
  • A symmetrical waveform, mirrored across time in the positive and negative amplitudes.
  • Produces odd-order harmonics, so harmonics 1 (also known as the fundamental), 3, 5 and so on.
  • The amplitudes of these harmonics decrease at a rate of 1 over the Harmonic Number (1/n), so for example, the fundamental would have a full amplitude, the third harmonic would be one-third of that full amplitude, the fifth harmonic would be one-fifth of that full amplitude, and so on.

In terms of the subjectivity of their sound, square waves are relatively sharp and bright compared to their triangle counterparts, even though they produce the same harmonics (though at different amplitudes). The timbre of a square wave is often described as hollow or woody, and it's brighter and more piercing than a sine or triangle wave. This makes it stand out in a mix, especially in higher registers.

The Mathematics Of Square Waves

Mathematically, a square wave can be represented in a few ways, but one of the most common is through its Fourier series expansion.

The Fourier series for a square wave with amplitude A and period T is an infinite sum of sine functions with odd harmonics of the fundamental frequency. The series is given by:

y(t) = \frac{4A}{\pi} \sum_{n=1,3,5,\ldots}^{\infty} \frac{1}{n} \sin\left(\frac{2\pi n t}{T}\right)

In this equation:

  • y(t) is the value of the wave at time t.
  • A is the amplitude of the wave (the height from the centerline to the top or bottom of the wave).
  • n takes on the values of odd integers (1, 3, 5, …), representing the odd harmonics of the fundamental frequency.
  • 2πnt/T​ represents the phase of each harmonic component, with T being the period of the wave.

This series shows that a square wave is made up of a fundamental sine wave (the first term in the series, where n=1) plus an infinite series of odd harmonics. Each harmonic has an amplitude that is inversely proportional to its frequency.

The sum of these harmonics approximates the shape of a square wave, with the approximation improving as more terms are included in the series.

Square Wave Use Cases In Music Production

Here are some key use cases of square waves in the context of music production:

  1. As lead instruments: the timbre of a square wave allows it to cut through the mix as a lead instrument. Their tone and timbre are perhaps the most suitable for electronic music.
  2. Sub-bass and bass sounds: square waves are sometimes used for sub-bass and bass sounds due to their ability to produce low-end energy while also having presence in their midrange harmonics. As we'll touch on shortly, the distortion applied to a sub-bass sine wave (a common technique for improved presence) makes it more “square-like”.
  3. Modulation source: in modular and software synthesis, square waves are often used as modulation sources in LFOs or other modulation modules. Their on-off nature is useful for creating rhythmic or gating effects.
  4. Chiptune: the unique yet basic harmonic content of square waves is reminiscent of chiptune music.

A Note On Clipping And Square Waves

Here's something interesting: as we hard-clip our basic mirrored waveforms, we would approach the square wave.

Hard clipping is a form of distortion that occurs when an input audio signal exceeds the maximum level available, and the resulting output signal is effectively “clipped” or “flattened” at that level. In digital audio systems, this maximum level is often referred to as 0 dBFS (decibels relative to full scale).

Here's a simple diagram showing an unclipped audio signal to the left (blue), which falls beneath the “clipping lines” (dotted amplitude lines), along with a clipped audio signal to the right (red), which is clipped at the dotted amplitude lines.

A picture showing the effect of hard clipping audio.

If we look at the square wave on the oscilloscope picture at the beginning of this section, we notice how the tops and bottoms of square waves are effectively flattened out — the same thing happens when hard-clipping signals!

And so hard clipping distortion effectively makes our signals “more square” and, in doing so, contributes more odd-order harmonics to the signal being clipped. Therefore, understanding square waves will help us to better understand clipping distortion and symmetrical distortion in general (distortion that affects the positive and negative amplitudes of a waveform equally).


The Sawtooth Wave

A sawtooth wave captured in SocaLabs Oscilloscope

Like the two previously mentioned waveforms, the sawtooth wave gets its name from its appearance, with its repeating pattern resembling teeth on a saw.

As we'll discuss shortly, this is the first waveform to contain all the harmonics above its fundamental (both even and odd).

Here is an audio demonstration of a sawtooth wave:

Sawtooth Wave Characteristics

The physical characteristics of sawtooth waves include:

  • A waveform with a single slope, followed by minimal resetting time.
  • An asymmetrical waveform.
  • A made up of even AND odd-order harmonics, so harmonics 1 (also known as the fundamental), 2, 3, 4, 5 and so on.
  • The amplitudes of these harmonics, like the aforementioned square wave, decrease at a rate of 1 over the Harmonic Number, so for example, the fundamental would have a full amplitude (1/1), the second harmonic would be half of that full amplitude, the third harmonic would be one-third of that full amplitude, and so on.

In terms of the subjectivity of their sound, sawtooth waves are relatively “fat” and bright, especially compared to their triangle and sine counterparts. The timbre of a sawtooth wave is often described as aggressive or “buzzy”, and it's brighter and more piercing than a sine or triangle wave.

The Mathematics Of Sawtooth Waves

Mathematically, let's consider the Fourier series expansion of a sawtooth wave.

The Fourier series for a sawtooth wave with amplitude A and period T is an infinite sum of sine functions that include both odd and even harmonics of the fundamental frequency. The series is given by:

y(t) = \frac{2A}{\pi} \sum_{n=1}^{\infty} (-1)^{n+1} \frac{1}{n} \sin\left(\frac{2\pi n t}{T}\right)

In this equation:

  • y(t) is the value of the wave at time t.
  • A is the amplitude of the wave (the height from the centerline to the top or bottom of the wave).
  • n takes on the values of all integers (1, 2, 3, …), representing both odd and even harmonics of the fundamental frequency.
  • 2πnt/T represents the phase of each harmonic component, with T being the period of the wave.
  • The term (−1)n+1 ensures the alternating signs for the harmonics.

This series shows that a sawtooth wave is composed of a fundamental sine wave plus an infinite series of harmonics. Each harmonic has an amplitude that is inversely proportional to its ordinal number, and the sum of these harmonics approximates the shape of a sawtooth wave.

As always, the approximation becomes more accurate as more terms are included in the series.

Sawtooth Wave Use Cases In Music Production

Here are some key use cases of sawtooth waves in the context of music production:

  • Lead sounds: the harmonic richness of sawtooth waves makes them great for lead lines, especially when processed and filtered.
  • Bass sounds: like the aforementioned square wave, in addition to the low end, a sawtooth provides lots of presence in the midrange so they can be heard on smaller speakers.
  • Supersaws: the supersaw sound is created by layering several sawtooth waves, each slightly detuned from the others. This detuning creates a thick, chorused, and lush sound, which is much fuller than a single sawtooth wave.
  • Modulation and movement: sawtooth waves are often used with modulation sources like LFOs and envelopes to create movement and evolution in the sound, which can add interest and complexity to a track.

Due to their harmonic richness, sawtooth waves provide great starting points for subtractive synthesis. This style of synthesis can work its magic with filtering and other effects to shape the full-bodied sound of the sawtooth wave(s).

Sawtooth Waves Created From Sine Waves (Additive Synthesis)

Earlier in this article, I discussed how every sound is made of different harmonics at varying frequencies, amplitude and phases. Therefore, any sound can be created by summing a variety of sine waves together (single-frequency waves) at the correct varying frequencies, amplitude and phases.

Let's take this additive synthesis approach to create a sawtooth wave made up of [virtually] infinite harmonics odd and even).

We know that the amplitude of any given harmonic is 1/n. We can translate these fractional amplitudes into decibels via the following equation:

\text{dB} = 20 \times \log_{10}\left(\frac{V_1}{V_0}\right)

In this equation:

  • V0 is the amplitude of the fundamental.
  • V1 is the amplitude of the harmonic in question.

So, for example, we can take a 1,000 Hz sawtooth wave with a fundamental frequency (first harmonic) at 1,000 and every harmonic above that, with each harmonic (n) having 1/n the amplitude of the fundamental.

Now, we can produce a sine wave at 1,000 Hz. Let's set it at 0 dBFS as a nice clean reference amplitude (we can more easily adjust the level of the single sawtooth wave to level match our sine wave experiment.

Now, we will produce all the harmonics of the sawtooth wave as individual sine waves at 2,000, 3,000, 4,000 and so on. Using the equation above, we will adjust their amplitudes in dBFS against the original fundamental.

Here's what we find:

  1. Fundamental frequency (1,000 Hz) = 0 dBFS:
    • V1=1/1
    • dB=20×log⁡10(1)=0 dBFS
  2. Harmonic 2 (2,000 Hz) = −6.02 dBFS:
    • V1=1/2
    • dB=20×log⁡10(2)≈−6.02 dBFS
  3. Harmonic 3 (3,000 Hz) = −9.54 dBFS:
    • V1=1/3
    • dB=20×log⁡10(3)≈−9.54 dBFS
  4. Harmonic 4 (4,000 Hz) = −12.04 dBFS:
    • V1=1/4
    • dB=20×log⁡10(4)≈−12.04 dBFS
  5. Harmonic 5 (5,000 Hz) = −13.98 dBFS:
    • V1=1/5
    • dB=20×log⁡10(5)≈−13.98 dBFS
  6. Harmonic 6 (6,000 Hz) = −15.56 dBFS:
    • V1=1/6
    • dB=20×log⁡10(6)≈−15.56 dBFS
  7. Harmonic 7 (7,000 Hz) = −16.90 dBFS:
    • V1=1/7
    • dB=20×log⁡10(7)≈−16.90 dBFS
  8. Harmonic 8 (8,000 Hz) = −18.06 dBFS:
    • V1=1/8
    • dB=20×log⁡10(8)≈−18.06 dBFS
  9. Harmonic 9 (9,000 Hz) = −19.08 dBFS:
    • V1=1/9
    • dB=20×log⁡10(9)≈−19.08 dBFS
  10. Harmonic 10 (10 kHz) = −20.00 dBFS:
    • V1=1/10
    • dB=20×log⁡10(10)≈−20.00 dBFS
  11. Harmonic 11 (11 kHz) = −20.83 dBFS:
    • V1=1/11
    • dB=20×log⁡10(11)≈−20.83 dBFS
  12. Harmonic 12 (12 kHz) = −21.58 dBFS:
    • V1=1/12
    • dB=20×log⁡10(12)≈−21.58 dBFS
  13. Harmonic 13 (13 kHz) = −22.28 dBFS:
    • V1=1/13
    • dB=20×log⁡10(13)≈−22.28 dBFS
  14. Harmonic 14 (14 kHz) = −22.92 dBFS:
    • V1=1/14
    • dB=20×log⁡10(14)≈−22.92 dBFS
  15. Harmonic 15 (15 kHz) = −23.52 dBFS:
    • V1=1/15
    • dB=20×log⁡10(15)≈−23.52 dBFS
  16. Harmonic 16 (16 kHz) = −24.08 dBFS:
    • V1=1/16
    • dB=20×log⁡10(16)≈−24.08 dBFS
  17. Harmonic 17 (17 kHz) = −24.61 dBFS:
    • V1=1/17
    • dB=20×log⁡10(17)≈−24.61 dBFS
  18. Harmonic 18 (18 kHz) = −25.11 dBFS:
    • V1=1/18
    • dB=20×log⁡10(18)≈−25.11 dBFS
  19. Harmonic 19 (19 kHz) = −25.58 dBFS:
    • V1=1/19
    • dB=20×log⁡10(19)≈−25.58dBFS
  20. Harmonic 20 (20 kHz) = −26.02 dBFS:
    • V1=1/20
    • dB=20×log⁡10(20)≈−26.02 dBFS

Theoretically, this would continue. However, we can only hear up to 20,000 Hz (if we're lucky), and more audio systems, analog or digital, will roll of the frequency content eventually above 20 kHz anyway. Therefore, I think the twentieth harmonic, in this case, is a good place to stop counting.

If you're up for an experiment, plug these sine waves into your DAW and compare them to a sawtooth wave with the same stats!


The Pulse Waves

A pulse/rectangle wave with a duty cycle of 25% (75%) captured in SocaLabs Oscilloscope

Pulse waves (also known as rectangle waves) are essentially square waves with anything but a 50% duty cycle. This change in the amount of time between the two amplitude extremes leads to variations in the harmonic profile of the audio.

The most common pulse waves are 1/4 (25%) duty cycle waves and 1/8 (12.5%) duty cycle waves, though, again, anything other than a 50% duty cycle is considered a pulse wave.

Here is an audio demonstration of a 25% pulse wave:

A Note On Duty Cycles

The duty cycle is the proportion of one cycle in which a signal or system is active or ‘high'. In the context of a pulse wave, it refers to the fraction of the time period during which the wave is at its maximum amplitude.

Mathematically, the duty cycle DD is expressed as a percentage and is calculated using the formula:

D = \left( \frac{T_{\text{high}}}{T} \right) \times 100\%

Where:

  • Thigh​ is the duration of time the pulse is at its high (maximum) amplitude within one cycle.
  • T is the total period of the waveform.

Pulse waves can be altered through pulse width modulation, where the wave's duty cycle is varied. This changes the timbre of the wave, allowing for a wider range of sounds, from thin and nasally to full and rich, depending on the duty cycle.

Pulse Wave Characteristics

Here are the general characteristics of pulse waves:

  • Like a square wave but with something other than a 50% duty cycle.
  • Varying harmonic profiles with the following generalities:
    • If a rectangle wave has a duty cycle of 25%, or 1/4, every fourth harmonic is missing.
    • If the duty cycle is 20%, or 1/5, every fifth harmonic would be missing.
    • Given a duty cycle of 12.5%, or 1/8, then every eighth harmonic would be missing.
  • The amplitudes of these harmonics, like the aforementioned square wave, decrease at a rate of 1 over the Harmonic Number (1/n), so for example, the fundamental would have a full amplitude (1/1), the second harmonic would be half of that full amplitude, the third harmonic would be one-third of that full amplitude, and so on.

The timbre of a pulse wave changes significantly with the variation in pulse width. A narrow pulse width produces a thinner, more nasal sound, while a wider pulse width approaches the fuller sound of a square wave.

A note on duty cycles that don't correspond to non-unit fractions (those waves that don't have a 1 on the top and a whole number on the bottom): these pulse/rectangle waves are hard to define without specific Fourier analyses.

The Mathematics Of Pulse Waves

Mathematically, a pulse wave can be represented by a periodic function that switches between two values, typically -A and +A, with A being the amplitude of the wave. The function can be defined over one period T as follows:

y(t) = 
\begin{cases} 
A & \text{if } 0 \leq t < D \cdot T \\
-A & \text{if } D \cdot T \leq t < T 
\end{cases}

Where:

  • y(t) is the value of the wave at time t.
  • D is the duty cycle (a value between 0 and 1).
  • T is the period of the wave.

The Fourier series for a pulse wave is more complex than for a square wave due to the variable duty cycle. It includes a fundamental frequency and its harmonics, with the amplitudes of the harmonics depending on the duty cycle. The series generally involves sine functions and can be expressed as:

y(t) = \frac{4A}{\pi} \sum_{n=1,3,5,\ldots}^{\infty} \frac{\sin(2\pi nfD)}{n} \sin(2\pi nft)

In this series:

  • f is the fundamental frequency of the wave,
  • n takes on the values of odd integers (1, 3, 5, …),
  • The term sin⁡(2πnfD) adjusts the amplitude of each harmonic based on the duty cycle D.

This Fourier series shows that the harmonic content of a pulse wave varies with its duty cycle, allowing for a wide range of tonal possibilities in synthesis.

Pulse Wave Use Cases In Music Production

Here are some key use cases of pulse waves in the context of music production:

  • Use in synthesis: pulse waves are commonly used in subtractive synthesis for creating a variety of sounds, from lead and bass sounds to unique pad and texture sounds. They are particularly favoured for their ability to cut through a mix and for their dynamic tonal qualities.
  • LFO and envelope modulation: applying LFOs or envelopes to modulate the pulse width can create evolving textures and rhythmic patterns due to the on/off characteristic, adding complexity to the sound.
  • Retro and nostalgic feel: due to their association with early synthesizers and video game consoles, pulse waves often bring a retro or nostalgic quality to the music, which can be leveraged creatively in various musical contexts.

And that sums up our discussion on the main basic waveforms in music production. Let's now move on to the Fourier analysis for an even deeper understanding.


The Fourier Analysis

To fully explain the Fourier analysis (Fourier series and Fourier transform) is beyond the scope of this article, but it's worth mentioning here.

Fourier analysis is a mathematical method used for analyzing complex waves or signals by breaking them down into simpler components, typically sine and cosine waves (a cosine curve is graphed similarly to a sine curve, but is out of phase with it).

It's named after the French mathematician Jean-Baptiste Joseph Fourier, who introduced the concept in the early 19th century. This analysis is fundamental in various fields, including music production and audio engineering.

Here's a basic overview of Fourier analysis:

  1. Breaking down complex signals: every complex wave (like an audio wave) can be represented as a combination of simple sine and cosine waves at different frequencies, amplitudes, and phases. Fourier analysis decomposes these complex waves into these basic components.
  2. Fourier Series and Fourier Transform:
    • Fourier Series: this is used for periodic (repeating) signals. It expresses a function as a sum of sine and cosine terms, each representing a different frequency component of the original signal.
    • Fourier Transform: this is used for non-periodic signals. It converts a time-domain signal into a frequency-domain representation. It's particularly useful in analyzing the frequency content of signals in audio engineering.
  3. Applications in music and audio engineering:
    • Spectral analysis: understanding the frequency content of sounds, which is crucial for tasks like equalization, filtering, and sound synthesis.
    • Time-frequency analysis: analyzing how the frequency content of a signal changes over time. Important for dynamic processing and understanding the evolution of musical notes or sounds.
    • Compression and noise reduction: Fourier analysis helps in encoding audio in a more efficient way and in reducing unwanted noise from recordings.
  4. Digital signal processing (DSP): in the digital realm, the Discrete Fourier Transform (DFT) and its computational algorithm, the Fast Fourier Transform (FFT), are used. These are essential in digital audio workstations and various audio effect processing.

Understanding Fourier analysis can significantly enhance your ability to understand the basic waveforms discussed in this article. It also provides a fundamental framework for many of the processes and effects used in these fields.


Call To Action!

Study these basic waveforms and use them as both audio and control signals in your music production endeavours. Experiment with them, using filters, clipping and effects to get different sounds and consider how they can be used in a variety of situations as modulators.

Leave A Comment

Have any thoughts, questions or concerns? I invite you to add them to the comment section at the bottom of the page! I'd love to hear your insights and inquiries and will do my best to add to the conversation. Thanks!


Related Questions

What are audio modulation effects? Audio modulation effects manipulate the input audio over time via the control of a carrier signal. The input audio is referred to as the modulator signal, which technically controls the carrier signal, which is generally produced via an oscillator generator or signal detector.

What are the best tools for visualizing waveforms? Oscilloscopes are ideal for visualizing waveforms as they accurately display signal voltages (real or virtual) over time, revealing waveform shapes, amplitudes, frequencies, and any distortions or anomalies in real time.

Related Article

To learn more about modulation effects, check out my article Complete Guide To Audio Modulation Effects (With Examples).

Similar Posts