4 ms·
As someone who's worked "in the trenches" of Famicom chiptune and emulation (especially the FDS chip), either this page has an unusually large number of inaccur
by nyanpasu64 5y ago
As someone who's worked "in the trenches" of Famicom chiptune and emulation (especially the FDS chip), either this page has an unusually large number of inaccuracies, or the previous articles also have many inaccuracies but I don't know enough to point them out:
- The FDS's sample amplitudes are 6-bit, not 8-bit. FamiTracker doesn't let you set sample values above 63, and the topmost 2 bits are docmented as ignored in https://wiki.nesdev.org/w/index.php/FDS_audio#Wavetable_RAM_.28.244040-.24407F.29 https://wiki.nesdev.org/w/index.php/FDS_audio#Wavetable_RAM_... and not written in the nsfplay emulator (https://github.com/bbbradsmith/nsfplay/blob/master/xgm/devices/Sound/nes_fds.cpp#L287 https://github.com/bbbradsmith/nsfplay/blob/master/xgm/devic...).
- "A Gameboy wave is limited to, at most, 32 values. (17 in the sample above)" Where did you get the number 17 from? Is that because a 32-sample wavetable has 17 distinct frequencies ≤ Nyquist (0 through 16)? To my knowledge, the GB wavetable is hard-coded to 32 values, no more, no less. And in the screenshot, it is 32 samples long (as expected) and has 14 separate steps.
- "By the standards of Yamaha synthesizers, you might call this a “one-operator” FM synth." No, it's called a 2-operator FM synth, since the carrier wave counts as well. (The YM2612/2608 have 4 oscillators, and 1 to 4 of them can be carriers. This doesn't make it a 3op to 0op FM sound chip.)
- tomc1985 5y agoConsidering that the Yamaha DX7 is an FM synth I can see the thinking behind calling this a 'one-operator' synth
- nyanpasu64 5y agoThe DX7 has 6 oscillators per note, and up to 5 of them can be used to modulate each other (without cycles) or the remaining carrier waveform(s). It's referred to as a 6-op synth, not a 5-op synth, and the YM2612 is a 4-op synth (not 3-op synth), and the OPL2 and FDS are 2-op synths (not 1-op synths).
- tomc1985 5y agoSo are the terms 'operator' and 'oscillator' interchangeable? I always thought of it in terms of voices (before taking into account polyphony)
- nyanpasu64 5y agoI guess they're more-or-less interchangeable. From what I hear, "operator" is generally used to refer to Yamaha FM (and I sometimes use it for FDS/etc. FM as well), while "oscillator" can describe essentially all synthesizers.
- nyanpasu64 5y agoTo elaborate on how frequency modulation "gives the triangle wave a grittier sound", FDS's FM and Yamaha's phase modulation produce sidebands, or extra frequencies, at (harmonic * carrier frequency ± n * modulator frequency). The intensity of each sideband is proportional to FFT(carrier)[harmonic] * f(n) (for some odd f involving Bessel functions and FFT(modulator), which is zero for large |n|, and the number of nonzero n increases as the modulation index increases). In this case, the modulator frequency isn't a small rational factor of the carrier frequency, creating gritty inharmonic sidebands. As an example of FDS FM, you can look at this video (https://www.youtube.com/watch?v=Tgu1mCBU2vA https://www.youtube.com/watch?v=Tgu1mCBU2vA) describing FM emulation errors in older versions of FamiTracker, and how some chiptune songs are incompatible with the more accurate emulation core I imported into Dn-FamiTracker. FDS FM is the chip's defining characteristic in modern chiptune, though it was sadly barely explored by official games in the console's original lifespan (aside from being used as vibrato). The only game I currently know which used FM at audible frequencies was Bio Miracle Bokutte Upa (https://www.youtube.com/watch?v=_alQrPMNBT0 https://www.youtube.com/watch?v=_alQrPMNBT0), which also required cycle-accurate console emulation and would otherwise degrade into inharmonic chaos (like the "FM emulation errors" video above). Unlike regular FM on Yamaha sound chips, the FDS allows you to use complex carrier wavetables. Combined with how the modulator is naturally slightly detuned from the carrier (due to hardware rounding errors), this results in growling evolving sounds as the waveform stretches and squeezes in the time domain, and harmonics and sidebands beat in and out of phase in the frequency domain. Strangely, the FDS's modulator doesn't draw from an array of samples like the carrier waveform, but instead an array of 3-bit delta values (https://github.com/NovaSquirrel/Mesen-X/blob/master/Core/ModChannel.h#L74-L90 https://github.com/NovaSquirrel/Mesen-X/blob/master/Core/Mod...) representing adding [+0, +1, +2, +4, reset=0, -4, -2, -1] (modulo [-64..64)) to the current modulator amplitude. This means you have to design modulator tables carefully, or else the carrier frequency will have a net offset (as above) or even drift endlessly until it wraps around. Interestingly, FamiTracker shows the mod table as only having 32 elements (compared to the wavetable's 64 elements), and the nesdev wiki (https://wiki.nesdev.org/w/index.php/FDS_audio#Mod_table_write_.28.244088.29 https://wiki.nesdev.org/w/index.php/FDS_audio#Mod_table_writ...) describes the mod table as having 32 elements. This conflicts with how Mesen (https://github.com/NovaSquirrel/Mesen-X/blob/master/Core/ModChannel.h#L49-L57 https://github.com/NovaSquirrel/Mesen-X/blob/master/Core/Mod...), cxNES (https://github.com/perilsensitive/cxnes/blob/master/boards/audio/fds_audio.c#L249-L253 https://github.com/perilsensitive/cxnes/blob/master/boards/a...), and nsfplay (https://github.com/bbbradsmith/nsfplay/blob/master/xgm/devices/Sound/nes_fds.cpp#L345-L350 https://github.com/bbbradsmith/nsfplay/blob/master/xgm/devic...) implement the mod table as a 64-element array where you can only write to 2 adjacent elements at a time. I'm not sure which is accurate, as I don't have hardware on hand to test. Then on each sample (https://github.com/NovaSquirrel/Mesen-X/blob/master/Core/ModChannel.h#L92-L125 https://github.com/NovaSquirrel/Mesen-X/blob/master/Core/Mod...), the modulator amplitude is multiplied by the modulation strength (dropping a few lower bits and rounding oddly), clamped between [-64..192) (asymmetrical for some reason), and then used to change the carrier's instantaneous frequency by 0x through 4x (https://github.com/NovaSquirrel/Mesen-X/blob/master/Core/FdsAudio.h#L71 https://github.com/NovaSquirrel/Mesen-X/blob/master/Core/Fds...).