Pac-Sound Waveform Display

A professor of some kind contacted me a while back (it's August 2018 now) and asked for information on Pac-Man sound that he could use in talks he was giving. I can't find his name or the talk, due to lost email, but if you're him, let me know.

I generated this tool to show the waveforms read directly from the ROMs. This loads the ROMs when the page loads, then charts out the waveforms from the ROM data directly. The javascript is shown below the waveforms.

Sound Rom 1

Sound Rom 2


Here is the code that does this (it uses jquery and highcharts):


    function doRom(romid) {
        var xhr = new XMLHttpRequest();
        xhr.open('GET', '/roms/pacsound/82s126.' + romid + 'm.bin', true);
        xhr.responseType = 'arraybuffer';

        xhr.onload = function (e) {
            var waves = new Uint8Array(this.response);
            var wav = [
                waves.slice(0, 32),
                waves.slice(32, 64),
                waves.slice(64, 96),
                waves.slice(96, 128),
                waves.slice(128, 160),
                waves.slice(160, 192),
                waves.slice(192, 224),
                waves.slice(224, 256)
            ];
            for (var i = 0; i < wav.length; i++) {
                var chart = Object.assign({}, chartStruct);
                chart.title.text = "Waveform " + i;
                var data = [].slice.call(wav[i]);
                chart.series = [{ data: data, showInLegend: false },
                { data: data, showInLegend: false, type: 'scatter' }
                ];
                $('#rom' + romid + 'wav' + i).highcharts(chart);
            }
        };

        xhr.send();
    }

    doRom(1);
    doRom(3);