The Other Square Wave

Sdílet
Vložit
  • čas přidán 25. 08. 2024

Komentáře • 703

  • @Googahgee
    @Googahgee Před rokem +2051

    It doesn’t matter for how it sounds, but it DOES matter if you put the signal into a distortion stage. It will distort completely differently, because the peak levels of the phase shifted wave are a LOT higher compared to regular square wave as mentioned near the end of the video. Adding an allpass filter for phase shift is a really good technique for getting some varied sounds out of distortion or saturation later in the chain, try it out!

    • @veeiscool3270
      @veeiscool3270 Před rokem

      HOMESTUCK

    • @TUTOSANDROIDtutorialesymas
      @TUTOSANDROIDtutorialesymas Před rokem +11

      I’ll keep this in mind, sick trick ty

    • @Eugensson
      @Eugensson Před rokem +29

      Allpass filters (and delay lines) are the biggest thing in digital processing. You can do so many things with them!

    • @nj1255
      @nj1255 Před rokem +16

      @@Eugensson Definitely. You can create so many effects with only a couple of allpass filters. It's still one of the last things people learn how to use, when it actually should be one of the first.

    • @jadeblades
      @jadeblades Před rokem +1

      does fl have anything that can do allpass filtering?

  • @McNibbler
    @McNibbler Před rokem +952

    Amazing, I’ve been an electrical engineer for years and it never had even occurred to me that phase changes in the harmonics wouldn’t be perceivable in our ears.

    • @Mark-kt5mh
      @Mark-kt5mh Před rokem +36

      I'm in the same boat as a computer engineer. Just never occurred to me

    • @__dm__
      @__dm__ Před rokem +58

      I was curious about this back in undergrad so I experimented with phase distortion with synthesizers and was shocked.
      I'm a little disappointed that he didn't explain why--the cochlea acts more in the frequency domain. I'm not 100% sure this is true, but based on my understanding: there are cells all along the cochlea and due to the structure of the cochlea (hint: it's a tapered resonant waveguide type thing), the location of the cell kinda determines which frequency it is sensitive at. The cells activate when it vibrates, which makes it insensitive to relative phase but sensitive to frequency/pitch.

    • @karnage5888
      @karnage5888 Před rokem

      I'm sorry, don't you mean audio engineer?

    • @dylangergutierrez
      @dylangergutierrez Před rokem +30

      I'm an EE too and had to take a class in college some years back involving audio processing (essentially turning a time-domain audio signal into a DFT, doing operations on it, and turning it back again). I can tell you that, while getting rid of phase info doesn't make a huge difference for relatively simple waveforms like square/triangle waves that are steady state for hundreds of milliseconds at a time, it absolutely matters once you get into things like a human voice. One easy "robot" voice effect is to just lose all the phase info from your DFT before converting it back to the time domain

    • @McNibbler
      @McNibbler Před rokem +25

      @@karnage5888 no, electrical engineer. At the end of the day, audio is just an electrical signal anyways, though, so it still applies. I've done countless hours of work on different audio related projects over the years

  • @tyjuarez
    @tyjuarez Před rokem +433

    that "sideways" triangle wave could mean PHAT basslines without being overcompressed in mastering. psychoacoustics are fascinating.

    • @donit.
      @donit. Před rokem +19

      I mean it wouldnt really be "fatter" it would just be louder

    • @Savage-en1ms
      @Savage-en1ms Před rokem +51

      @@donit. Exactly the point, you can pack a giant punch into your drop with the right wavetable selection for your bassline synth.

    • @donit.
      @donit. Před rokem +1

      @@Savage-en1ms I mean you could do that anyway by just turning the other elements down lol

    • @Savage-en1ms
      @Savage-en1ms Před rokem +26

      @@donit. That's a useful technique in nowadays world of volume normalisation and the loudness penalty imposed by streaming services, however you can still achieve a massive, "full" sound that competes with other tracks nicely. If the waveform of your bass sound has lower amplitude peaks while still delivering a massive chonky fatness, you can make your track really stand out.

    • @donit.
      @donit. Před rokem +2

      @@Savage-en1ms I dont really understand what the difference would be tbh. the bass will sound the same in both cases. maybe the resulting song will be a tiny bit louder , but as long as its over 14lufs that doesnt really matter I'd say. the only difference it could make is when you have something like compression or distortion somewhere in the chain, but in that case the non sideways triangle wave would get more distortion.

  • @TeslabladePlaysMC
    @TeslabladePlaysMC Před rokem +547

    2:33 The reason that square waves are not "horizontal" in those videos is because of a DC offset filter. It's effectively just a capacitor and resistor in real life, but what it is doing in software is just removing DC offset. that's why different duty cycles of waveforms shift up and down, as well. DC offset can strain speakers and amplifiers that have no DC offset filters, as well as cause then inevitable popping you hear when you turn a system on/off. We try our best to remove DC offset, since it's really not a good thing, so we have them on basically every audio device nowadays.

    • @ltva8781
      @ltva8781 Před rokem +34

      So it's just highpass filter with very low cutoff, around 10 hz

    • @TeslabladePlaysMC
      @TeslabladePlaysMC Před rokem +37

      @@ltva8781 yeah, exactly. Sometimes the cutoff frequency is even lower so low bass around 20Hz can pass through better, but generally it's between 1 and 10Hz.

    • @crackwitz
      @crackwitz Před rokem +10

      Perhaps both explanations dovetail. Highpass can shift the phase of the signal, which is the rotation he showed.

    • @TeslabladePlaysMC
      @TeslabladePlaysMC Před rokem +11

      @@crackwitz High pass filters don't phase shift the signals going past them when they're literally orders of magnitude higher than the cutoff frequency. Yes, it's 45 degrees at the high pass filter's cut-off frequency, but that is usually between 1 and 10Hz, where it doesn't matter anyways.

    • @rfmerrill
      @rfmerrill Před rokem +4

      ​@@TeslabladePlaysMC So you can test this in LTSpice. I created a 100 Hz square wave swinging from -0.5V to +0.5V and ran it through a 10u series cap and 2.2k shunt resistor (corner frequency 7.23 Hz). The 100Hz fundamental is only attenuated by 0.022 dB so its amplitude should be 0.99x what it normally is, but there is a slope that drops 100mV on top of the filtered wave (going from above it to below, roughly equal area in the difference). The 3.960 degree phase shift at that fundamental freq is much more likely to explain that.
      When a square wave starts to be more affected by amplitude response, you see a curved drop on the top of the square wave, not a roughly linear one. The sawtooth-like slope is a result of a high pass that is phase shifting noticeably but not attenuating noticeably.

  • @Null42x86
    @Null42x86 Před 2 lety +2373

    You realise that you are listening too much to chiptune music when you can tell the difference between the actual square and the sine way that sounds like the square

    • @marmite-land
      @marmite-land Před rokem +10

      you do realise your comment is dumb right ? the harmonic content is the same, there's no way you or anyone or anything could differentiate the square square wave and the jumbled up square wave because there IS no difference.

    • @ghastlyGrenadine
      @ghastlyGrenadine Před rokem +341

      You realize that you *create* too much chiptune when you realize *why* you can tell the difference

    • @lolellordfiera3771
      @lolellordfiera3771 Před rokem +41

      @@ghastlyGrenadine true, I have easily 20 projects on fl studio with chiptune

    • @Alex-pi8sh
      @Alex-pi8sh Před rokem +200

      When u purposely lie on the interent 😊

    • @cq.cumber_offishial
      @cq.cumber_offishial Před rokem +101

      there is no man alive who can hear the difference

  • @blackskeleton7817
    @blackskeleton7817 Před rokem +462

    there is something really creative you can do with this concept if you know sound design; while at normal pitch you cannot hear the difference between the waves, going down a lot of octaves *does* let you hear the phase rotation; ive been using this technique to create interesting growls and reeses (im a neuro/dubstep producer), because the usual clicky texture of the square/saw doesnt come through as much anymore

    • @gaberica
      @gaberica Před rokem +11

      i've never thought of this. i'm gonna try it out

    • @VintageTechFan
      @VintageTechFan Před rokem +34

      I think this happens when the frequency comes into the range of the temporal resolution your hearing, so that you don't hear an "average" spectrum of a periodic signal anymore, but instead the spectrum variing over time?

    • @blackskeleton7817
      @blackskeleton7817 Před rokem +19

      @@VintageTechFan yeah, and when you have a normal saw/square, the only thing you would hear would be clicks, since all of the frequencies overlap to make a click; rotating the phase just displaces that and lets out different waveshapes (and the deeper you go the more movement that waveshape has before it repeats) :3

    • @Zadamanim
      @Zadamanim Před rokem +6

      What software / VST do you use to rotate the frequencies?

    • @blackskeleton7817
      @blackskeleton7817 Před rokem +14

      @@Zadamanim well, you can use something like an allpass filter to rotate them, tho you dont get very much control (serum has an allpass, theres also disperser from kilohearts)
      what i personally do is i use a wavetable synth and go inside of it and rotate the phases manually, it lets you do it custom for each harmonic

  • @corvusalbus9219
    @corvusalbus9219 Před rokem +24

    Когда чуть не поперхнулся чаем, услышав "прекрасное далёко" в начале

  • @TailRecursive
    @TailRecursive Před rokem +148

    This reminds me of doing a square wave in FM. My mind bugged out when I looked at a "square wave" oscilloscope that had a sine wave cut by a bunch of loud spikes.

    • @the2323guy
      @the2323guy Před rokem +5

      hey reimu!

    • @TailRecursive
      @TailRecursive Před rokem +5

      @@the2323guy ☯️

    • @the2323guy
      @the2323guy Před rokem +4

      @@TailRecursive fantasy seal

    • @christiantaylor1495
      @christiantaylor1495 Před rokem

      What happened to the FM square wave? What wave modulated it?

    • @TailRecursive
      @TailRecursive Před rokem

      @@christiantaylor1495 it's a sine wave and another sine wave with the double of the frequency and some saw-like harmonics. I'm not fully sure which one modulates which but you can replicate this on an OPL/AdLib by choosing Alg1, turning up feedback and setting the op1 multiplier to 2 and the op2 multiplier to 1.

  • @AminalCreacher
    @AminalCreacher Před rokem +208

    How remarkable! Based on my understanding of how audio perception works, it makes perfect sense for phase to not matter, but I never really thought about it.

    • @domenickeller2564
      @domenickeller2564 Před rokem +8

      You can hear a difference. But only for simple cases like 2 squares with different phases for the sub waves. the problem is that it is very insignificant and if you listen to more than just a side by side comparison you don't have a chance to distinguish it.

    • @ringsystemmusic
      @ringsystemmusic Před rokem +6

      Yep it’s all the same when the Fourier transform is considered.

  • @VerMishelb
    @VerMishelb Před rokem +11

    Can't express how surprised I was when I heard the melody of the first few seconds. Humming that thing all the time for the last 10 years or so.

  • @maxmikhailov5921
    @maxmikhailov5921 Před rokem +64

    If you'll lower the frequency of the ''randomized-phase square' to the "bass range" it actually starts to sound different (still "squarish" but more dirty). Another interesting expirience is to shift phases of only certain harmonics (for instance take a sawwave and shift only its evens by 90°). While the thing is barely noticeable at higher freqs, it's a whole new world of subtle (or not so subtle) variations for bass sounds. (Ah, I see a few people already mentioned this in comments above. Anyway.. :))

    • @BellXllebMusic
      @BellXllebMusic Před rokem

      How do you do experiments like that?

    • @maxmikhailov5921
      @maxmikhailov5921 Před rokem +4

      ​@@BellXllebMusic It depends on what tools you're more familiar with. Many "additive" (and derivative) VST synths allow one to set an arbitrary phase for each harmonic. Though for more technically accustomed person I guess it's much easier to use some math tool to generate a waveform of interest (for example I do this via Octave script) and then put it to whatever synthesizer for playback.

    • @jstwatchnread8420
      @jstwatchnread8420 Před rokem

      Sawtooth wave became more like rectified sinewave when you shift the harmonics phase, thats why it heard the same..

  • @Linguae_Music
    @Linguae_Music Před rokem +44

    The harmonic content of the wave is identical.
    But the transient behavior is slightly different because of the phase warping.
    Both waves are activating the exact same parts of the cochlea(harmonic content) But the kinetic interplay with the eardrum is different... just because of the phase-warp.
    So the square wave has just a slighty punchier/pluckier transient.
    But it would basically be totally unoticable unless you were playing low bass/sub register.
    But honestly it might be too fast for the brain to even understand lmao

    • @milasudril
      @milasudril Před rokem

      I think I could hear the difference

    • @jshstuff
      @jshstuff Před rokem +1

      I just did some very rough testing, and determined I could hear a significant difference up until around 750hz. Anything nearing 1k and above sounded very similar to me. The lower I go the easier it is to recognize the various overtones that have been unmasked by the smearing of the phases, which break the transient behavior of the square.

    • @jshstuff
      @jshstuff Před rokem +1

      I’d be very interested to see some proper studies of humans abilities to perceive phase differences at varying frequencies.

    • @shoug6555
      @shoug6555 Před rokem +1

      They also probably interact differently in polyphony. Maybe the "noisier" phase creates different distortion when mixed with other "pulse" shapes.

    • @beardedchimp
      @beardedchimp Před 6 měsíci

      @@jshstuff from my limited reading on the general scientific research, human hearing is far from understood. The mechanical aspect of the ear drum, bones, cochlea can be described but the neurological processing is incredibly complex and difficult to interpret. I've read a few papers on humans who suffered brain injury and animal testing where specific brain regions were impaired. With that you can see how parts of audio processing no longer exist while others remain fully intact. It gets even more complicated where the processing isn't isolated, two (or more) regions feed information between each other before giving an output response.
      Phase is used to locate where the sound is coming from as the left/right ear receive them at a slightly different time. It becomes more complicated when a sound is say directly overhead and therefore both ears hear the same phase. But sound doesn't reach us just through the ears, our skull transmits sound at a different velocity such that we can differentiate the vertical position. Most animals do not have the cognitive processing to achieve this and will tilt their head such that both ears receive a different phase.
      Bones act as a low pass filter so high frequency sounds reaching each ear are more difficult to positionally locate. Additionally our brains have a limit on frequency processing. Very high (audible) frequencies are impossible for us to process and interpret phase differences between ears. This is why there has been a push for emergency vehicles to switch from the traditional high frequency sirens to lower frequency white noise-esque sounds. You might have noticed it with large vehicle reversing, instead of shrill beeps you'll here "shshshshshshshsh", "shshshshshshs". Our brains can quickly and accurately use the phase difference to locate the vehicles position.
      About 15-20 years ago I worked on audio and video encoding. It was absolutely fascinated for how much it revealed about our brains. Lossy audio codecs remove huge amounts of information simply because our brains can't tell the difference. That is done before compression as there is no point encoding signals we are incapable of differentiating. Back in the 2000s there was a company who embedded a user id into the audio that was unnoticeable to humans and more importantly would be left intact after re-encoding such that someone sharing an mp3 (or otherwise) accessed through subscription or purchase could be identified.

  • @Alexander_Surchenko
    @Alexander_Surchenko Před rokem +136

    Неожиданное место, чтобы услышать "Прекрасное далеко"

    • @4stringed
      @4stringed Před rokem +15

      это точно было оно? Я тоже сижу в замешательстве, вроде знакомая с детства мелодия, но все равно не уверен, она ли это...

    • @SamplrOfMoonshine
      @SamplrOfMoonshine Před rokem +7

      @@4stringed а вроде последний раз в детстве и услышал

    • @phuturemusic
      @phuturemusic Před rokem

      Да уж

    • @NGabunchanumbers
      @NGabunchanumbers Před rokem +1

      Ага, совсем не ожидал

    • @terrame1525
      @terrame1525 Před rokem

      да))

  • @dme3y690
    @dme3y690 Před rokem +4

    Hearing "Прекрасное далёко" in some random youtube video about square waves felt like derealization

  • @notassignedgetlost
    @notassignedgetlost Před rokem +5

    As a Russian, these first notes kinda made me shed a tear of nostalgia

  • @meis18mofo77
    @meis18mofo77 Před rokem +25

    interesting funfact about this: A normal square is basically perfect distortion, you cant really distort it more, at least not through Clipping, BUT if you mess up the phases first, you can distort a squarewave further.

    • @plantain.1739
      @plantain.1739 Před rokem +3

      Most (If not, all) fuzz pedals basically just square off the signal of your guitar.

    • @monsieuryubi75
      @monsieuryubi75 Před rokem +2

      You make music?

    • @meis18mofo77
      @meis18mofo77 Před rokem +1

      @@monsieuryubi75 yee

    • @Currywurst4444
      @Currywurst4444 Před 8 měsíci

      What happens if you distort it as much as possible this way. Will it become white pink noise?

    • @meis18mofo77
      @meis18mofo77 Před 8 měsíci

      @@Currywurst4444 yea, if you distort something too much it'll end up as some kind of noise

  • @lunogyt
    @lunogyt Před rokem +5

    as a synth player and computer engineer this was one of the coolest things i've ever seen. The slanted square wave is super noticeable on the minilogue oscilloscope

  • @jessstuart7495
    @jessstuart7495 Před rokem +8

    Wow! I've never thought about rotating all the frequency components by a fixed amount to minimize the crest factor of a signal. I've never seen that in any signals and linear systems textbook.

  • @SeanNH94
    @SeanNH94 Před 2 lety +15

    So I guess to our ears, phase is only significant if it cancels or boosts other sounds.

    • @ts4gv
      @ts4gv Před rokem +7

      2 other cases where a difference is meaningful
      -if it’s at a low enough frequency
      -if there’s nonlinearities in the system after the square wave (imagine hard clipping the normal square vs. the phase randomized square)

  • @user-vq5hh9bk2m
    @user-vq5hh9bk2m Před 4 lety +7

    I thought this was a meme about airline stocks recently

  • @JohnPaulBuce
    @JohnPaulBuce Před rokem +1

    friendship with square wave ended, now weird looking square wave is my best friend

  • @NyanCoder
    @NyanCoder Před rokem +3

    0:51 This song reminds me a lot of the refrain of "Прекрасное далеко" from the Soviet movie called "Guest from the future"

    • @thCrnX.official
      @thCrnX.official Před rokem +1

      Да, мне это тоже это напомнило

  • @JubilantJerry
    @JubilantJerry Před rokem +9

    Maybe people can't hear phase when it comes to square waves (or probably any strongly periodic signal), but phase is certainly important for other sounds. I've computed short time fourier transforms for voice clips, and if I keep only the magnitude and discard the phase, then reconstruct the sound with Griffin-Lim, the resulting voice sounds really muffled.

    • @poofygoof
      @poofygoof Před rokem +6

      square waves in music are fairly long in duration, so shifting the phase around in a 16th note doesn't affect our perception of it. but for speech the fricatives and plosives as very short duration, and distributing their energy across an entire word is definitely going to muffle it.

  • @unicamenteisaac
    @unicamenteisaac Před 3 lety +11

    This video is awesome, you should make a walkthrough of how this square wave is made so we can make experiments.

  • @cycrothelargeplanet
    @cycrothelargeplanet Před 2 lety +10

    0:46 it still kinda has the look of a square wave, but with a different shape.

  • @Asterra2
    @Asterra2 Před rokem +5

    In some ways this was an eye opener. For example I'm so used to just taking a triangle wave for granted that it never occurred to me that it could be compressed losslessly like that.

  • @unslept_em
    @unslept_em Před rokem +2

    at lower frequencies they do tend to sound different, but it is fun to mess with the phases. also! you can do this in the vst Vital

  • @SubiCat
    @SubiCat Před rokem +17

    This is a really cool video! Although I mostly know about how sine waves can be stacked to approximate a square wave, I've never though at all about how they could have different phases, and the bit about optimising the triangle was also totally a surprise! I suppose that's why triangle waves sound so quiet then, relative to its gain level...

    • @morpheon_xyz
      @morpheon_xyz Před rokem +3

      If not mistaken, square waves are actually every 2nd harmonic from the fundamental of the sinewave. And the craziest thing I've learned is that every sound is actually stacked sinewaves with different phase rotation angles and stacks, so it's madness to think that you can make any sound from sinewaves if you stack the right harmonics with phase rotations and amplitudes 😳🤯

    • @kaitlyn__L
      @kaitlyn__L Před rokem

      @@morpheon_xyz I hope you’ve watched the Posy video about that ;)

    • @morpheon_xyz
      @morpheon_xyz Před rokem

      @@kaitlyn__L I do believe it's there where I became extremely convinced about that lol. I mean when designing sounds we don't think about it, but that helped me understand a lot more too lol

    • @christiantaylor1495
      @christiantaylor1495 Před rokem

      ​@@kaitlyn__L doesn't anybody read manuals? It's literally in the manuals for synths

    • @christiantaylor1495
      @christiantaylor1495 Před rokem

      ​​@@morpheon_xyz But it's important to not think about it much. And it's actually wrong, because when you use frequency shifting for sound design, you stop the harmonics from being multiples of the fundamental, and get harmonics that can't be drawn in additively.😊

  • @shirakawamaseru
    @shirakawamaseru Před rokem +1

    I hear an distinctive difference between those two. They sound almost the same listening on my smartphone speakers, but quite different listening with my headphones

  • @dkuznetsova2000
    @dkuznetsova2000 Před 2 lety +9

    This helped me a lot in my uni assignment in maximJs, thanks mate!!

  • @oscwavcommentaccount
    @oscwavcommentaccount Před 2 lety +8

    that square wave slant happens when you apply a high pass filter

    • @shindousan
      @shindousan Před rokem

      Which, if I remember well, produces a phase delay that is different for each frequency.

  • @jaysistar2711
    @jaysistar2711 Před rokem +4

    I liked the inclusion of the PCjr SN76489 version of Space Quest. I remember taking my Sega Master System emulator's SN76489 emulator out, and adding it to a DOS emulator, then making a few I/O reads respond differently for Tandy 1000/PCjr, and Space Quest started drawing a linear frame buffer instead of the EGA planer buffer, and it talked to the SN76489 instead of the internal speaker timer chip. Good memories. 😁

  • @PigletTube
    @PigletTube Před 2 lety +6

    The other sqaure wave can be used on the NES on the 1 bgit delta pcm because it doesn't have to jump up and down instantly.

    • @bosscrafty
      @bosscrafty Před rokem +3

      Oh shoot, I’ve contemplated the use of the DPCM channel as a fourth waveform in a variety of ways, but never though a square wave would be possible. Now this is something I really want to try out!

    • @ssg-eggunner
      @ssg-eggunner Před rokem +3

      7 bit pcm too!

    • @HeeminYT
      @HeeminYT Před rokem +1

      @@ssg-eggunner I found you hihihihihiee hee heeee

    • @HeeminYT
      @HeeminYT Před rokem +1

      @@bosscrafty You can use 7-bit pcm to sq

    • @bosscrafty
      @bosscrafty Před rokem

      Apparently 7 bit PCM is real expensive on the processor though. I didn’t even know it was a possibility until very recently because it seems games hardly used it.

  • @untodesu
    @untodesu Před rokem +4

    Heh, "meander", nice......
    For those interested: the name for square wave (exactly square wave, ie. impulse signal with 50% duty cycle) in some technical groups (including the entirety of Russian/Post-Soviet science) is often substituted with "meander", after a Greek pattern, not a river curve...

  • @tta6119
    @tta6119 Před rokem +5

    I knew that the phase could not be heard... this is a really good visualization.

  • @hamcha
    @hamcha Před 4 lety +24

    This is amazing! Thanks for the great video and explanation!

  • @thisrandomdude_
    @thisrandomdude_ Před rokem +1

    Fantastic little video!! Thanks for sharing!! :D

  • @user-wn1dd8ls2u
    @user-wn1dd8ls2u Před rokem +8

    0:00 Гостья из будущего? :)

  • @Elizabeth-vh6il
    @Elizabeth-vh6il Před rokem +15

    The interesting thing is that this isn't just shifting the phase of the individual harmonics by an equal amount, as that wouldn't change the shape of the wave, it would just change the starting phase. To get the shape change one needs to construct the math behind the diagram on the left (two separate Fourier series, one for x(t) and one for y(t), one with cos terms only and one with sin terms only), rotate that (using a matrix), and then rearrange the result back into a new Fourier series (using angle sum and difference identities I suspect?)... My capacity to do the algebra in my head has been exceeded... Tempted to start getting pencil and paper out...

    • @Polychromophilia
      @Polychromophilia Před rokem +8

      Yup, it’s shifting the phase of each harmonic by a different amount. The math is much easier if you use complex exponentials, since the harmonic-specific phase shifts can be trivially encoded in the complex Fourier coefficients.

    • @TheMrVogue
      @TheMrVogue Před rokem +1

      @@Polychromophilia The fucking what? Man I need to dig into this kind of maths, never learned fourier transforms and now I feel like I won't be able to produce music to the level I want to produce it at if I don't wrap my head around it

    • @tristanwh9466
      @tristanwh9466 Před rokem +1

      @@TheMrVogue You don't need to know any of that to make music, all you really need to know is that any sound is mathematically equivalent to a bunch of sine waves of different frequencies added together, which you should already intuitively understand if you've ever used an eq. If you want to know more you can read up on things like Fourier transforms, the harmonic series, and Nyquist theorem but they aren't at all necessary to know

    • @TheMrVogue
      @TheMrVogue Před rokem

      @@tristanwh9466 I appreciate the encouragement... I've been making music for a while, but this kind of low level knowledge I think is what separates a master from a novice... At least knowing what you're doing to the mix by using certain waveforms, etc... Maybe you're going for a particular sound, but you're really particular, I think this kind of stuff is what lets you add in that extra sauce to polish things to a mirrored finish.

  • @athf226
    @athf226 Před rokem +1

    the phase shifted square wave looks about what I would expect to see when looking at a clock in a high noise environment tbh

  • @nochan99
    @nochan99 Před rokem +1

    I had a sneaking suspicion about this for years but never bothered to find out. Thanks for scratching that age old itch!

  • @steves5476
    @steves5476 Před rokem

    Ach, listening to this made my ears start ringing. Thanks a lot...

  • @AgentOrange96
    @AgentOrange96 Před rokem

    I didn't expect to see (or rather hear) a ZZT reference today but I'M SO GLAD I DID

  • @googleisloading1216
    @googleisloading1216 Před rokem +2

    1:14 this is the exact tone my radio alarm plays, i thought i had an alarm from it just now

  • @corvidashgame5613
    @corvidashgame5613 Před rokem

    Thank you for answering a question I didn't even know I had, or at least couldn't figure out how to search. This is very informative, concise, and well-presented!

  • @too_online.3441
    @too_online.3441 Před 9 měsíci +1

    those slanted lines are due to high-pass filtering, a technique used by the NES' synthesizer to cut out low frequencies no one can hear

  • @euy5kyrthu5
    @euy5kyrthu5 Před rokem

    Those ZZT sounds stirred up some deep feelings.

  • @macdongr
    @macdongr Před rokem

    Nice space quest theme. A great nostalgie trip.

  • @EvanG529
    @EvanG529 Před rokem +36

    It's kind of amazing how they sound indistinguishable despite how different they look, but it's important to remember that what we hear are not the waveforms themselves, but the frequencies. When those overlayed frequencies (that normally combine to comprise a square wave) are unchanged, it makes sense that we hear the same thing. It's also yet another testament to how ubiquitous sine waves are to the literal fabric of reality.

    • @gblargg
      @gblargg Před rokem +4

      And if you think of WHY we hear the timbre of sound but no the phase, it's because phase doesn't carry much useful information. It tends to be jumbled up in the world due to reflections etc. It's like why we don't see the polarization of light, even though it is another dimension that each photon falls somewhere on (ignoring circular polarization).

    • @simonlinser8286
      @simonlinser8286 Před rokem

      yeah dude! im with you.
      we should just look at the waveform of a whole piece of music... not square...

    • @simonlinser8286
      @simonlinser8286 Před rokem

      actually we can hear phase pretty easily, when tuning a stringed instrument.
      but maybe i don't know what phase means.

    • @gblargg
      @gblargg Před rokem

      @@simonlinser8286 Relative phase of two nearly the same tones playing simultaneously? Yeah.

    • @blacklistnr1
      @blacklistnr1 Před rokem +2

      ​@@gblargg You can actually see the polarization of light, it's most obvious on a white LCD if tilt your head side to side, you should be able to see a blue-yellow cross shape which rotates along with you

  • @yippeeclawyay2591
    @yippeeclawyay2591 Před rokem

    Loved the ultima sample, I can tell you are a true man of culture

  • @sound.workshop
    @sound.workshop Před rokem

    This video is incredible, and the subscribe ask at the end was hilarious

  • @cycrothelargeplanet
    @cycrothelargeplanet Před 2 lety +6

    3:35 wierd sine wave

  • @alonk1060
    @alonk1060 Před rokem

    This is one of the only ways for me to enjoy music

  • @SendyTheEndless
    @SendyTheEndless Před rokem +6

    A true mathematically perfect square wave (or sawtooth) would rip a hole in space time, due to the infinte energy needed for the instant discontinuity. Luckily, humans can only hear up to between 15 and 22k (depending on age and other factors), so we don't need to blow up the universe to make chiptunes : )

    • @cyberyogicowindler2448
      @cyberyogicowindler2448 Před rokem

      Nope, its not a Dirac pulse. The sum of energy stays finite because the amplitude falls with pitch.

  • @luke_fabis
    @luke_fabis Před rokem +2

    Man, audio synthesis is just full of mindblowing tidbits that aren't obvious, but are easy enough to digest once it's explained. It weirdly feels impenetrably difficult and stupid-easy at the same time.

  • @TheSecretProvider
    @TheSecretProvider Před rokem +2

    Nooooo! You're telling me my triangle waves could have been optimized this whole time?

  • @atlatlin
    @atlatlin Před rokem +2

    Great video! I read a note recently in a small-signal audio design book that made this claim (that phase shift between harmonics in a signal is imperceptible to humans), so it's cool to see that demonstrated.

    • @nanocyde_artist
      @nanocyde_artist Před rokem +2

      What's really interesting is that the lower the pitch, the more perceptible the phase shift becomes. And imagine using one of these faux square waves at LFO speeds for modulation!

  • @mr88cet
    @mr88cet Před rokem +1

    One quality that’s easy to see in all of these … alternative square waves … is “half-wave symmetry”:
    If you think of these waves as mathematical functions, the value of that function at any point is _exactly the _*_negative_*_ of its value _*_half a wavelength_*_ away_ .
    If you look at waveforms from the lower register of a clarinet or bass clarinet, they also have this property (up to a point)!
    So, its value at zero degrees is exactly the negative of its value at 180 degrees. Its value at 10 degrees is the negative of that at 190 degrees, and so forth.
    That’s because they’re all constructed only from odd-numbered harmonics. If drawn at zero phase, all odd-numbered harmonics, at 180 degrees, cross the zero line going downward, whereas at the zero-degree point, they cross the zero line going upwards.

  • @letMeSayThatInIrish
    @letMeSayThatInIrish Před rokem +1

    I wanted to hear the sound of the wave as the phase was continuously rotated.

  • @Spudcore
    @Spudcore Před rokem

    Excellent! I always love hearing those classic game soundtracks, and it's even better when I'm learning as well :)

  • @carl_the_
    @carl_the_ Před 3 lety +9

    2:04 is so familiar, but I can't remember the name.

  • @lightascend2524
    @lightascend2524 Před rokem

    Wow, several of my previous confusions all answered in a single video.
    And now I know what those spiky waveforms in OPL chips actually are.

  • @FireyDeath4
    @FireyDeath4 Před rokem +1

    That is some revolutionary information for my hippocampus to assimilate
    Yeah I would really like to see some distortion samples and get a hold of whatever program you used for this now

  • @julianemery718
    @julianemery718 Před rokem

    You have a very nice voice, very pleasent to listen to.
    Also, this makes total sense, of course it would sound the same.

  • @gman_4815
    @gman_4815 Před rokem +7

    0:01 "electronik" music?!

    • @Formertris
      @Formertris Před rokem +4

      "guest from the future" music, to be more precise :)

    • @պly
      @պly Před rokem +1

      ​@@Formertris это наша музыка!

  • @jshstuff
    @jshstuff Před rokem +1

    This was incredible, I love these visualizers and your explanation of things.
    I have a sneaking suspicion that my video on linear phase band splits and achieving loudness in mastering from a few weeks ago have something to do with the algorithm blessing this video these past few days lol. The second half of my video shows this same effect. Whether true or not, it is well deserved - this video is awesome and explains the phenomenon much better than I could, in a less niche way.

  • @perryviller
    @perryviller Před měsícem +1

    The song in the beginning brought a smile to my face
    Soviet movies are the best

  • @kallelay5948
    @kallelay5948 Před rokem +1

    I have been blessed by this video.

  • @FernandoACalzzaniJunior

    This is amazing. I will keep that in the back of my head forever.

  • @bonbonpony
    @bonbonpony Před rokem

    Everyone gangsta until the phases start cancel each other out ;)

  • @acidangel162
    @acidangel162 Před rokem

    Awesome video. I knew this is how our ears work. The little hairs in our ears only know about the frequencies that are close to their resonant frequency. They don't react to other frequencies so they can't know about them. What I was surprised by is that no one else had made this video before you. I just assumed someone must have made this video to prove a point but no. So thanks for making this little demonstration. The world needed it.

    • @cyberyogicowindler2448
      @cyberyogicowindler2448 Před rokem

      MP3 data reduction and triode tube amplifiers also both cheat the ear by recreating strongly modified waveforms. Triode fans claim to hear more details than in unprocessed music, so its distinct distortion may even act like a kind of hearing aid.

  • @kennethbeal
    @kennethbeal Před rokem

    Wonderful animations, thank you! The visualization of how the wave form is made is quite helpful. Really neat.

  • @Projektor_music
    @Projektor_music Před rokem

    interesting fact: not just the square wave (or any phase shifted version) can be constructed only sine waves, any possible continuous wave can be created from pure sine waves given enough of them.

  • @antonliakhovitch8306
    @antonliakhovitch8306 Před rokem +1

    Anyone who finds themselves randomly tearing up when watching this probably grew up in the USSR (if you know, you know)

  • @SharikSS
    @SharikSS Před rokem

    Omg, you sound so high, I need to play Cypress Hill bits on top of this video

  • @noahaguilar8180
    @noahaguilar8180 Před rokem

    Today i learned that synthesis is about hearing the sound rather than waveforms

  • @zathrasyes1287
    @zathrasyes1287 Před rokem +1

    The music starting at 1:52 is from Vanguard.

  • @mcOscarmann
    @mcOscarmann Před rokem

    The visuals blew my mind (as musician) so I'd like to learn how it's done. Ty for planting the curiosity.

  • @dorrivix4214
    @dorrivix4214 Před rokem +6

    wait.. the 'fake square' sounds cleaner? 2:15

  • @kqzo
    @kqzo Před rokem

    i just immediately jumped to "harmonics" as soon as the animation popped up

  • @quennoes
    @quennoes Před rokem

    probably youtube audio compression, but i chucked the audio out into my scope and both waveforms looked identical

  • @kingmobisinvisible
    @kingmobisinvisible Před rokem

    ZZT!!! That brings back memories.

  • @firewolf34
    @firewolf34 Před 3 lety +12

    Is there a name for the concept? Of optimizing the wave for loudness like this, not necessarily the phase shifting
    Also I think the tilt you see is due to low/high pass filtering by whatever encoding is being done by CZcams or your PC.

    • @monster860
      @monster860  Před 3 lety +7

      Many sound chips will have quite a bit of DC offset, so to avoid clicking noises programs that emulate them will use a high pass filter to eliminate it, including famitracker.

  • @dogewasfound
    @dogewasfound Před rokem

    plot twist: this is a cry for help in morse code

  • @Ryuusei924
    @Ryuusei924 Před rokem

    what a lovely experiment and observation! i just think waveforms and their frequency spectrums are so neat

  • @MadameSomnambule
    @MadameSomnambule Před rokem +2

    So that explains the slanted square waves I keep seeing in Commodore 64 and NES tunes, that's actually really interesting. Also recognized the two example tracks you used, one I think is from King's Quest(?) but I know I've heard it in an old DOS game before, and the other is from one of the Ultima games, both playing on a Tandy 3-voice card.

  • @anaccounti_guess6706
    @anaccounti_guess6706 Před rokem

    i love the dancing waves at 1:52

  • @tomsterbg8130
    @tomsterbg8130 Před rokem

    And that's why when I learned roughly what sound waves are I was like "does this really mean anything i can decypher?" and the answer is no, you need a machine and that machine is both your ears and computers.

  • @NicosLeben
    @NicosLeben Před rokem

    I always wondered what happens if you change the phase of every frequency randomly and now I know. Thank you!

  • @microdesigns2000
    @microdesigns2000 Před rokem +1

    This is incredible. I bet there is some bird or other wild animal that can easily discern these "deep fake" square waves.

  • @Scar32
    @Scar32 Před rokem +1

    the loudness war continues

  • @ENCHANTMEN_
    @ENCHANTMEN_ Před rokem

    Mom: "we have square waves at home"

  • @StaleCroissant_
    @StaleCroissant_ Před rokem

    This is a really well made video! I'd love to see more like this

  • @MelodyWarp
    @MelodyWarp Před rokem +4

    I'm very curious to know what software was used to create these visualizations. I would love to mess around with stuff like this.

  • @emilyrln
    @emilyrln Před rokem

    Okay I legit couldn't tell the difference between those samples 😂 fascinating!

  • @Rudxain
    @Rudxain Před 10 měsíci

    3:14 BRUH THIS IS MINDBLOWING 🤯. That looks like a periodic arcsine! I've been using DAWs for quite a while, but never noticed a similarity between squares and arcsines

    • @monster860
      @monster860  Před 10 měsíci +1

      It's not quite the same, the rotated square wave has a vertical asymptote at every peak at it's limit (that is, it goes to infinity) while arcsin does not.

    • @Rudxain
      @Rudxain Před 10 měsíci

      @@monster860 Correct! I had the feeling they weren't exactly the same

  • @dumbut
    @dumbut Před rokem +5

    Mp3 encoding does this, or something similar. (i can see it on an oscilloscope) Maybe it saves space somehow? Absolutely remarkable by the way.

    • @RoadsideCookie
      @RoadsideCookie Před rokem

      Since they try to represent the same waveforms with a lower amplitude resolution, then phase shifting to create as much destructive interference as possible will result in lower peaks, which can be represented using less data.
      I only dabble in this stuff but that's my understanding do far, it's really ingenious.

  • @m.c.a.2699
    @m.c.a.2699 Před rokem

    I literally thought you were about to go "ahhh~~, the goo lagoon" or something.

  • @Kram1032
    @Kram1032 Před rokem +3

    You essentially get the modified triangle wave by using a cosine instead of a sine in the harmonic series, and the closed form uses what's called the Lerch transcendent, apparently.
    It looks like it also just so happens to be the integral of the modified square wave in the same way the triangle wave is the integral of the regular square wave. I guess that makes sense. Integration and phase shift are both linear operations, so you presumably can simply exchange the order of operations to get the same result.

  • @shindousan
    @shindousan Před rokem +3

    I've always thought that phase would become apparent at bass sounds near the threshold of hearing (say 30 Hz or less). I'd expect high-frequency receptors in the ear would be able to notice the step change at each cycle as a transient, perhaps not individually but as something different, so if one randomizes the phase, the transient would be smeared, changing the perception. If you ever try that, please share!