8

Was the output of the C64 SID chip 8 bit sound?

I know that SID is not sample based, but instead generate its sound using sine waves and white noise.

So is it correct to say that the audio generation part was really analog, and thus even talking about sound bits really make no sense?

Or maybe what I am really asking is: If I have an 8 bit, 44 kHz sample based audio chip, could that chip generate audio which could not be distinguished from a real SID chip?

1

5 Answers 5

14

The output is analog, not 8-bit. Each channel has an 8-bit DAC inside to generate the selectable waveforms (sine was not one of them, square/pulse wave, triangle and saw). There were also volume and envelopes, so even at this point the audio can't faithfully be represented at 8 bits. There is also an analog filter through which channels can be sent. The digital DDS oscillators in the chip work at approximately 1 MHz so the DAC output could update at the precision of 1MHz clock. So interesting downsampling or band-limited step interpolation is needed to reproduce or render the output to resemble original audio. 8 bits at 44 kHz would be pushing it.

13
  • 5
    If I remember correctly, the person who designed the SID chip had never worked on a sound chip before and presumed that it must work the same way as the analog synthesizers at the time (moog, arp, etc.). Thus, we ended up with the SID chip which was fairly unique in that it had analog sound generation circuitry unlike most others on the market at the time.
    – bjb
    Jun 3, 2019 at 16:27
  • 4
    It does not work like analog synthesizers. The digitally generated waveforms from the oscillator are fed to DAC. This chip was basically meant to be a wavetable oscillator but they were in a hurry so they had to skip the waveform tables and just basically use the phase accumulator oscillator output for DAC which explains the waveforms.
    – Justme
    Jun 3, 2019 at 17:46
  • 4
    @Justme: Many analog synths generate waveforms the same way as the SID. What makes them analog are the filters that follow the initial waveform generator. While something like a Juno 106 would have six identical filter circuits to allow six-voice polyphony, the SID only has one, but it's a true analog filter.
    – supercat
    Jun 3, 2019 at 22:31
  • 1
    @bjb The guy who designed the SID chip, Robert Yannes knew about how home computers generated sound, and "wasn't impressed", and wanted to design a chip to play music. He did indeed design it more like a synthesizer than the primitive sound generation at the time in Apple/Atari/Etc computers. He later went on to found Ensoniq. Jan 24, 2020 at 21:07
  • 1
    @SteveSether: I wonder to what extent the design of the SID was driven by marketing and/or Yannes' philosophy? For many purposes, having a direct volume register for each voice would have been more useful and versatile, and yet cheaper to implement, than the ADSR design, but from a marketing standpoint the ADSR was probably seen as a selling point. Time multiplexing could also have slashed cost enormously. If one wanted to produce four-voice waveforms with a 83KHz sample rate from an 8MHz clock, one could use a pair of 96-bit shift registers and a tiny bit of logic to implement...
    – supercat
    Mar 18, 2020 at 17:04
9

Part 1:

Was the output of the C64 SID chip 8 bit sound?

Short Answer: yes

The term 8-bit sound is generally not related to any sample size or speed, but to describe the sound 'qualities' of the 8-bit generation of consoles/computers.


Part 2:

So is it correct to say that the audio generation part was really analog,

Each and every sound generation is in the end analogue. A (single) speaker can only produce a single, one-dimensional output over time.

The difference between using an DAC with a fixed feeding rate and mixing specialized circuits (like with the SID) is about the amount of data needed to feed either.

Feeding an 8-bit DAC will need one byte per step, so 44 kByte at 44 kHz. A SID based sound system may need only a single byte for the same duration. That is if only a single symmetric frequency is to be outputted. To produce a more complex output, more data is needed. Notable game sounds can already be generated with less than 100 bytes per second.

Sounds like a compression algorithm, doesn't it? And that's the whole idea here. It's more like playing an instrument(*1) than outputting plain analogue levels. Here as well the output is generated using predefined elements, in effect saving much of the rather slim bandwith 8 bit machines had (*2).

Viewed from system design having a sound chip where only sound elements have to be set and manipulated is much like having video controllers with programmable functions (CTIA) and/or sprites (VIC). Instead of having the CPU directly manipulating the bitmap data to create an output image, the image is composed from components which in turn need way less bandwith to be manipulates.

That design view also gives why it got out of fashion - with CPUs fast enough to manipulate bitmap data just in time for output and fast enough to prepare sound data fast enough for straight DAC output, the need for specialized chips vanished.


Part 3:

Or maybe what I am really asking is:

Which is a different question.

If I have an 8 bit, 44 kHz sample based audio chip, could that chip generate audio which could not be distinguished from a real SID chip?

Basically yes.

Quality will be the very same as a SID output recorded at 44 kHz - much like a CD with SID-music.

The issue here is, as shown, not some 44 kHz DAC, but a CPU able (aka fast enough) to compute (emulate) the various elements of a SID in time - if not going for calculating it ahead of time (aka batch) that is.

With modern chips/software it's for most parts straight foreward to build a simple SID-alike system. In fact, the web browser your reading this in is already all you need - at least if it supports WebAudio (*3).


*1 - Which is BTW the idea MIDI is based on. Here sound data is encoded as start stop condition for instruments (simplified). As result a rather narrow 31.25 kBit/s (~8 KiByte/s) can be used to produce a whole orchestras sound.

*2 - For example the available bandwith for data transport of a 6502 running at 1 MHz is at maximum less 100 KiByte/s. That's for a copy loop, with some processing is gets way lower. Similar for other CPUs of the same time.

