3 ms·
The given examples seem disconnected from the duty cycle radios on my browser. I mean changing them changes the sound, but it's as if the one I selected is not
by recursive 2y ago
The given examples seem disconnected from the duty cycle radios on my browser. I mean changing them changes the sound, but it's as if the one I selected is not the one playing.
Anyway, what could have been the purpose for the gameboy hardware to provide both 25% and 75% duty cycle? In audio, these sound identical to a human, no? They are the same waveform with inverted polarity. They have the same overtone content.
- charcircuit 2y ago>In audio, this sound identical to a human, no? If it was just that single wave, but there is more than 1 audio channel.
- recursive 2y agoAdding more channels does nothing to the overtone information. From what I can find[1], it seems that the phase of the 25% and 75% waves are such that the two waves are actually inverse of each other. I don't know much about Gameboy hardware though. Do you actually know what the point of this is? [1]: https://gbdev.gg8.se/wiki/articles/Gameboy_sound_hardware#Square_Wave https://gbdev.gg8.se/wiki/articles/Gameboy_sound_hardware#Sq...
- magicalhippo 2y agoSure, but having a channel with 25% duty cycle of frequency f and a channel with 75% duty cycle of frequency 3f will lead to a different waveform after mixing compared to 75% at f and 25% at 3f, no? Depending on how that's processed downstream it could sound very different I imagine. In crude ASCII art (two inputs mixed to an output): ---_________ ---_---_---_ ¨¨¨_---_---_ vs --------____ -___-___-___ ¨---¨----___
- recursive 2y agoI saw a video a few years that provided pretty convincing experimental evidence that's not actually the case. https://www.youtube.com/watch?v=Ffka-hPzug0 https://www.youtube.com/watch?v=Ffka-hPzug0
- magicalhippo 2y agoVery interesting, though any non-linear effects would definitely get affected. Not sure how much that comes into play on the Gameboy though.
- charcircuit 2y agoIf you play 2 inverse waves it will sound different than 2 of the same wave.
- jhedwards 2y agoI am little confused by the article because it sounds like they are describing "pulse width" which is a common parameter on analog and digital synthesizers to change the character of the square wave. A square wave with a low pulse width will sound thinner than one with a high pulse width, and layering square waves with different pulse widths gives you a pleasant phasing effect. Based on some cursory research, however, it seems that duty cycle is different than pulse width, so now I am unsure if they are trying to use duty cycle variation to implement pulse width modulation (PWM) or if they are doing something else entirely.
- duped 2y agoThey are synonyms in this context
- em3rgent0rdr 2y agoMore precisely "pulse width" would be a time, while "duty cycle" would be a percent. And while when going from 0% to 50% duty cycle it could be said that "a square wave with a low pulse width will sound thinner than one with a high pulse width", however, once you go past 50% duty cycle the situation reverses. So a 25% duty cycle would sound almost identical to a 75% duty cycle...the amplitudes of their Fourier transform components would be identical.
- hunter2_ 2y ago> almost identical ... components would be identical I'm having a tough time reconciling how the former could be almost identical while the latter is identical. I guess the former involves a human listening through a speaker which has asymmetric imperfections (maybe the speaker moves outward more easily than it moves inward, or a DC offset in the signal leads to compression in the high-excursion side that doesn't exist on the low-excursion side, etc.) whereas the FFT readout doesn't necessarily have a speaker in the system at all.
- sapiogenesis 2y ago25% and 75% would sound identical alone, but in a mix there often are interplays where it can create a difference. An easy way to hear it is to run two synced oscillators, say a square and a saw, with sharp attack. The resulting sound should be sufficiently different, one side would dampen the attack compared to the other. Furthermore, I think in hardware synths and those that emulate them changing pulse width can cause the module to implicitly shift the signal up or down to ensure consistent average voltage, further complicating things. I am curious what you mean by compression.
- sapiogenesis 2y agoTo my ears it sounded like 25% and 75% duty cycles were 50%, and 50% sounded like a shorter one, but not sure.
- recursive 2y agoYes, that's how it sounded to me as well.
- hunter2_ 2y ago> The given examples seem disconnected from the duty cycle radios on my browser. I mean changing them changes the sound, but it's as if the one I selected is not the one playing. Confirmed. Author, please fix! For example, in the first set of radio buttons: 1. Leave it at the 50% default 2. Press play 3. Change it to the 12.5% option -- we continue to hear the same sound 4. Change it back to 50% -- finally we hear a different sound This is broken. Another example: 1. Listen to 12.5% after having come directly from 25% 2. Listen to 12.5% after having come directly from 50% The 12.5% should sound identical in either case, but it erroneously does not.
- iamdan 2y agoThis is correct, the demo not properly handling the selection of a new duty cycle. I pushed up a correction just now. Thanks for laying out a detailed replication - made for an easy fix
- neckro23 2y agoIf you mix a square wave of one duty cycle with another of a different duty cycle, they partially cancel each other out and you get a new sound. I'm not sure, but I believe the original NES Castlevania does this in some places, like in the "you died" jingle. (It's possible I'm misremembering and it's simply two square notes separated by an octave.)
- iamdan 2y agoThis should hopefully be fixed now, there was an issue with handling the radio button selection change. I haven't been able to find anything about why exactly they chose to provide both 25% and 75% DCs - they do sound the same minus the inverted polarity like you mentioned.