Log In  


Cart #nes_triangle_wave-0 | 2021-12-30 | Code ▽ | Embed ▽ | No License
10

What is this cartridge?

This is an example of how the bitcrush/distortion flags (found at poke location 0x5F42) can be utilized. The triangle waveform in PICO-8 can be made to sound more like the NES's triangle wave channel, but not exactly the same as it.

Technical bits

Generally, all digital sound data is not accurate. They are limited by some factors. One of those factors is "amplitude".

The primary way to store audio digitally is with Pulse-Code Modulation (PCM), where an analog audio signal is repeatedly sampled at a certain time interval, and each analog sample is quantized to a limited range of digital values.

Let's take one common PCM audio storage medium: the music CD. These encode each digital sample with 16 bits, so the amplitude of an analog sample needs to be rounded towards one of around 65,000 linearly-spaced amplitudes to be stored in the format. (65,000 is quite high, and there are some other formats that have a higher range of amplitudes.)

So how is this info relevant to PICO-8 and the NES?

My definition of "bitcrush" is to further limit the range of digital amplitudes an already-digital sample can use. PICO-8 provides a bitcrush effect built-in that can be applied individually to any of the four PSG channels. It's presumably a novelty effect remindful of game corruption - it was first discovered on accident by literally corrupting the RAM while playing something!

As the NES triangle wave is, in-fact, composed of very few amplitude levels, the PICO-8 PSG can achieve a similar type of triangle wave just by a single poke!

10


1

Nice find! I'm partial to the NES tri wave too and have recreated it on a couple of synthesizers.


8

very cool! when paired with other effects, the bitcrush effect can make some very unique sounding instruments

Cart #interesting_cart_id-0 | 2021-12-30 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
8



[Please log in to post a comment]