A Punk-O-Matic 2 song data parser and player. http://iliazeus.lol/punkomatic-js/
Find a file
2025-03-24 14:53:35 +05:00
.github/workflows massively refactor the whole thing 2024-10-07 17:12:25 +05:00
data add sample data and online converter page 2023-01-19 14:38:51 +06:00
dist upgrade libav 2025-03-24 14:53:35 +05:00
libav.js@e85f2b3d78 use lame as encoder 2024-04-17 19:32:44 +05:00
scripts upgrade libav 2025-03-24 14:53:35 +05:00
src fix a bug with mismatched buffer lengths 2024-10-12 17:45:30 +05:00
.gitignore massively refactor the whole thing 2024-10-07 17:12:25 +05:00
.gitmodules add compression with libav.js 2024-03-25 21:22:14 +05:00
.prettierrc implement parser 2023-01-18 22:41:27 +06:00
LICENSE Initial commit 2023-01-18 15:55:57 +06:00
package-lock.json fix a bug with mismatched buffer lengths 2024-10-12 17:45:30 +05:00
package.json fix a bug with mismatched buffer lengths 2024-10-12 17:45:30 +05:00
README.md massively refactor the whole thing 2024-10-07 17:12:25 +05:00
tsconfig.json build for node and browser 2024-03-25 15:14:12 +05:00

punkomatic-js

A Punk-O-Matic 2 song data parser and player.

Try it out online!

How to use

You'll need the data folder from POM Converter. You can download it from the developer website.

I also host a copy in the repo. These are not mine, but they are publicly available.

All other code and assets are published under the MIT license.

// ESM only
import * as pm from "./punkomatic.browser.js";

const song = pm.parseSong(songData);
const audio = await pm.renderSong(song, { baseSoundPath: "./path-to/samples" });
const file = await pm.encodeSong(song, audio, { compress: true });

// to play or download it in browser:
const url = URL.createObjectUrl(file);
document.querySelector("audio#my-song").src = url;

// to write it to a file in Node.js:
const fs = require("node:fs/promises");
await fs.writeFile("output.wav", new Buffer(await blob.arrayBuffer()));