If you don't know: The Emergency Alert System (EAS) is a warning system in the United States that interrupts TV and radio programming in order to provide important information on events that pose danger to your life. This cartridge replicates the intimidating tones from the system using the secret PCM channel in PICO-8.
Note that the National Periodic Test here is completely fake. There's no voice announcement included for now, due to concerns about hitting the limited storage capacity of PICO-8 carts.
WARNING: Never broadcast the EAS header bursts on TV or radio! The FCC will have the right to fine anyone for such misuse of EAS/SAME tones.
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!
This is a re-implementation of PICO-8's own pseudo-random number generator state algorithm.
Press any button to tick the software RNG, and the hardware RNG as well. The text will turn red if the software RNG state doesn't match the 64-bit RNG state within the base RAM layout.
Did anybody ask to be annoyed by some beeps and boops in their PICO-8? If you did, here you go!
The animation is inspired by old "learning computer" toys that sound like ice cream trucks.
Officially, the 0x5F00 to 0x5F3F area is referred to as "Draw State" RAM, and 0x5F40 to 0x5F7F is referred to as "Hardware State" RAM.
However, I think this is quite misleading, considering Draw State RAM offers some non-related functionality like controlling Devkit Mode, muting audio, and suppressing the pause menu. Furthermore, there are some graphics-related addresses in Hardware State RAM, notably for: the default print() attributes, the bitplane read/write masks, the undocumented high-color stuff, and the "Palette 2" shared between the recent fill pattern functionality and high-color modes.
I'd suggest both 64-byte areas be merged into a single 128-byte "Hardware Variables" area.
EDIT: This has been resolved by Zep.
As the title says, the "code snippet within a line" markdown on the BBS doesn't properly respond to the end marker, and instead runs down to the end of the whole line.
Assume the following raw text:
This is a `code snippet` within a line! |
This should be expected (italics used to represent the text within the backticks):
This is a code snippet within a line!
But the observed result is:
This is a code snippet
within a line!
Hey @zep!
Can you please add a feature to PICO-8's WAV export function, so that each of the four channels have one WAV file each? I've been wanting to do oscilloscope views of PICO-8 chiptune music, but the "oscilloscope view" format requires one WAV file for each channel (so that each channel is seen as a separate waveform).
I've already mentioned you on Twitter about this, but you never replied:
https://twitter.com/StinkerB06/status/1182348172548399104
https://twitter.com/StinkerB06/status/1174923908128002048
This thread is intended for the sake of researching particular (and most likely undocumented) parts of PICO-8's STAT(), that @zep didn't reference in the PICO-8 manual. The cartridge above also shows a new way for PICO-8 game devs to read the root-folder cartridge list with LS() (you must be on the desktop PICO-8 and your root directory must have at least 1 cartridge).
If you, Zep, know anything about the STAT() numbers not seen in the manual, can you tell me what they are for? People have figured out these for the BBS 101~104:
- STAT(101) -> BBS ID (nil for local carts)
- STAT(102) -> Site name (blank string in exported HTML's, nil in desktop PICO-8 builds and exported binaries)
People have NOT figured out: - STAT(103) -> Hash string of unknown encryption method (was 0 in 0.1.11g)
- STAT(104) -> False (when will this evaluate to true or some other value?)
This cartridge is intended for PICO-8 newcomers to learn how SSPR() works.
Controls:
Parameters:
The spritesheet used here is the one from Zep's Jelpi Test!
This cartridge is intended for PICO-8 newcomers to learn how each mode works.
Use the arrows to change the video mode. Valid modes are 0~7.
It writes to the address 0x5F2C in Draw State RAM to set the video mode (display resolution or reflection).
The sprites used here are Jelpi sprites!
WARNING: Depending on what you watch and listen to with this visualizer, the bars can produce flickering effects on your screen, which may be a problem for those diagnosed with epilepsy. Better use with caution.
About
This is a heavily-modded variant of Music Visualizer Bars by iaoth. Thanks to him for his visualizer code base!
I can load()
this cart. Is there anything special about doing that?
Yes! By a cart passing a load parameter string to PicoVisualizer, that cart can serve as a custom menu that allows users to view the visualization of any of its tracks, but has the cost of depending on an internet connection.
What are these 10 tracks?
To test most of all of my new changes to that visualizer, I thought I'd use something that really got my attention around the time I first started making them. That is PICO-8 Tunes Vol. 2 released by @Gruber, a cartridge featuring 10 original songs you can use in your PICO-8 projects for free.
Update history
March 26th, 2019 (first version)
March 27th, 2019
April 3rd, 2019
April 5th, 2019
April 14th, 2019
April 15th, 2019
April 16th, 2019
June 3rd, 2019
June 17th, 2019
June 30th, 2019
July 5th, 2019
May 9th, 2020
January 4th, 2021
February 13th, 2021
July 1st, 2021
December 3rd, 2021
December 6th, 2021
February 7th, 2022
February 18th, 2022
February 19th, 2022
If you keep seeing screenshots of the visualizer playing "Autumn Wind" throughout these updates and changes, that's because it's my favorite chilly song from that collection.
Plans for PicoVisualizer's future
- Add a JavaScript GPIO pin interface. Users can upload cartridge files and it will be uploaded to the PICO-8 browser-player instance running PicoVisualizer.
- Allow playlists to be configured for native exports (Windows, Linux, OSX, Raspberry Pi) from PICO-8. This could probably allow custom playlists of other cartridges to be created without having to buy the fantasy console. When there's a way to get this fully working, there's a will to release binaries to the public. For now until then, if you want to see other songs with my visualizer, post some suggestions in the comments, and I'll reply with a cartridge!
- Fix 'CD [DIRNAME]' commands in the PICO-8 console from not working properly. When the cartridge is run, it gets all cartridge filenames from the directory, but trying to play them will attempt to load from the root directory instead. A workaround (as of the time of writing) is to put this cartridge in the folder directory of where you want to load your music from. Open the PICO-8 config.txt, and change root_path to the directory of where your music is. After that, run PICO-8, then load up this cartridge and run it. You may also just copy and paste PicoVisualizer into every folder PICO-8 can see if you don't want to edit the config, which is what I personally do.
The sound and music editor data that's generated is 100% randomized! Music starts at a random position from 0 to 63.
Update May 10th, 2019:
Update August 20th, 2018: Slight change to show 15 color rectangles instead of only 7. This is not a song-related change.
Credit to Zep for the code base.