Login:
Menu:
Post: Author:
FamiTracker > General > FamiTracker Talk > 8-bit audio? Owner: gyms New post
Page 2 of 2 Sort: Goto Page: << Previous [1] [2]
Posted: 2011-06-12 13:33  (Last Edited: 2011-06-12 13:37) Reply | Quote
Shiru



Member for: 6335 days
Location: Russia, Moscow
Status: Offline

#18413
Basically, APU is just a set of programmable counters (and some other components). The counters are divide the master clock to specified value, thus producing needed freqencies. After this, it is depends from a channel function what happens with the divided frequency. For pulse channels it is like turning on and off a 4-bit DAC where the channel volume is latched (so output is either level 0 or level N). For the triangle channel it runs a counter that counts up and down (0-15-0), and outputs of the counter are connected to another 4-bit DAC - thus there is no volume control, as the volume is formed by the additional counter and needed to create the triangle waveform. For noise channel, it runs LFSR to get random bits with needed frequency, and then it used the same way as for pulse channels.

In total, there are 5 DACs in the APU, one per channel, four of them are 4-bit, and another one is 7-bit (for raw PCM/DPCM).

Posted: 2011-06-12 15:23  (Last Edited: 2011-06-12 22:13) Reply | Quote
gyms



Member for: 5628 days
Status: Offline

#18418
edit: nvrmnd

Posted: 2011-06-12 16:54  (Last Edited: 2011-06-12 22:13) Reply | Quote
gyms



Member for: 5628 days
Status: Offline

#18422
edit: nvrmnd

Posted: 2014-07-28 07:06 Reply | Quote
kernburn



Member for: 4329 days
Location: United States
Status: Offline

#59873
It seems many are confused on what sample rate and bit rate are in relation to DACs.

If anyone is reading this thread years later, this is an easy way to think about it.

The sample rate is how many photographs your camera can take in 1 second. The bit rate is the quality of each photo you take.

That is about as layman as you can get about that.

Posted: 2014-07-28 09:58 Reply | Quote
Im_a_Track_Man

Avatar

Member for: 5581 days
Location: Plantation, Florida
Status: Offline

#59876
Please. Please don't do this. Ever.

Posted: 2014-07-28 20:27 Reply | Quote
jsr
Administrator

Avatar

Member for: 7369 days
Location: Sweden
Status: Offline

#59901
This is an old topic and the OP isn't here anymore (unfortunately), but I don't see how this wouldn't be useful for possible new readers. So Im_a_Track_Man, please don't post unless you have anything of value to add!

An even better explanation is to describe what each setting actually do:

Sample rate - defines the highest possible frequency that can be represented, which is strictly less than half the sample rate. The hearing range is usually defined to reach 20kHz, so the default setting of 44,1kHz should be good enough for most cases.

Sample size - defines the noise floor, which is 48dB for 8 bits and 96dB for 16 bits. Using 8 bits samples will introduce audible noise & distortion so use only 16 bits when possible, all modern computers can do that. And as Shiru pointed out, this is totally unrelated to the fact that NES music sometimes is known as 8 bit music.

_______________________
Programmer and developer
Posted: 2014-07-29 04:20 Reply | Quote
Im_a_Track_Man

Avatar

Member for: 5581 days
Location: Plantation, Florida
Status: Offline

#59939
jsr, I apologize for posing in this insanely old thread. I just replied to tell kernburn (in an admittedly rude way, and I'm sorry) to not do this. I won't do this in the future, but it does get tiring to see new forum users constantly bumping long-dead threads.

Posted: 2014-07-29 12:26 Reply | Quote
za909

Avatar

Member for: 5407 days
Location: Hungary
Status: Offline

#59951
So, since this thread has been reopened... the NES doesn't have a definitive sampling rate other than for DPCM playback, because the frequency is the sampling rate itself for the wave generators.
But what's the lowest sampling rate you can get away with when sampling NES audio that still captures all the noise and imperfections of the signal leaving the console?

Posted: 2014-07-29 21:15 Reply | Quote
jsr
Administrator

Avatar

Member for: 7369 days
Location: Sweden
Status: Offline

#59965
Im_a_Track_Man: It is an old thread, but I don't exactly see the problem as long as it contains useful information. Getting mad at new users for bumping old threads is pointless as it obviously won't have an effect on other new users. If you think someone misbehaves, please send a PM to me or a moderator. Or even better, give a friendly explanation of why bumping old threads is undesirable (if that's what you think).

za909: That's a good question and a bit difficult to answer, but if you mean the limit where the sampling rate won't make an audible difference then the safest bet is the usual (CD quality) sampling rate: 44.1kHz. Slightly lower might also work, but going higher than that won't result in an audible difference.

However if you mean the limit where the entire signal is truly captured, then you'd have to measure the signal and find the highest frequency components (with enough amplitude to be of interest) and select a sampling rate above that. For example, the triangle channel is able to generate a 55kHz signal, and then even higher sampling rate is necessary to capture the triangle shape.

_______________________
Programmer and developer
Page 2 of 2 Sort: Goto Page: << Previous [1] [2]