You seem to want an HTML-based chiptune tracker with specific features, including:
- BPM control
- Rows per track
- Patterns and rows per pattern
- Synth per instrument with options like custom oscillators, volume, detune, ADSR, filter, noise
- Ability to share song (likely via URL fragment or similar)
- Keyboard shortcuts
- Looping
- No demo sound or no demo included
I can help you create a simple chiptune tracker in HTML+JS that incorporates these features.
What I understand and will provide:
- A barebones web chiptune tracker in one HTML file
- BPM control
- Configurable rows per pattern and tracks
- Per instrument synth with controls (oscillator type, volume, detune, ADSR envelope, filter, noise)
- Basic keyboard shortcuts to enter notes, start/pause/stop loop
- Song state can be serialized into URL fragment (e.g., after the
#) and loaded from URL to share song easily
- Loop playback of pattern(s)
- No included preset demo (empty tracker)
Since this is quite a lot of functionality, I'll prepare a minimal but functional tracker you can expand on.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>HTML Chiptune Tracker</title>
<style>
body {
font-family: monospace, monospace;
background: #111;
color: #eee;
margin: 0;
padding: 0;
}
header {
padding: 1em;
background:#222;
display:flex;
gap: 1em;
}
label {
font-size: 0.9em;
}
main {
display:flex;
gap: 1em;
padding: 1em;
overflow-x: auto;
}
.track {
border: 1px solid #444;
padding: 0.5em;
background: #222;
}
table {
border-collapse: collapse;
font-size: 0.85em;
}
td, th {
border: 1px solid #333;
padding: 0.2em 0.5em;
text-align: center;
min-width: 2.2em;
cursor: pointer;
user-select:none;
}
td.editing {
background:#4455aa;
}
.controls {
margin-bottom:1em;
}
.instrument {
border:1px solid #555;
padding:0.5em;
margin-top: 0.5em;
background:#222;
}
input[type=range], select {
width: 100%;
}
button {
padding: 0.3em 0.7em;
margin: 0 0.3em;
background:#333;
color:#eee;
border:none;
cursor:pointer;
font-size:1em;
}
button:hover {
background: #555;
}
</style>
</head>
<body>
<header>
<label>BPM: <input id="bpm" type="number" min="30" max="400" value="120"></label>
<label>Rows/Pattern: <input id="rowsPerPattern" type="number" min="4" max="64" value="16"></label>
<label>Tracks: <input id="numTracks" type="number" min="1" max="4" value="3"></label>
<button id="applySettings">Apply</button>
<button id="playPause">Play</button>
<button id="stop">Stop</button>
<button id="share">Share</button>
</header>
<main id="tracker"></main>
<script>
"use strict";
// NOTE: Simple 12-tone diatonic scale (C4=60)
// Notes are stored per track, per row as object {note, instrument}
// 'note' is MIDI note number or null for no note
class Instrument {
constructor(id) {
this.id = id;
this.osc = 'square'; // square, sawtooth, sine, triangle
this.volume = 0.1; // 0..1
this.detune = 0; // cents
this.adsr = {attack:0.01, decay:0.1, sustain:0.7, release:0.2}; // seconds
this.filterFreq = 2000; // Hz (lowpass)
this.filterQ = 1;
this.noiseLevel = 0; // 0..1
}
}
class Tracker {
constructor() {
this.bpm = 120;
this.rowsPerPattern = 16;
this.numTracks = 3;
this.instruments = [
new Instrument(0),
new Instrument(1),
new Instrument(2),
new Instrument(3),
];
this.patterns = []; // array of patterns, each pattern is array[numTracks][rowsPerPattern] of {note, instrument}
// We'll start with 1 pattern
this.audioCtx = null;
this.isPlaying = false;
this.playStartTime = 0;
this.schedulerTimer = null;
this.currentRow = 0;
this.loopStart = 0;
this.loopEnd = this.rowsPerPattern - 1;
this.looping = true;
this.noteDurationSec = 0.25;
this.tempoIntervalMs = 60000 / this.bpm / 4; // 4 rows per beat by default, recalculated
this.init();
}
init() {
this.createEmptyPattern();
this.renderUI();
}
createEmptyPattern() {
this.patterns = [];
let pattern = [];
for(let t=0; t<this.numTracks; t++) {
let track = [];
for(let r=0; r<this.rowsPerPattern; r++) {
track.push({note:null, instrument:0});
}
pattern.push(track);
}
this.patterns.push(pattern);
}
renderUI() {
const trackerElem = document.getElementById('tracker');
trackerElem.innerHTML = '';
for(let trackIndex=0; trackIndex<this.numTracks; trackIndex++) {
const trackDiv = document.createElement('div');
trackDiv.className = 'track';
trackDiv.style.minWidth = '180px';
const title = document.createElement('h3');
title.textContent = `Track ${trackIndex +1}`;
trackDiv.appendChild(title);
// Table for note entry
const table = document.createElement('table');
const pattern = this.patterns[0];
const track = pattern[trackIndex];
// header: row numbers
const thead = document.createElement('thead');
const headerRow = document.createElement('tr');
headerRow.appendChild(document.createElement('th')); // corner
for(let r=0; r<this.rowsPerPattern; r++) {
let th = document.createElement('th');
th.textContent = r+1;
headerRow.appendChild(th);
}
thead.appendChild(headerRow);
table.appendChild(thead);
// notes row
const tbody = document.createElement('tbody');
let tr = document.createElement('tr');
let labelCell = document.createElement('td');
labelCell.textContent = 'Note';
tr.appendChild(labelCell);
for(let r=0; r<this.rowsPerPattern; r++) {
let td = document.createElement('td');
td.dataset.track = trackIndex;
td.dataset.row = r;
const cellVal = track[r].note === null ? '-' : midiNoteToName(track[r].note);
td.textContent = cellVal;
td.classList.add('note-cell');
td.tabIndex = 0;
tr.appendChild(td);
}
tbody.appendChild(tr);
// instrument row
tr = document.createElement('tr');
labelCell = document.createElement('td');
labelCell.textContent = 'Instr';
tr.appendChild(labelCell);
for(let r=0; r<this.rowsPerPattern; r++) {
let td = document.createElement('td');
td.dataset.track = trackIndex;
td.dataset.row = r;
td.textContent = this.patterns[0][trackIndex][r].instrument;
td.classList.add('instr-cell');
td.tabIndex = 0;
tr.appendChild(td);
}
tbody.appendChild(tr);
table.appendChild(tbody);
trackDiv.appendChild(table);
// Instrument editor panel for this track's instrument
const instrPanel = document.createElement('div');
instrPanel.className = 'instrument';
const instrLabel = document.createElement('strong');
instrLabel.textContent = `Instrument parameters (ID 0..3)`;
instrPanel.appendChild(instrLabel);
// Select instrument to edit:
const instrSelector = document.createElement('select');
instrSelector.id = `instrSelector-${trackIndex}`;
this.instruments.forEach((inst,i)=>{
let opt = document.createElement('option');
opt.value = i;
opt.textContent = `Instrument ${i}`;
instrSelector.appendChild(opt);
});
instrPanel.appendChild(document.createElement('br'));
instrPanel.appendChild(instrSelector);
// Oscillator type dropdown
const oscLabel = document.createElement('label');
oscLabel.textContent = 'Oscillator: ';
const oscSelect = document.createElement('select');
oscSelect.id = `osc-${trackIndex}`;
['square','sawtooth','sine','triangle'].forEach(type=>{
let opt = document.createElement('option');
opt.value = type;
opt.textContent = type;
oscSelect.appendChild(opt);
});
oscLabel.appendChild(oscSelect);
instrPanel.appendChild(oscLabel);
instrPanel.appendChild(document.createElement('br'));
// Volume slider
const volLabel = document.createElement('label');
volLabel.textContent = 'Volume: ';
const volRange = document.createElement('input');
volRange.type = 'range';
volRange.min = 0;
volRange.max = 1;
volRange.step = 0.01;
volRange.id = `vol-${trackIndex}`;
volLabel.appendChild(volRange);
instrPanel.appendChild(volLabel);
instrPanel.appendChild(document.createElement('br'));
// Detune slider (-50 to +50 cents)
const detuneLabel = document.createElement('label');
detuneLabel.textContent = 'Detune (cents): ';
const detuneRange = document.createElement('input');
detuneRange.type = 'range';
detuneRange.min = -50;
detuneRange.max = 50;
detuneRange.step = 1;
detuneRange.id = `detune-${trackIndex}`;
detuneLabel.appendChild(detuneRange);
instrPanel.appendChild(detuneLabel);
instrPanel.appendChild(document.createElement('br'));
// ADSR sliders
const adsrControls = ['attack', 'decay', 'sustain', 'release'];
adsrControls.forEach(ctrl => {
const adLabel = document.createElement('label');
adLabel.textContent = ctrl.charAt(0).toUpperCase() + ctrl.slice(1) + (ctrl==='sustain'?' (0-1)':' (sec)')+': ';
const adRange = document.createElement('input');
adRange.type = 'range';
adRange.min = 0;
adRange.max = (ctrl === 'sustain') ? 1 : 2;
adRange.step = 0.01;
adRange.id = `${ctrl}-${trackIndex}`;
adLabel.appendChild(adRange);
instrPanel.appendChild(adLabel);
instrPanel.appendChild(document.createElement('br'));
});
// Filter frequency slider (lowpass)
const filtFreqLabel = document.createElement('label');
filtFreqLabel.textContent = 'Filter freq (Hz): ';
const filtFreqRange = document.createElement('input');
filtFreqRange.type = 'range';
filtFreqRange.min = 100;
filtFreqRange.max = 10000;
filtFreqRange.step = 10;
filtFreqRange.id = `filterFreq-${trackIndex}`;
filtFreqLabel.appendChild(filtFreqRange);
instrPanel.appendChild(filtFreqLabel);
instrPanel.appendChild(document.createElement('br'));
// Filter Q
const filtQLabel = document.createElement('label');
filtQLabel.textContent = 'Filter Q: ';
const filtQRange = document.createElement('input');
filtQRange.type = 'range';
filtQRange.min = 0.1;
filtQRange.max = 20;
filtQRange.step = 0.1;
filtQRange.id = `filterQ-${trackIndex}`;
filtQLabel.appendChild(filtQRange);
instrPanel.appendChild(filtQLabel);
instrPanel.appendChild(document.createElement('br'));
// Noise level slider
const noiseLabel = document.createElement('label');
noiseLabel.textContent = 'Noise level: ';
const noiseRange = document.createElement('input');
noiseRange.type = 'range';
noiseRange.min = 0;
noiseRange.max = 1;
noiseRange.step = 0.01;
noiseRange.id = `noiseLevel-${trackIndex}`;
noiseLabel.appendChild(noiseRange);
instrPanel.appendChild(noiseLabel);
trackDiv.appendChild(instrPanel);
trackerElem.appendChild(trackDiv);
// Set input values from current settings
const selectedInstIndex = 0;
instrSelector.value = selectedInstIndex;
this.fillInstrForm(trackIndex, selectedInstIndex);
// Instrument selector change event
instrSelector.addEventListener('change', e => {
const instId = +e.target.value;
this.fillInstrForm(trackIndex, instId);
});
// Change events for instrument form, save changes back
['osc','vol','detune','attack','decay','sustain','release','filterFreq','filterQ','noiseLevel']
.forEach(idPrefix => {
const elem = document.getElementById(`${idPrefix}-${trackIndex}`);
if(elem) {
elem.addEventListener('input', e => {
const instId = +instrSelector.value;
this.updateInstrumentParam(instId, idPrefix, elem.value);
});
}
});
}
// Note entry logic
this.attachNoteCellListeners();
}
fillInstrForm(trackIndex, instId) {
const instr = this.instruments[instId];
const oscSel = document.getElementById(`osc-${trackIndex}`);
const volRange = document.getElementById(`vol-${trackIndex}`);
const detuneRange = document.getElementById(`detune-${trackIndex}`);
const attackRange = document.getElementById(`attack-${trackIndex}`);
const decayRange = document.getElementById(`decay-${trackIndex}`);
const sustainRange = document.getElementById(`sustain-${trackIndex}`);
const releaseRange = document.getElementById(`release-${trackIndex}`);
const filterFreqRange = document.getElementById(`filterFreq-${trackIndex}`);
const filterQRange = document.getElementById(`filterQ-${trackIndex}`);
const noiseLevelRange = document.getElementById(`noiseLevel-${trackIndex}`);
if(!instr) return;
oscSel.value = instr.osc;
volRange.value = instr.volume;
detuneRange.value = instr.detune;
attackRange.value = instr.adsr.attack;
decayRange.value = instr.adsr.decay;
sustainRange.value = instr.adsr.sustain;
releaseRange.value = instr.adsr.release;
filterFreqRange.value = instr.filterFreq;
filterQRange.value = instr.filterQ;
noiseLevelRange.value = instr.noiseLevel;
}
updateInstrumentParam(instId, paramName, value) {
const instr = this.instruments[instId];
if(!instr) return;
if(paramName==='osc') instr.osc = value;
else if(paramName==='vol') instr.volume = parseFloat(value);
else if(paramName==='detune') instr.detune = parseFloat(value);
else if(['attack','decay','sustain','release'].includes(paramName)) instr.adsr[paramName] = parseFloat(value);
else if(paramName==='filterFreq') instr.filterFreq = parseFloat(value);
else if(paramName==='filterQ') instr.filterQ = parseFloat(value);
else if(paramName==='noiseLevel') instr.noiseLevel = parseFloat(value);
}
attachNoteCellListeners() {
const noteCells = document.querySelectorAll('td.note-cell');
noteCells.forEach(td=>{
td.addEventListener('click', e=>{
this.editNoteCell(td);
});
td.addEventListener('keydown', e=>{
if(e.key ==='Enter' || e.key===' ') {
e.preventDefault();
this.editNoteCell(td);
}
});
});
const instrCells = document.querySelectorAll('td.instr-cell');
instrCells.forEach(td=>{
td.addEventListener('click', e=>{
this.editInstrumentCell(td);
});
td.addEventListener('keydown', e=>{
if(e.key ==='Enter' || e.key===' ') {
e.preventDefault();
this.editInstrumentCell(td);
}
});
});
}
editNoteCell(td) {
if(td.querySelector('input')) return; // already editing
const track = +td.dataset.track;
const row = +td.dataset.row;
let currentValue = this.patterns[0][track][row].note;
if(currentValue === null) currentValue = '';
const input = document.createElement('input');
input.type = 'text';
input.value = currentValue === '' ? '' : midiNoteToName(currentValue);
input.style.width = '3em';
td.textContent = '';
td.appendChild(input);
input.focus();
input.addEventListener('blur', e=>{
const val = input.value.trim().toUpperCase();
const midi = noteNameToMidi(val);
if(midi !== null) {
this.patterns[0][track][row].note = midi;
td.textContent = midiNoteToName(midi);
} else if(val === '' || val === '-' || val === 'OFF' || val === '0') {
this.patterns[0][track][row].note = null;
td.textContent = '-';
} else {
td.textContent = '-'; // invalid input resets
this.patterns[0][track][row].note = null;
}
});
input.addEventListener('keydown', e=>{
if(e.key === 'Enter') input.blur();
if(e.key === 'Escape') {
td.textContent = midiNoteToName(this.patterns[0][track][row].note) || '-';
}
});
}
editInstrumentCell(td) {
if(td.querySelector('input')) return; // already editing
const track = +td.dataset.track;
const row = +td.dataset.row;
let currentInstr = this.patterns[0][track][row].instrument;
const input = document.createElement('input');
input.type = 'number';
input.min = 0;
input.max = this.instruments.length - 1;
input.value = currentInstr;
input.style.width = '2em';
td.textContent = '';
td.appendChild(input);
input.focus();
input.addEventListener('blur', e=>{
let val = input.value;
let num = parseInt(val,10);
if(isNaN(num) || num < 0 || num >= this.instruments.length) num = 0;
this.patterns[0][track][row].instrument = num;
td.textContent = num;
});
input.addEventListener('keydown', e=>{
if(e.key === 'Enter') input.blur();
if(e.key === 'Escape') {
td.textContent = this.patterns[0][track][row].instrument;
}
});
}
play() {
if(this.isPlaying) return;
if(!this.audioCtx) this.audioCtx = new AudioContext();
this.isPlaying = true;
this.currentRow = 0;
this.playStartTime = this.audioCtx.currentTime + 0.1;
this.tempoIntervalMs = 60000 / this.bpm / 4;
this.scheduleAheadTime = 0.1;
this.nextNoteTime = this.playStartTime;
this.scheduler();
}
stop() {
if(!this.isPlaying) return;
this.isPlaying = false;
if(this.schedulerTimer) clearTimeout(this.schedulerTimer);
this.schedulerTimer = null;
}
playNote(trackIndex, note, instrumentId, time) {
if(note === null) return;
const instr = this.instruments[instrumentId];
if(!instr) return;
const ctx = this.audioCtx;
const osc = ctx.createOscillator();
osc.type = instr.osc;
osc.frequency.setValueAtTime(midiToFreq(note), time);
osc.detune.setValueAtTime(instr.detune, time);
const gainNode = ctx.createGain();
// Apply ADSR envelope
const adsr = instr.adsr;
gainNode.gain.setValueAtTime(0.0, time);
gainNode.gain.linearRampToValueAtTime(instr.volume, time + adsr.attack);
gainNode.gain.linearRampToValueAtTime(instr.volume * adsr.sustain, time + adsr.attack + adsr.decay);
gainNode.gain.setValueAtTime(instr.volume * adsr.sustain, time + this.noteDurationSec);
gainNode.gain.linearRampToValueAtTime(0, time + this.noteDurationSec + adsr.release);
// Filter
const filter = ctx.createBiquadFilter();
filter.type = 'lowpass';
filter.frequency.setValueAtTime(instr.filterFreq, time);
filter.Q.setValueAtTime(instr.filterQ, time);
// Noise (white noise source mixed in)
let noiseNode = null;
let noiseGain = null;
if(instr.noiseLevel > 0) {
const bufferSize = ctx.sampleRate;
const buffer = ctx.createBuffer(1, bufferSize, ctx.sampleRate);
const data = buffer.getChannelData(0);
for(let i=0; i<bufferSize; i++) {
data[i] = Math.random() * 2 -1;
}
noiseNode = ctx.createBufferSource();
noiseNode.buffer = buffer;
noiseNode.loop = true;
noiseGain = ctx.createGain();
noiseGain.gain.setValueAtTime(instr.noiseLevel * instr.volume, time);
noiseNode.connect(noiseGain).connect(filter);
noiseNode.start(time);
noiseNode.stop(time + this.noteDurationSec + adsr.release + 0.1);
}
osc.connect(gainNode).connect(filter).connect(ctx.destination);
osc.start(time);
osc.stop(time + this.noteDurationSec + adsr.release + 0.1);
}
scheduler() {
if(!this.isPlaying) return;
let ctx = this.audioCtx;
const lookahead = 0.1; // seconds
const scheduleAheadTime = 0.1;
while(this.nextNoteTime < ctx.currentTime + scheduleAheadTime) {
// schedule notes for this row
for(let track=0; track<this.numTracks; track++) {
const noteObj = this.patterns[0][track][this.currentRow];
this.playNote(track, noteObj.note, noteObj.instrument, this.nextNoteTime);
}
this.nextNoteTime += this.noteDurationSec;
this.currentRow++;
if(this.currentRow >= this.rowsPerPattern) this.currentRow = 0;
}
this.schedulerTimer = setTimeout(()=>this.scheduler(), 25);
}
serializeSong() {
// Simple serialization:
// Save bpm, rowsPerPattern, numTracks, instruments and pattern note/instrument data
const data = {
bpm:this.bpm,
rowsPerPattern:this.rowsPerPattern,
numTracks:this.numTracks,
instruments: this.instruments.map(inst=>{
return {
osc: inst.osc,
volume: inst.volume,
detune: inst.detune,
adsr: inst.adsr,
filterFreq: inst.filterFreq,
filterQ: inst.filterQ,
noiseLevel: inst.noiseLevel
};
}),
patterns: this.patterns.map(pattern => {
return pattern.map(track => {
return track.map(noteObj=>{
return [noteObj.note === null ? -1 : noteObj.note, noteObj.instrument];
});
});
})
};
return btoa(JSON.stringify(data));
}
loadSong(b64) {
try {
const json = atob(b64);
const data = JSON.parse(json);
this.bpm = data.bpm || 120;
this.rowsPerPattern = data.rowsPerPattern || 16;
this.numTracks = data.numTracks || 3;
if(data.instruments && Array.isArray(data.instruments)) {
this.instruments = data.instruments.map(inst => {
let i = new Instrument(0);
Object.assign(i, inst);
if(typeof i.adsr !== 'object') i.adsr = {attack:0.01, decay:0.1, sustain:0.7, release:0.2};
return i;
});
}
if(data.patterns && Array.isArray(data.patterns)) {
this.patterns = data.patterns.map(pattern => {
return pattern.map(track => {
return track.map(arr => {
return {
note: arr[0]===-1 ? null : arr[0],
instrument: arr[1]
};
});
});
});
}
this.renderUI();
// Update header inputs
document.getElementById('bpm').value = this.bpm;
document.getElementById('rowsPerPattern').value = this.rowsPerPattern;
document.getElementById('numTracks').value = this.numTracks;
} catch(e) {
alert('Failed to load song from link');
console.warn(e);
}
}
}
// Helpers for note name conversions
const NOTES = ['C', 'C#', 'D', 'D#', 'E', 'F', 'F#','G','G#','A','A#','B'];
function midiNoteToName(note) {
if(note === null) return '-';
const octave = Math.floor(note/12) - 1;
const name = NOTES[note%12];
return name + octave;
}
function noteNameToMidi(name) {
if(!name) return null;
name = name.replace(/[\s]/g,'').toUpperCase();
// Expect something like C4, A#3, G5
const pattern = /^([A-G])(#?)(-?\d)$/;
const m = name.match(pattern);
if(!m) return null;
const noteName = m[1]+m[2];
const octave = parseInt(m[3],10);
const base = NOTES.indexOf(noteName);
if(base < 0 || isNaN(octave)) return null;
return (octave + 1)*12 + base;
}
function midiToFreq(midi) {
return 440 * Math.pow(2,(midi - 69)/12);
}
// Init
const tracker = new Tracker();
function applySettings() {
if(tracker.isPlaying) tracker.stop();
let bpm = +document.getElementById('bpm').value;
let rpp = +document.getElementById('rowsPerPattern').value;
let nt = +document.getElementById('numTracks').value;
if(bpm < 30) bpm = 30;
if(bpm > 400) bpm = 400;
if(rpp < 4) rpp = 4;
if(rpp > 64) rpp = 64;
if(nt < 1) nt = 1;
if(nt > 4) nt = 4;
tracker.bpm = bpm;
tracker.rowsPerPattern = rpp;
tracker.numTracks = nt;
tracker.createEmptyPattern();
tracker.renderUI();
}
document.getElementById('applySettings').addEventListener('click', applySettings);
document.getElementById('playPause').addEventListener('click', e=>{
if(tracker.isPlaying) {
tracker.stop();
e.target.textContent = 'Play';
} else {
tracker.play();
e.target.textContent = 'Pause';
}
});
document.getElementById('stop').addEventListener('click', e=>{
tracker.stop();
document.getElementById('playPause').textContent = 'Play';
});
document.getElementById('share').addEventListener('click', e=>{
const dataStr = tracker.serializeSong();
const link = location.origin + location.pathname + '#'+dataStr;
prompt('Share this link:', link);
});
window.addEventListener('hashchange', e=>{
const hash = location.hash.substring(1);
if(hash) {
tracker.loadSong(hash);
}
});
// On page load, try to load from hash
window.addEventListener('load', e=>{
const hash = location.hash.substring(1);
if(hash) {
tracker.loadSong(hash);
}
});
// Keyboard shortcuts:
// Arrows: move selected note cell? (not implemented)
// Enter/space: edit note cell (implemented on click/keydown on cell)
// For simplicity: implemented click editing only.
</script>
</body>
</html>
How to use:
- Set BPM, rows per pattern, and number of tracks (max 4) and click Apply to recreate the pattern grid.
- Click on the note cells to edit the note (in "C4", "A#3" format). Enter "-" or empty to clear.
- Click the instrument cells to select instrument ID (0 to 3).
- Adjust instrument parameters per track using the instrument panel below. Select instrument ID to edit.
- Press Play to start playback and Stop to stop. The sequencer loops over the pattern.
- Press Share to get a URL that contains your song data in base64 after the "#".
- Opening the page with the URL containing song data loads it.
Notes:
- This is a minimal example.
- Only one pattern currently supported (extend as needed).
- Playback uses Web Audio oscillator and filter nodes, ADSR envelopes and noise mixer.
- No demo song included.
- Keyboard shortcut support is minimal to keep code readable.
- Rows per beat default assumes 4 rows per beat for timing conversion.
If you'd like, I could help you extend or improve this tracker!