8-bit Voice

0 views
Skip to first unread message

Michele Firmasyah

unread,
Aug 5, 2024, 3:14:27 AM8/5/24
to picirnazo
Fromhow I've understood 8-bit music, there are 5(?) channels readily available to the composer however in each channel, as much as the voice may vary, two notes can not be held at the same time and thus arpeggios have been used for the illusion of chords, giving that nostalgic 8-bit effect.

But notes from two different channels can be held at the same time, right? So what if two or more channels are made to sound the exact same way (both the same square wave, for example, with same volume timbre/etc) can there then be chords based off of that aggregate?


if you are using a modern computer i wouldn't worry so much about these kinda details/limitations, I don't think people really care that much if you are looking to create 8bit inspired music, just go crazy with them chords.


Why dont you just make daw music with chip type sounds then if you are worried so much about voicings? Most people target platforms they like sonically rather than ones that can voice their compositional aspirations.


Wave channels aren't limited like with pulse channels. Pulse channels can only produce 3 variants of square waves, while as a wave channel has enough processing power to take on more complicated waveforms.


NES: classic video game soundtracks, Fearofdark's "Coffee Zone", 2a03 Puritans, the Famitracker forums, that one guy... uh what's his name.. Virt Kaufman? I'm sure there are plenty that I'm overlooking... but that's what comes to me off the top of my head.


Check out battleofthebits.org and listen to random stuff from there. They cover a ton of chiptune platforms



Also, NES can make use of expansion chips that increase the number of channels available beyond just 5. personal favorites of mine are the VRC6 chip and the MMC5 chip.


VRC6 adds 2 pulse channels with a wider range of width options, plus 1 saw wave channel, for a total number of 8 channels available to work with. MMC5 adds 3 pulse channels that sound identical to the stock channels, again expanding you to 8 channels of sound to work with.


Edit: Also, your example video of that Bach 8-bit thing... sounds like a lazy "take a midi of a song, load it into GXSCC or some other '8-bit' soundfont, export audio" deal. I personally wouldn't trust any youtube video calling itself an "8-bit cover/remake/remix" as something to follow the example of...


Oh yeah definitely it's just what I happened to be listening to at the moment based on youtube's auto play... I think that could actually be a cool idea if done well, taking baroque/classical music and making chip our it. I remember I used to have some album with a very good remix of the first movement of moonlight sonata. Is there more stuff like that?


I've seen the waveshield and similar things but most of what I've seen has been about playing back prerecorded audio. Are there any shields or IC/projects with friendly code (not a great programmer) that you can read/write an audio buffer and mess around with it a bit (starting at different places or changing direction etc...)


Basically no, the arduino has not got enough memory to do this sort of thing.

In theory it might be possible to have a shield with external memory, and A/D & D/A but getting it in and out of the arduino is a bit of a bottle neck.


Yeah I figured something like that was the case. I was hoping there was a shield or something similar that just took control input from the Arduino, but at the point I'm just describing a commercial sampler with MIDI input.


Odd that I thought the question said 16 bits. My eyes must be going wonky at my age, I could have sworn it said 16 bits somewhere, maybe even in the big print in the title?

Also I thought that recording was mentioned ?

Still let's not let relevance get in the way of a good answer.


As my main sampler thing. I'm building an Arduino based controller for this that will send it MIDI messages (based off drum triggers), so I was hoping I could find something that worked in the 16bit realm to run parallel with it (for when I want a more fidelious sound).


Actually, the Arduino Mega, if someone would do a 64k SRAM Shield, it would be possible to use a 16 bit DAC with it via the SPI lines. I'm sure sample rate would be low and sound would be mono, but heck, crazy things could happen.


I got a 16 bit DAC here that I was testing, and it does work. The problem for you would be the 16 bit INPUT, not the OUTPUT. But still... maybe its time for someone to create a shield that would have a better processor that would handle everything and let the Arduino only control things via the SPI line. Like the GameDuino?


Saying something is possible is a million miles away from doing it. I did a lot of sound processing and sampling work back in the 80s with a 6502 processor, not much difference in power from an arduino. However, the architecture is different making access to memory more problematical on the arduino.

Sure you could do something just for the sake of doing it but it would be totally inferrer from doing it with the right processor.


I was just hoping for a shield+library that would make it easy to do. The sampler I linked to does just about everything I want to do already (but in 8-bits), so it's just a matter of getting similar functionality but at 16-bits.


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.


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.


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).


*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.


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


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


The dynamic range of 8-bit PCM reproduction will be significantly morethan 48 dB (assuming you use proper dithering); that is, the loudestsignal 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 soundgenerator with a digital oscillator producing square, triangle andsawtooth waves. Because this is not a PCM sampling system, thenumber of bits of resolution of the digital oscillator is nearlyirrelevant to the noise floor; that will be almost entirely determinedby 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 notspecifically designed for high-quality musical reproduction (thinkabout the typical speaker system used with it!), it's very likely thatthe noise level is well above -48 dB.

3a8082e126
Reply all
Reply to author
Forward
0 new messages