*3 - WebAudio builds its sound generation pipeline from blocks that can be configured to work similar to the SID pipeline. All needed are a few lines JS to configure and link up sound sources, mixers and filters. Of course, this will be only a first iteration. Really remodelling all non linearities/quirks of teh SID will take a lot more.

2
  • 1
    As usual any comment from downvoters would be appreciated to learn what exactly causes such.
    – Raffzahn
    Jun 4, 2019 at 17:53
  • I didn't downvote, but I think you could be a bit more clear about the different meanings of "8-bit sound." In particular, perhaps a bit more explanation about PCM audio recording, as compared to sound generation.
    – cjs
    Jun 4, 2019 at 23:50
4

Or maybe what I am really asking is: If I have an 8 bit, 44 kHz sample based audio chip, could that chip generate audio which could not be distinguished from a real SID chip?

The short answer: probably. But, given a choice, use standard 44.1 KHz 16-bit sampling to reproduce the signal.

PCM audio reproduction has two components: frequency range (what's the highest frequency it can reproduce?) and dynamic range (how loud is the background noise level in comparison to the highest signal you can hear?).

As described here (in probably far more detail than you care about), the frequency range of properly done 44.1 KHz digital sample reproduction will be about 0-20 KHz, which covers the entire set of frequencies that most people can hear, so there are no issues there.

The dynamic range of 8-bit PCM reproduction will be significantly more than 48 dB (assuming you use proper dithering); that is, the loudest signal will be 48 dB higher than the noise floor. This is better than, say, a high-quality cassette tape recording.

As others here have pointed out, SID chip is an analogue sound generator with a digital oscillator producing square, triangle and sawtooth waves. Because this is not a PCM sampling system, the number of bits of resolution of the digital oscillator is nearly irrelevant to the noise floor; that will be almost entirely determined by the analogue portions of the system.

I can't find any figures on the noise floor of the C64 audio output, but given that it's a very cost-constrained system in so many ways not specifically designed for high-quality musical reproduction (think about the typical speaker system used with it!), it's very likely that the noise level is well above -48 dB.

However, another thing to consider is the character of the noise; a standard PCM reproduction system that produces white noise filtered to a certain spectrum may have "background noise" that sounds quite different from that produced by a real C64 reproduction system. Your digital emulation of a SID chip and any subsequent analogue circuitry may or may not emulate this, but if it does that "SID noise" is part of the signal and you want it will above the background noise of the reproduction system.

In the end, unless you're particularly resource constrained (to a much greater degree than on a modern PC or phone), you should use 44.1 KHz 16-bit reproduction so that you simply don't have to think about the issues in that part of the system, and instead spend your energy focusing on the details of the simulated analogue waveform produced by your SID emulation. If the output of your emulation is not as noisy as the real system and you want that noise, you should add the noise in your emulation, ideally in a way that gives it the same character as the noise created by the real system.

12
  • 1
    Thanks for providing a much needed explanation of dynamic range in this context. Jan 24, 2020 at 19:00
  • When using 8-bit PCM, a sawtooth wave at 1/48 of max volume (e.g. sustain value of 1, playing with a single voice) will only cycle among 6 different values. If one is trying to produce e.g. a 110Hz tone, the output will change roughly 660 times/second, but if one is using a sample rate of 44100Hz, the values will sometimes be held for 11 samples and sometimes for 12. Using 16-bit audio will sound noticeably better.
    – supercat
    Mar 18, 2020 at 22:09
  • @supercat If you are filtering the output properly, the 8- and 16-bit waveforms will be indistinguishable except for the noise floor. That filtering the output properly bit is the key: the output of a correctly designed DAC system is not a stepwise waveform changing at fixed intervals. (Actually, it's not even near that for any audio system; there's always significant filtering in place, whether you want it or not.) See the more detailed answer to which I linked, and especially the links from that, for more information.
    – cjs
    Mar 19, 2020 at 1:33
  • @cjs: Use of 8-bit sampling will change the character of the noise when given low-level periodic waveforms. The difference between the quantized and non-quantized waveform will have a substantial roughly 660Hz content modulated by the beat frequency between that rate and the sampling rate. Using a 10-bit or higher DAC will noticeably improve audio quality.
    – supercat
    Mar 19, 2020 at 1:37
  • @supercat Only in an improperly filtered system that is allowing input or output frequences above the Nyquest limit. With proper filtering, there is no issue. This is a mathematical truism. Again, follow the links. (FWIW, I'm an ex-audio engineer, and even I didn't understand this properly until recently.)
    – cjs
    Mar 19, 2020 at 1:41
2

The waveform generator and DAC of each of the three voices is 12-bit, and calculates a new value for the DAC at the system clock speed, approximately 1 MHz. The subsequent envelope generator and filtering is done in the analogue domain, so in general the output is unquantised.

0

No, SID samples use the volume register which is 4 bit! The unit bit is only applicable to digital information, not analogue ones.

3
  • 3
    He's not asking about SID samples, but about SID output, which is essentially analogue. Jun 4, 2019 at 15:52
  • @polluks, it might be helpful if you would elaborate the answer a bit more - like describing what is done with the volume - and maybe as well the other parts to form a conclusive answer.
    – Raffzahn
    Jun 4, 2019 at 16:22
  • This seems to be a comment on another answer.
    – Chenmunka
    Jun 4, 2019 at 16:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .