7 ms·
That's cool, but it doesn't really explain _why_ the sound becomes more interesting. It has to do with how the sound is played back, in short, there are no "squ
by stagas 6y ago
That's cool, but it doesn't really explain _why_ the sound becomes more interesting. It has to do with how the sound is played back, in short, there are no "square" waves. Everything is a combination of sine waves. The more you have it's as if there are more instruments playing on top of each other, in music they're called "harmonics". A "squared" wave is a wave with many many additional sine waves in different frequencies that overlap with each other, if you were to plot it it wouldn't look square, rather it would be wavy. This article shows visually how this effect takes place, if you are interested: http://www.jezzamon.com/fourier/ http://www.jezzamon.com/fourier/
- eternauta3k 6y ago> if you were to plot it it wouldn't look square, rather it would be wavy Could you go into more detail on why you say this? A real life square wave is square, possibly with some ringing or overshoot in the flanks (but not necessarily)
- mhh__ 6y agoGibbs effect. To sample a signal you need an antialiasing filter in front of the ADC.
- elijahparker 6y agoThe square wave signal will move the speaker in a square pattern, but the actual waves propagating through the air are always sine waves. What you get is a series of harmonics indicative of the square source.
- raverbashing 6y agoThe waves can be mathematically described as a sum of sine waves, but there's no reason why air shouldn't support something that "looks like" a square wave (no more as the speaker anyway) within some limitations. What you might have is that the air might disperse the wave so it gets distorted but still with the same components https://en.wikipedia.org/wiki/Acoustic_dispersion https://en.wikipedia.org/wiki/Acoustic_dispersion
- elijahparker 6y agoBut think about it this way: if you have a plate moving back and forth in a square wave pattern at the surface of a pool of water, would the waves on the water be square?
- raverbashing 6y agoNo, but because surface waves behave differently from sound waves (which are in "3D") https://en.wikipedia.org/wiki/Dispersion_(water_waves) https://en.wikipedia.org/wiki/Dispersion_(water_waves) Basically phase velocity changes with the amplitude and the shallowness of the water. Yes it's easy to think they behave the same, but they don't.
- the_other 6y agoThe sine-ness of the water waves comes more from the mass and "elasticity" of the water, and not from the impulse driving it. If you put the same plate in air (or a speaker cone projecting a square wave) the mass and elasticity of the air permits much more "equare"-like pressure waves.
- hwillis 6y agoWaves in water are surface gravity waves, which air does not have. Because water is pretty incompressible, high pressure causes a water column to rise against gravity. The rate at which the column falls back down is obviously dictated by gravity. The faster the frequency, the more a pressure wave acts like a real pressure wave and less like a surface gravity wave. Since real pressure waves don't rely on gravity for transmission, they travel far faster, resulting in dispersion[1]. You can still have square waves as long as they are 10-100x slower (longer) than normal waves. Since air pressure does not typically produce a height difference in the atmosphere, standard sounds in air are not subject to dispersion and act very differently from water. There is obviously still a limit to the rise/fall time of a square wave, when the transition is more like a shockwave front, but that's a very square wave. [1]: https://en.wikipedia.org/wiki/Dispersion_(water_waves) https://en.wikipedia.org/wiki/Dispersion_(water_waves)
- thdrdt 6y ago
- kxrm 6y agoI think they are referring to something like this: http://1.bp.blogspot.com/-WhH0B8mnGhw/UZhL9ehVa8I/AAAAAAAAAHc/MjfU6uU7rgI/s1600/fourier_square_wave.jpg http://1.bp.blogspot.com/-WhH0B8mnGhw/UZhL9ehVa8I/AAAAAAAAAH...
- stagas 6y agoExactly, what I'm trying to explain (although it's not easy as it's not very intuitive), is that we get more interesting sounds by clipping a signal's peaks to square because it is identical to _adding_ lots of different frequencies to the same sound in a way that their cancelling each other out would be represented as a square in digital audio, because of lack of detailed sampling at that level. The actual signal does not just flat stop at the square peak, the peaks get more signals in different frequencies added to them at playback, so they sound richer. You send a square to the speaker, the speaker isn't doing square, it pulsates in a sinusoidal fashion, nothing is fast or solid enough to produce flat square. Maybe you can find these harmonics in a factory with steel equipment, but they will still be pulsating at very high frequencies, which is why these "real" sounds are so much richer than a speaker.
- pjc50 6y agoThere are no real life perfect square waves for the same reason there are no ideal diodes, capacitors etc; you cannot have a perfect vertical cliff because that would have infinite slew, and you cannot have perfectly sharp corners because that implies infinite second derivative, etc. The best you can get is a tight curve into an extremely steep "triangle". The amplifier driving the speaker has finite slew. The speaker itself is constrained to move at finite speed and cannot accelerate instantly. The air has a finite slew rate - the speed of sound. Stackexchange has a discussion on trying to determine a maximum frequency in air here: https://physics.stackexchange.com/questions/23418/is-there-an-upper-frequency-limit-to-ultrasound https://physics.stackexchange.com/questions/23418/is-there-a... which leads to all sorts of useful sub-discussions. Attenuation depends on frequency; the higher frequency harmonics are more subject to attenuation in air, as well as reflecting off surfaces and self-interfering.
- hwillis 6y ago> Everything is a combination of sine waves. No, we hear things as if they were a combination of sinusoidal waves (mostly). That's only one way to represent them; you can just as easily represent them as a series of impulses. Mathematically they're all equivalent models, and none of the models accurately represent acoustic transfer. You can say we perceive things as if they were a linear combination of sinusoidal waves because we have a series of hair cells in the cochlea. Each bundle of hairs responds to waves within a very narrow frequency range, so that's what we mainly respond to. All of our audio perception is filtered through this process first. Since the hair bundles have a specific audio response, they don't respond to instantaneous frequencies- there has to be a wave of a certain duration for us to perceive a frequency. That's even independent of the mathematical fact that shorter wave pulses are more indistinguishable from white noise. Also, all of this is ignoring the other equipment of the ear, like the eardrum and the bone lever[1] that transmits sound to the inner ear. We have a lot of brain circuitry that picks out specific features, which means we can recognize things like square waves or impulses. I don't know much about this stuff but it's important for things like cochlear implants. AFAIK it's similar to some optical illusion/visual perception phenomena- things like how we perceive magenta as a single color, even though it's just two colors together, or how we perceive orange as a distinct color from brown even though it isn't[2]. > The more you have it's as if there are more instruments playing on top of each other, in music they're called "harmonics". Symmetrical clipping and square waves both create odd-order harmonics (3x, 5x, 7x, 9x, etc) which are very unnatural. The brain is good at picking this kind of thing out, and while I find it enjoyable (eg chiptunes), it's not really comparable to normal harmonics in music. It's certainly not something you can simplify down to just the component sinusoids. The perception of sounds has way more to do with stuff happening in the brain than in the air. [1]: https://en.wikipedia.org/wiki/Ossicles#/media/File:Slide1ghe.JPG https://en.wikipedia.org/wiki/Ossicles#/media/File:Slide1ghe... [2]: https://en.wikipedia.org/wiki/Shades_of_orange https://en.wikipedia.org/wiki/Shades_of_orange
- sideshowb 6y agoRelated - I have recently been experimenting with musical effects based on breaking down a signal to any basis function of your choice. You can literally build any signal out of (nearly) any other. Turns out not to be a great audio effect as it tends to morph from one to the other via white noise in the middle in the general case, but with the right basis functions it's not so bad. At the extreme, in the case of sinusoidal basis functions ordered in increasing frequency, you've reinvented the filter sweep. I plan to share on the blog at some point https://omnisplore.wordpress.com/category/music-creative/ https://omnisplore.wordpress.com/category/music-creative/
- DavidVoid 6y agoOn a related note, this [1] is by far the best video I've seen on the topic of turning digital signals (like square waves) into analog ones. The bandlimiting and timing section shows what a square wave ends up looking like when it's been converted to an analog signal. [1] https://xiph.org/video/vid2.shtml https://xiph.org/video/vid2.shtml It's 24 min long and, imo, does an excellent job at explaining the role of digital sampling frequencies, bit-depth, and the misleading "stairstep" representation of digital waveforms.
- louthy 6y agoThat's the video I always share with people spouting the same old clichéd nonsense about how a digital signal can't be as good as an analogue one (and other variant clichés). His presentation style can be a tad annoying, but there's no doubting the utter clarity of his points.
- stagas 6y agoA digital signal can't be as "flawed" as an analogue one. The analog synthesizers exploit these flaws to produce richer and more interesting sounds that you just can't get in the digital world as it's too deterministic and the attempts to randomize behavior are too "white-noisy", instead of natural occuring distortions. There's been some advancements using AI, though, to model these flaws organically, which sound promising: https://teddykoker.com/2020/05/deep-learning-for-guitar-effect-emulation/ https://teddykoker.com/2020/05/deep-learning-for-guitar-effe...
- copperx 6y agoYou can record an analogue synth digitally without losing its characteristics. It's interesting that you can't recreate the sound exactly by generating it in the digital domain.
- vertex-four 6y agoSo you can... assuming you can get exactly the right random bias generated given any possible input - and the bias will depend on both the current input and potentially some recent input. This is significantly harder and more expensive than just going and building the analogue box, so nobody does it.