weird things about square waves.

preview_player
Показать описание
00:00 square wave that isn't a square wave
00:23 how I made it + phase rotation
00:35 why it's a problem
01:09 correcting asymmetrical vocal waveforms
01:37 subtractive EQ increasing peak level
02:06 Groove3
02:21 squares don't look like squares
02:35 antialiasing
03:25 Gibbs phenomenon
03:56 squares that look perfect

Loopmasters sample packs I made:

Multiplier on the web:

And his label, Relentik Records:

Multiplier's old podcast BLOUNCE:
Рекомендации по теме
Комментарии
Автор

Physics graduate here. Those ripples on the corners of the square wave are an artifact which results from the fact that since the square wave is a periodic function you can write it as an infinite sum of sines (or cosines depending on the phase) with appropriate coefficients which is called a Fourier Series, BUT since it also has a discontinuity any FINITE sum of the terms of said series is bound to produce a little jump at the two extremities of the discontinuities. Since PC's are real machines which can't produce and overlay an infinite amount of sines, the results is those ripples, which as Multiplier correctly said, are called "Gibbs Phenomenon". That's the math behind it :)

fyex
Автор

If you think about it, playing a perfect square wave out of a speaker isn't physically possible, the cone simply can't jump between a position of 0 & 1. it has to gradually, physically go forward to 1 and back to zero (the lower the frequency, the more the movement is visible) hence, the trajectory has to be curved.

Noizbleed
Автор

I'm taking a class right now on communication theory, it goes into all the crazy math of stuff like this and it baffles my mind that in these classes no one has an intuitive grasp of stuff like this. They look at me like I'm nuts when I open FL and try to show them why the equations actually matter. It's so layered in the muck of math and how its taught in a fire hose way that the "art" of it gets lost. I am always so happy to the results made easy to understand.

ComposingGloves
Автор

The math required to reconstruct a wave from a set of discrete samples is called the "sinc interpolation" formula and it's the single concept that made everything click for me when it comes to digital audio. Incidentally, it's also the formula that made me snap out of my audiophool phase that once persuaded me to chase recordings with impractically high sampling rates.

Goodmanperson
Автор

What's interesting is if you hook up a real oscilloscope to a square wave being produced by an analog oscillator circuit and zoom in to the leading or trailing edge corners, you see the same "wibbles and wobbles". In the electronics world it's called (component) ringing. It's frequency is completely independent of the signal frequency, and, believe it or not, is caused by the inertia of the electrons moving through the traces of the PC board, the leads of the components in the circuit and even inside the semiconductors (transistors) themselves. Two identical circuits will ring with different frequencies and different fall-off intervals; ringing is extremely difficult to filter out because it's at such low db levels to begin with; and a single circuit will ring with the exact same parameters for ever, as long as no changes are made to the physical components in the circuit. This is a key fact in modern electronic warfare, but you will have to use your imagination to figure out how.

DPDK
Автор

The fundamental (or essential) waves from which all other waves are constructed here are sinusoids (sine waves). One needs to go all the way to infinity to make true square (or triangular, or many many other) waves out of the sine waves. One does not have that luxury.

For details, see Fourier series.

Kurtlane
Автор

I remember discovering this as well and being fascinated. That spiky phase rotated square has the same phase relationships as a triangle wave, but it still has the harmonic levels of a square wave. You can also phase rotate a triangle wave into a rounded square wave.

eyeball
Автор

The math is actually quite simple: a perfect square needs an infinite amount of frequencies! The magnitude of each higher frequency tampers off compared to the previous one, but in order to have a perfect square shape in your waveform, all you need (in theory) is that your series of harmonics goes on for infinity.

This also explains the “wobbly bits”, as they are called in this video, as well as the aliasing, quite easily: because you can only represent a finite amount of frequencies (due to your sampling rate, see Nyquist theorem) you simply cannot put all the necessary frequencies into your waveform that are needed to make it a perfectly square wave. So you have two options: (1) generate a perfect square wave anyway. This, though, produces all the frequencies above the Nyquist limit. What happens to these frequencies above that limit is that they are aliased back into the representable frequency range (e.g. 0-24k Hz using 48kHz sampling rate). You can imagine this like a mirror but for frequencies. Also, this does not result in a perfect square wave anyway, since the originally infinite series of harmonics is now distorted downwards. The other option is (2), where you low pass filter you generated square wave around the Nyquist limit. This prevents aliasing, since all the frequencies that would be aliased are now filtered out. However, because you don’t have all frequencies of the necessary infinite series present, you square wave is not “complete” and, thus, exhibits “wobbly bits”. Imagine that each harmonic in the series reduces the “wobble” just a tad more.

So it’s all about missing frequencies, that you very likely don’t even hear anyway, since we’re taking about frequencies above the general hearing limit. You can imagine that, should a perfect square wave be emitted for you to hear, what arrives in your brain is a wave akin to the wobbly one in the video anyway - because you’re missing the upper frequencies of the infinite series since your hearing will always have some type of limit anyway.

Fourier is a hell of drug!

notimput
Автор

This is one of the better videos explaining aliasing. Last time I looked it up I got hit with a bunch of jargon and math terminology that kind of killed it for me, so as far as I'm concerned, you nailed it my man! Great video!

sorenwhittington
Автор

This guy just multiplied my knowledge of square waves

JackMajor
Автор

This was fascinating. I think it's fundamental to know how audio is processed digitally, great execution on the video!

BenCaesar
Автор

Man, what a trip. Thank you for making this.

OscarUnderdog
Автор

hey, new video this'll improve my day!

dijjidog
Автор

Great to have you back on the scene, man 🙌

EDMTips
Автор

When i make music, i pay very close attention to my waveforms. Especially the square ones. Also i think this video is interesting cause even small changes in the sound matters very much. Congrats on your 100k subs.

Jocoiscool
Автор

this guy is more like a genius in music sciences

skyscape
Автор

I'm glad to know more about this! Also I found it interesting that all the "wrong" square waves sounded better to me

TwoScoopsOfTubert
Автор

Nicely put! I like how you were able to put a complicated topic like this into a concise 4 and a half minutes!

Convolva
Автор

This was such a good video, I'm defintiely doing more research into this

triipzmusic
Автор

Even though I doubt I will ever have much practical use for this information, I was pleasantly surprised to learn this. Your explanations are wonderfully explained to a point in which someone with minimal understanding of sound design (Me lol) was able to comprehend everything being said.

skypilgrim