Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /storage/content/49/145849/famitracker.com/public_html/forum/classes/dbHandler.php on line 29
I've been taking some time lately to read up more on digital audio and samples. And what I find kind of funny is how most emulators of older 8-bit consoles and computers have an option to set the audio bit-depth to 8.
Isn't that kind of patronizing on the programmers part? Is it simply for giving the average user, not in the know, the option to play things in 'true 8-bit'? Am I right to say that digital audio bit-depth has nothing to do with the audio signal coming from the actual console's 8-bit microprocessor?
Furthermore, where does the sound actually come from on the NES? I understand the Richoh's responsible for the sound generation, but what this about the ALU?
Sorry for any freudian slips here, but I'm really trying to understand the hardware a bit more. Browsing through wiki pages are nice but some concepts just keep branching out further and further until I'm completely lost.
Anyways, hoping to get a discussion going if anyone knowlegable's up for it. Maybe a few of us here can learn a thing or two.
Audio signal on the actual console is not coming from microprocessor. It coming from the sound generator (APU, not ALU), which is part of the same crystal/chip with CPU in NES.
8-bit audio in emulators allows to generate sound a bit faster (twice less data to process), but it has much lesser resolution than 16 bit, and may be not enough to accurately represent the sound.
Sound on consoles such as NES just called '8-bit sound', because the consoles had 8-bit CPUs. It is not a parameter of the sound, just a name, so it has nothing to do with 8-bit sound on PC (and in emulators as well), where it is an actual parameter (amplitude resolution).
Someone correct me if I'm wrong, but this is my understanding: The sound that eventually comes out of a real NES/Famicom is not necessarily made up of discrete steps because the audio circuitry involved some analog components. A graph of the voltage over time will go up and down along slopes and curves. So, the sound the emulator is trying to mimic can be calculated to an arbitrary precision with an arbitrary bit-depth. 8-bit values can be used to designate 2^8 or 256 steps. When I was trying to write an NES emulator a few years ago, I never got far enough to have to deal with sound output (debugging all the jump instructions drove me nuts before I got that far.) But as a programmer I'd imagine that I would want to play around with the sample rate and bit-depth as I experimented, and giving the user the ability to select those options kinda makes sense.
I always thought the 8-bit output option was kinda weird.
On the subject of bit-depth, literally the only reason I don't use Nintendulator plugin over VirtuaNES is because of the former's DC offset, which eats up roughly 2 bits of headroom during playback.
cak's right on this. If you have lower volume, that means your intelligence signal is actually at a loss, making it more difficult to modulate/transmit the signal from one stage to the next. You'll need the volume to be at a certain minimum in order to achieve the correct bit depth.
[quote=MrFTBN]The sound that eventually comes out of a real NES/Famicom is not necessarily made up of discrete steps because the audio circuitry involved some analog components. A graph of the voltage over time will go up and down along slopes and curves. So, the sound the emulator is trying to mimic can be calculated to an arbitrary precision with an arbitrary bit-depth.[/quote]
Considering that it uses an otherwise conventional audio amplifier at the output stage of the system, not one single portion of the original hardware's sound will be "perfect" since there are so many electrical properties in each component that affects the signal. For example, a triangle wave (or even a VRC6 sawtooth wave) would look more like shark fins if you measure the original hardware's audio output with an oscilloscope (partly because the audio amplifier uses filter capacitors to reduce residue noise from other components & external interference).
However, FamiTracker is a computer program that uses "perfect-world" equations that don't exactly reflect the system's real-world electrical properties (& yes; such things as interference, signal attenuation & the flow of current all affect the audio's bit-depth to a certain extent in the real world).
_______________________
Technology: the one thing that's hated & cursed at by all engineers, technologists, scientists & technicians!
[quote=cak]That's exactly why it matters. The quieter the audio, the poorer the bit resolution.[/quote]
But you [i]want[/i] NES music to be quiet because you don't want the listener to jump out of his seat at how loud your music is. :P Besides that, what is NES audio made of, again? Square and triangle waves with four bits of resolution, DPCM audio with seven bits of resolution, and noise whose resolution can probably do without the full sixteen bits (though it does suffer with only eight bits). Even when you mix them together, I think you really do not need 16 bits' worth of dynamic range here, especially since I can't even hear the difference between 8-bit and 16-bit NES audio, and my ears aren't half bad at hearing stuff like compression artifacts.
Most genres of music should be normalized so that it takes up the full audio range. NES music is not one of them.
[b]EDIT:[/b] Hmm. I think I've spoken too hastily. I was imagining just the square waves, but I guess with triangles and especially DPCM mixed in, most music would be fine with normalization. Does the DC offset you're talking about really make stuff too quiet, though, or are you just worried about the 'headroom'?
Although NES DACs has 4 and 7 bit resolution, their characteristics aren't the same as PCs DAC, so you need more bits to represent the characteristics accurately. You also need more bits to mix the channels without losing quality. You can consider all the channels 7 bit in this sense (to uniform the volumes), so you already need 9 bits to represend mixed signal without losing details.
[quote=Shiru]Audio signal on the actual console is not coming from microprocessor. It coming from the sound generator (APU, not ALU), which is part of the same crystal/chip with CPU in NES.[/quote]
I did some reading up and I'm still a bit confused, I think. It's my understanding(?) that the microprocessor IS the CPU. And that the 2a03, like you say, doesn't actually generate the sound, but controlls direct memory access as well as the sound generators aboard the APU(the actual sound generator keeps it's generic designation?).
"It coming from the sound generator which is part of the same crystal/chip with CPU in NES."
Doesn't that imply that it's a part of the integrated circuit that is the 2a03 then?
Thanks, Shiru
[quote=TechEmporium]such things as interference, signal attenuation & the flow of current all affect the audio's bit-depth to a certain extent in the real world[/quote]
You're using bit-depth metaphorically in this example, right? (Sorry, if it's like, "no shit, sherlock". haha, I'm fresh at trying to finally wrap my head around these concepts.)
[quote=MrFTBN]Eh? You think the programmer was making a joke?[/quote]
heheh, that was definitely a freudian slip. (yes, up until not too long ago, I thought "8-bit" had something to do with the cpu,audio and video, since 'bits" are thrown around within their own contexts without actually being directly related to each other...I'M TRYING TO CHANGE)
CPU is CPU (microprocessor, a complex logic device), APU is APU (souhd chip, basically just set of counters and latches). These are independent devices, not parts of each other. In NES they both are implemented in a single IC to save costs. So, while audio signal comes from the same chip that contains CPU, it does not come from the actual CPU inside the chip, it come from APU. APU is controlled by CPU, of course, but the whole idea of having APU is to offload the audio generation from the CPU to a special device (to save CPU time for other things).
2A03 itself is not CPU or APU, it is a chip that contains cut-down 6502 CPU, APU, and some other extra hardware.
[quote=gyms][quote=TechEmporium]such things as interference, signal attenuation & the flow of current all affect the audio's bit-depth to a certain extent in the real world[/quote]
You're using bit-depth metaphorically in this example, right? (Sorry, if it's like, "no shit, sherlock". haha, I'm fresh at trying to finally wrap my head around these concepts.)[/quote]
Nope. The software aspects of an actual NES still have a lot to do with the hardware itself (as it does for every other device that handles digital & even analog signal transmission).
The NES' motherboard & cartridge's circuit boards have traces (the miniaturized equivalent of actual wires going from one component to the next). When a signal (analog or digital) flows through the traces, you have all sorts of forces acting on it; resistance from the trace's elemental properties, magnetic interference from external devices, internal components acting on the signal negatively, chemical impurities in the CPU & other semiconductors, etc.
All of these factors (& more) have the ability to attenuate any signal during transmission. And if the bit-depth of the data stream is too low, this will lead to an increased risk of massive data loss/distortion during transmission from point A to point B. If you increase the bit depth, you increase the number of bits in the stream (i.e.: you're dividing the overall stream into smaller chucks, making the data more manageable). What I mean is this; if you have a whole stream divided into 4 chunks instead of 8 or even 16, when one chunk is lost, you've lost 25% of the signal (even though the interference could have potentially only caused a 6.25% loss).
It's like a rat eating your cheese; if a rat bit through a small piece from an entire quarter of cheese, you've lost that quarter. If it only bit through a smaller piece, you'd lose less.
In an NES, each data signal's bit-depth is enough to ensure that significant data loss isn't as likely, but due to how strong external factors can be, that's why Nintendo's engineers designed a grounded aluminum shield plate to enclose the console's motherboard. This wouldn't stop any internal interference from affecting the signals, but this isn't as significant to the overall system as external interference.
_______________________
Technology: the one thing that's hated & cursed at by all engineers, technologists, scientists & technicians!
Ok, it seems the offset isn't as bad in Nintendulator v.97, only about 2 dB of loss. Though there's still no control over the output volume.
[quote=furrykef]But you want NES music to be quiet because you don't want the listener to jump out of his seat at how loud your music is. :P[/quote]
There is truth to this, but bit resolution should be preserved regardless...one can always turn it down while listening.
[quote=furrykef]Besides that, what is NES audio made of, again? Square and triangle waves with four bits of resolution, DPCM audio with seven bits of resolution, and noise whose resolution can probably do without the full sixteen bits (though it does suffer with only eight bits). Even when you mix them together, I think you really do not need 16 bits' worth of dynamic range here, especially since I can't even hear the difference between 8-bit and 16-bit NES audio, and my ears aren't half bad at hearing stuff like compression artifacts.[/quote]
To reiterate what's already been said, NES output is more complex than 0s and 1s due to additional processes. Also, there is a wide berth of difference between 8-bit and 16-bit. One great technique to "compare" the two is to downsample a 16-bit source to 8-bit (without any filtering), invert the waveform, and mix it with the original source. What you have left is nothing but quite audible digital noise.
[quote=furrykef]Does the DC offset you're talking about really make stuff too quiet, though, or are you just worried about the 'headroom'?[/quote]
I'm worried about bit resolution only. Headroom is easily regained by removing the offset in a wave editor.
ok, 8-bit stuff doesn't just make you lose volume, it makes you lose volume resolution-- if you have some line noise or something that is causing differences of 5 volume on a 16-bit signal, it will be extremely quiet. On an 8-bit signal it will be much louder because 5/256 > 5/65535.
emulators probably have 8-bit mode because some people run them on crappy old computers that have sound latency issues and less processing time = better latency.