A tiny JavaScript library that generates music from PICO-8 cartridges.
1. Grab the source here:
2. Extract music and sound from a PICO-8 cartridge in .p8 format.
Open the .p8 file in a text editor.
Find the
__sfx__
and__music__
sections.Create string variables in your code with the respective contents.
For example:
const __sfx__ = `...`;const __music__ = `...`;See tunes1.js for a full example.
3. Include the player in your project (using HTML <source>
, webpack, etc)
4. Play sound:
pico8.sfx(mySfxId);
5. Play music:
pico8.music(mySongId);
Demo songs by Gruber.
Song | Length | Size | Gzip | JS | Original |
---|---|---|---|---|---|
Pico-8 Tunes Volume 1 | |||||
1. Demented Mario | 24.0 | ||||
2. Pastoral | 38.4 | ||||
3. Sand | 23.5 | ||||
4. Space | 32.0 | ||||
5. Ice | 22.4 | ||||
6. Nostalgia | 41.6 | ||||
7. Dungeon | 38.4 | ||||
8. Boss | 13.1 | ||||
9. Evil | 72.5 | ||||
10. Travel | 22.4 | ||||
11. Puzzle | 19.2 | ||||
12. Village | 20.0 | ||||
Pico-8 Tunes Volume 2 | |||||
1. Into the Belt | 26.1 | ||||
2. Need for Speed | 28.8 | ||||
3. Like Clockwork | 12.8 | ||||
4. Morning Shower | 32.0 | ||||
5. Robot Dance | 36.3 | ||||
6. Eyes in the Dark | 51.2 | ||||
7. Flight of Icarus | 17.6 | ||||
8. Fickle Flame | 21.3 | ||||
9. Autumn Wind | 32.0 | ||||
10. Dimensional Gate | 27.7 |
This project was made possible by these amazing people: