chiptrackr replayer

A small module player for your own demos and intros. It plays songs exactly like the tracker does, and tells you when each row is heard so effects can sync to the music. Save > Open in replayer in the tracker brings the song you are working on here. Open the tracker

--:--

Loading the demo song…

import { createReplayer } from './webtracker-replayer.js';

const music = await createReplayer('song.xm', { loop: true });
music.onRow = ({ order, row }) => {
  // Sync your effects here: this runs when the row is heard.
  if (row % 16 === 0) flash();
};
button.onclick = () => music.play();   // browsers need a click first

// In a render loop: music.time is the song time in seconds.

webtracker-replayer.js plays MOD, XM, S3M, IT, MTM, 669 and OKT, also zipped or packed. webtracker-replayer-lite.js plays XM and MOD only and is smaller.