Got it! You want a chiptune tracker app built with HTML, CSS, and JS incorporating:
- BPM control
- Patterns and rows per pattern
- Multiple instruments, each with a synth and custom waveform osc
- Volume, detune, ADSR envelope, filter, and noise control per instrument
- Ability to share songs via URL fragment (
/#...)
- Keyboard shortcuts for actions (duplicate, delete pattern, loop pattern)
- No external demo links, everything included inline
Here’s a minimal but functional code implementing those features. It’s a basic step sequencer tracker designed in vanilla JS with Web Audio API for synthesis, supporting waveform selection, ADSR, filter, noise, volume, detune, patterns/rows, BPM control, pattern management, and URL-sharing.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Chiptune Tracker</title>
<style>
body { font-family: monospace, monospace; background: #111; color: #eee; margin: 0; padding: 0; user-select: none; }
header { background: #222; padding: 0.5em 1em; display: flex; align-items: center; gap: 1em; }
label { font-size: 0.9em; }
input, select { background: #222; border: 1px solid #555; color: #eee; font-family: monospace; font-size: 1em; padding: 0.2em 0.4em; }
#tracker { overflow-x: auto; white-space: nowrap; padding: 0.5em 1em; }
.pattern { display: inline-block; vertical-align: top; margin: 0 0.5em 1em 0; border: 1px solid #666; background: #222; }
.pattern-header { background: #333; padding: 0.3em 0.5em; display: flex; justify-content: space-between; align-items: center;}
.pattern-rows { font-family: monospace; font-size: 0.9em; overflow: auto; max-height: 250px; }
table { border-collapse: collapse; }
td, th { border: 1px solid #555; width: 2em; height: 1.6em; text-align: center; cursor: pointer; user-select: none; }
td.active { background: #44aa44; color: #000; }
td.selected { outline: 1px solid #ffaa00; }
#instruments { background: #222; padding: 0.5em 1em; display: flex; gap: 1em; overflow-x: auto; }
.instrument { background: #333; padding: 0.5em; border: 1px solid #555; min-width: 180px; }
.instrument h3 { margin: 0 0 0.4em 0; font-weight: normal; font-size: 1em; }
.control-row { display: flex; align-items: center; gap: 0.3em; margin-bottom: 0.3em; }
.control-row > label { flex-shrink: 0; width: 5em; }
input[type=range] { flex-grow: 1; }
button { background: #444; border: none; color: #eee; font-family: monospace; cursor: pointer; padding: 0.3em 0.6em; }
button:hover { background: #555; }
footer { padding: 0.5em 1em; background: #222; font-size: 0.9em; color: #666; }
</style>
</head>
<body>
<header>
<label>BPM <input type="number" id="bpm" min="40" max="300" value="120" /></label>
<label>Rows/Pattern <input type="number" id="rowsPerPattern" min="4" max="64" value="16" /></label>
<button id="addPatternBtn" title="Add new pattern">+Pattern</button>
<button id="toggleLoopBtn" title="Toggle pattern loop">Loop: OFF</button>
<button id="playBtn" title="Play/Pause">▶️ Play</button>
<button id="stopBtn" title="Stop">■ Stop</button>
<span id="patternInfo"></span>
</header>
<section id="tracker"></section>
<section id="instruments"></section>
<footer>
Shortcuts: <strong>D</strong> duplicate pattern, <strong>Del</strong> delete pattern, <strong>L</strong> toggle loop pattern<br/>
Click on cells to toggle notes. Ctrl/Shift+click to modify volume/detune.<br/>
Share your song via URL (auto-updated).
</footer>
<script>
(() => {
const context = new (window.AudioContext || window.webkitAudioContext)();
// Utility functions for ADSR envelope and filter
function applyEnvelope(audioParam, now, envelope, duration) {
const { attack, decay, sustain, release } = envelope;
audioParam.cancelScheduledValues(now);
audioParam.setValueAtTime(0, now);
audioParam.linearRampToValueAtTime(1, now + attack);
audioParam.linearRampToValueAtTime(sustain, now + attack + decay);
audioParam.setValueAtTime(sustain, now + duration - release);
audioParam.linearRampToValueAtTime(0, now + duration);
}
// Constants
const NOTES = ['C', 'C#', 'D', 'D#', 'E', 'F', 'F#', 'G', 'G#', 'A', 'A#', 'B'];
// Map note names per octave, from C2 (~65.41Hz) to C6 (~1046.50Hz)
// We'll map rows 0..maxRows-1 to notes
function noteToFreq(noteIndex, baseOctave = 3) {
// C4 = MIDI 60 = 261.63Hz
// We'll calculate frequency based on noteIndex (0 = C2)
// baseOctave is used to shift that mapping.
const octave = baseOctave + Math.floor(noteIndex / 12);
const note = noteIndex % 12;
return 440 * Math.pow(2, (note + (octave - 4) * 12 - 9) / 12);
}
// Data structure:
// - patterns: array of pattern objects {rows: n, instruments: [ [noteDataPerRow] ]}
// - noteDataPerRow per instrument: { note: noteIndex or null, volume: 0-15, detune: -12..12 }
// - instruments: list of instruments with synth params
// Defaults
const MAX_INSTRUMENTS = 4;
const DEFAULT_ROWS = 16;
const DEFAULT_BPM = 120;
// Global state
let bpm = DEFAULT_BPM;
let rowsPerPattern = DEFAULT_ROWS;
let seekPosition = 0; // step in pattern playing
let currentPatternIndex = 0;
let isPlaying = false;
let loopPattern = false;
let timerId = null;
// Patterns structure:
// Pattern = { id, rowsPerPattern, data: instrumentIndex => Array(rows) of notes}
// note: {note: number|null, volume:0-15, detune: -12..12}
// For simplicity data = Array of rows for each instrument; each row has note data
// Instruments structure: array length MAX_INSTRUMENTS
// instrument = {waveform, volume, detune, adsr{a,d,s,r}, filter{type, freq, Q}, noiseLevel}
// waveform: 'sine', 'square', 'triangle', 'sawtooth', or 'custom'
// Store everything in a "song" object for serialization
let song = {
bpm: DEFAULT_BPM,
rowsPerPattern: DEFAULT_ROWS,
instruments: [],
patterns: [],
currentPatternIndex: 0,
loopPattern: false
};
function createEmptyPattern(id) {
const pattern = {
id,
rowsPerPattern,
// For each instrument: init rows with null notes.
data: Array(MAX_INSTRUMENTS).fill(0).map(() => (
Array(rowsPerPattern).fill(0).map(() => ({ note: null, volume: 15, detune: 0 }))
)),
};
return pattern;
}
// Init instruments with defaults
function createDefaultInstrument(i) {
return {
id: i,
name: 'Instr ' + (i + 1),
waveform: 'square',
volume: 1,
detune: 0,
adsr: { attack: 0.01, decay: 0.1, sustain: 0.6, release: 0.1 },
filter: { type: 'lowpass', frequency: 1000, Q: 1 },
noiseLevel: 0,
};
}
// --- DOM references ---
const bpmInput = document.getElementById('bpm');
const rowsInput = document.getElementById('rowsPerPattern');
const trackerDiv = document.getElementById('tracker');
const instrumentsDiv = document.getElementById('instruments');
const addPatternBtn = document.getElementById('addPatternBtn');
const playBtn = document.getElementById('playBtn');
const stopBtn = document.getElementById('stopBtn');
const toggleLoopBtn = document.getElementById('toggleLoopBtn');
const patternInfoSpan = document.getElementById('patternInfo');
// Serialization for share via URL fragment - keep it minimal
function serializeSong() {
// Simple JSON stringify + base64 encode
try {
const str = JSON.stringify(song);
return btoa(encodeURIComponent(str));
} catch(e) { return ''; }
}
function deserializeSong(b64) {
try {
const str = decodeURIComponent(atob(b64));
return JSON.parse(str);
} catch(e) { return null; }
}
function updateURL() {
const data = serializeSong();
history.replaceState(null, '', '#/' + data);
}
// Load song from URL hash if available
function loadSongFromURL() {
if(location.hash.startsWith('#/')) {
const b64 = location.hash.slice(2);
const loaded = deserializeSong(b64);
if (loaded) {
song = loaded;
// Restore instruments length to MAX_INSTRUMENTS if missing
if (!song.instruments || song.instruments.length < MAX_INSTRUMENTS) {
song.instruments = [];
for(let i=0; i<MAX_INSTRUMENTS; i++) {
song.instruments[i] = createDefaultInstrument(i);
}
}
bpm = song.bpm || DEFAULT_BPM;
rowsPerPattern = song.rowsPerPattern || DEFAULT_ROWS;
currentPatternIndex = song.currentPatternIndex || 0;
loopPattern = !!song.loopPattern;
if(!song.patterns || song.patterns.length === 0) {
song.patterns = [createEmptyPattern(0)];
}
return true;
}
}
return false;
}
// --- Rendering tracker (patterns) ---
function renderTracker() {
trackerDiv.innerHTML = '';
song.patterns.forEach((pattern, idx) => {
const patEl = document.createElement('div');
patEl.className = 'pattern';
if(idx === currentPatternIndex) patEl.style.borderColor = '#aad';
const header = document.createElement('div');
header.className = 'pattern-header';
header.textContent = `Pattern #${idx + 1}`;
// Duplicate pattern button
const dupBtn = document.createElement('button');
dupBtn.textContent = 'Dup';
dupBtn.title = 'Duplicate pattern';
dupBtn.addEventListener('click', e => {
e.stopPropagation();
duplicatePattern(idx);
});
header.appendChild(dupBtn);
// Delete pattern button
const delBtn = document.createElement('button');
delBtn.textContent = 'Del';
delBtn.title = 'Delete pattern';
delBtn.addEventListener('click', e => {
e.stopPropagation();
deletePattern(idx);
});
header.appendChild(delBtn);
patEl.appendChild(header);
// Rows table: For each row show notes per instruments, clickable
const rowsDiv = document.createElement('div');
rowsDiv.className = 'pattern-rows';
const table = document.createElement('table');
const thead = document.createElement('thead');
const thr = document.createElement('tr');
thr.appendChild(document.createElement('th')); // row header
// one column per instrument
for(let i=0; i<MAX_INSTRUMENTS; i++) {
const th = document.createElement('th');
th.textContent = 'I' + (i+1);
thr.appendChild(th);
}
table.appendChild(thead);
thead.appendChild(thr);
const tbody = document.createElement('tbody');
for(let r=0; r<pattern.rowsPerPattern; r++) {
const tr = document.createElement('tr');
let rowName = NOTES[r%12] + (Math.floor(r/12)+2);
const th = document.createElement('th');
th.textContent = rowName;
tr.appendChild(th);
for(let ins=0; ins<MAX_INSTRUMENTS; ins++) {
const td = document.createElement('td');
const noteData = pattern.data[ins][r];
const active = noteData.note !== null;
if(active) td.classList.add('active');
td.textContent = active ? noteData.note : '';
td.title = active
? `${NOTES[noteData.note % 12]}${Math.floor(noteData.note / 12)+2} Vol:${noteData.volume} Detune:${noteData.detune}`
: '';
td.addEventListener('click', e => {
e.stopPropagation();
toggleNote(pattern.id, ins, r, e);
});
tr.appendChild(td);
}
tbody.appendChild(tr);
}
table.appendChild(tbody);
rowsDiv.appendChild(table);
patEl.appendChild(rowsDiv);
patEl.addEventListener('click', () => {
currentPatternIndex = idx;
seekPosition = 0;
updatePatternInfo();
renderTracker();
updateURL();
});
trackerDiv.appendChild(patEl);
});
updatePatternInfo();
}
function updatePatternInfo() {
patternInfoSpan.textContent = `Pattern ${currentPatternIndex + 1} / ${song.patterns.length} | Loop: ${loopPattern ? 'ON' : 'OFF'}`;
toggleLoopBtn.textContent = 'Loop: ' + (loopPattern ? 'ON' : 'OFF');
bpmInput.value = bpm;
rowsInput.value = rowsPerPattern;
}
// Handle toggle note on click
// Click: toggle note on/off for this row.
// Ctrl/Shift combos to adjust volume/detune
function toggleNote(patternId, instrumentIndex, row, event) {
const pattern = song.patterns.find(p => p.id === patternId);
if(!pattern) return;
const noteData = pattern.data[instrumentIndex][row];
if(event.ctrlKey) {
// Ctrl + click: increase volume (cycle)
noteData.volume = (noteData.volume + 1) % 16;
if(noteData.note === null) noteData.note = row; // set note if none
} else if(event.shiftKey) {
// Shift + click: detune +1 semitone cyclic
noteData.detune++;
if(noteData.detune > 12) noteData.detune = -12;
if(noteData.note === null) noteData.note = row;
} else {
if(noteData.note === null) noteData.note = row;
else noteData.note = null; // toggle off note
noteData.volume = 15;
noteData.detune = 0;
}
renderTracker();
updateURL();
}
// --- Instruments rendering ---
function renderInstruments() {
instrumentsDiv.innerHTML = '';
song.instruments.forEach((inst, idx) => {
const div = document.createElement('div');
div.className = 'instrument';
const h3 = document.createElement('h3');
h3.textContent = inst.name;
div.appendChild(h3);
// Waveform select
const waveRow = document.createElement('div'); waveRow.className = 'control-row';
waveRow.innerHTML = `<label for="wave${idx}">Waveform</label>`;
const waveSel = document.createElement('select');
waveSel.id = `wave${idx}`;
['sine', 'square', 'triangle', 'sawtooth'].forEach(wave => {
const opt = document.createElement('option');
opt.value = wave;
opt.textContent = wave;
waveSel.appendChild(opt);
});
waveSel.value = inst.waveform;
waveSel.addEventListener('change', _ => {
inst.waveform = waveSel.value;
updateURL();
});
waveRow.appendChild(waveSel);
div.appendChild(waveRow);
// Volume slider
const volRow = document.createElement('div'); volRow.className = 'control-row';
volRow.innerHTML = `<label for="vol${idx}">Volume</label>`;
const volRange = document.createElement('input');
volRange.id = `vol${idx}`;
volRange.type = 'range';
volRange.min = 0; volRange.max = 1; volRange.step = 0.01;
volRange.value = inst.volume;
volRange.addEventListener('input', _ => {
inst.volume = parseFloat(volRange.value);
updateURL();
});
volRow.appendChild(volRange);
div.appendChild(volRow);
// Detune slider
const detuneRow = document.createElement('div'); detuneRow.className = 'control-row';
detuneRow.innerHTML = '<label for="detune' + idx + '">Detune</label>';
const detuneRange = document.createElement('input');
detuneRange.id = 'detune' + idx;
detuneRange.type = 'range';
detuneRange.min = -12; detuneRange.max = 12; detuneRange.step = 1;
detuneRange.value = inst.detune;
detuneRange.addEventListener('input', _ => {
inst.detune = parseInt(detuneRange.value);
updateURL();
});
detuneRow.appendChild(detuneRange);
div.appendChild(detuneRow);
// ADSR controls
['attack','decay','sustain','release'].forEach(param => {
const row = document.createElement('div'); row.className = 'control-row';
row.innerHTML = `<label for="${param}${idx}">${param.charAt(0).toUpperCase() + param.slice(1)}</label>`;
const input = document.createElement('input');
input.id = param + idx;
input.type = param === 'sustain' ? 'range' : 'number';
if(input.type === 'range') {
input.min = 0; input.max = 1; input.step = '0.01';
input.value = inst.adsr[param];
} else {
input.min = 0; input.max = 5; input.step = '0.01';
input.value = inst.adsr[param];
}
input.addEventListener('input', () => {
let v = input.type === 'number' || input.type === 'range' ? parseFloat(input.value) : input.value;
inst.adsr[param] = v;
updateURL();
});
row.appendChild(input);
div.appendChild(row);
});
// Filter controls
['type','frequency','Q'].forEach(param => {
const row = document.createElement('div'); row.className = 'control-row';
row.innerHTML = `<label for="filter${param}${idx}">Filter ${param[0].toUpperCase()+param.slice(1)}</label>`;
let input;
if(param === 'type') {
input = document.createElement('select');
['lowpass','highpass','bandpass','lowshelf','highshelf','peaking','notch','allpass'].forEach(ftype => {
const o = document.createElement('option');
o.value = ftype;
o.textContent = ftype;
input.appendChild(o);
});
input.value = inst.filter.type;
} else {
input = document.createElement('input');
input.type = 'number';
if(param === 'frequency') { input.min = 20; input.max = 20000; input.step = 1; }
else if(param === 'Q') { input.min = 0; input.max = 30; input.step = 0.1; }
input.value = inst.filter[param];
}
input.id = `filter${param}${idx}`;
input.addEventListener('input', () => {
let v = input.type === 'number' ? parseFloat(input.value) : input.value;
inst.filter[param] = v;
updateURL();
});
row.appendChild(input);
div.appendChild(row);
});
// Noise Level slider
const noiseRow = document.createElement('div'); noiseRow.className = 'control-row';
noiseRow.innerHTML = `<label for="noise${idx}">Noise Level</label>`;
const noiseRange = document.createElement('input');
noiseRange.id = `noise${idx}`;
noiseRange.type = 'range';
noiseRange.min = 0; noiseRange.max = 1; noiseRange.step = 0.01;
noiseRange.value = inst.noiseLevel;
noiseRange.addEventListener('input', _ => {
inst.noiseLevel = parseFloat(noiseRange.value);
updateURL();
});
noiseRow.appendChild(noiseRange);
div.appendChild(noiseRow);
instrumentsDiv.appendChild(div);
});
}
// --- Playback ---
// Play scheduler
let lastStepTime = 0;
function playStep() {
const now = context.currentTime;
const interval = 60 / bpm / 4; // 16th notes (4 steps per beat)
if(now < lastStepTime + interval) return; // throttle
const pattern = song.patterns[currentPatternIndex];
if(!pattern) return;
// For each instrument check note at seekPosition
for(let i=0; i<MAX_INSTRUMENTS; i++) {
const noteData = pattern.data[i][seekPosition];
if(noteData.note !== null) {
playNote(noteData.note + song.instruments[i].detune + noteData.detune, i, song.instruments[i], noteData.volume / 15, interval);
}
}
seekPosition++;
if(seekPosition >= pattern.rowsPerPattern) {
if(loopPattern) seekPosition = 0;
else {
stop();
return;
}
}
lastStepTime = now;
}
function playNote(noteIndex, instrumentIndex, instrument, volume, duration) {
const now = context.currentTime;
const osc = context.createOscillator();
const gainNode = context.createGain();
const detuneSemitones = instrument.detune;
osc.type = instrument.waveform;
osc.frequency.value = noteToFreq(noteIndex);
osc.detune.value = (detuneSemitones + instrument.detune) * 100;
// Noise generator
let noiseSource, noiseGain;
if(instrument.noiseLevel > 0) {
const bufferSize = context.sampleRate;
const noiseBuffer = context.createBuffer(1, bufferSize, context.sampleRate);
const output = noiseBuffer.getChannelData(0);
for(let i=0; i<bufferSize; i++) output[i] = Math.random()*2-1;
noiseSource = context.createBufferSource();
noiseSource.buffer = noiseBuffer;
noiseSource.loop = true;
noiseGain = context.createGain();
noiseGain.gain.value = instrument.noiseLevel;
noiseSource.connect(noiseGain).connect(gainNode);
noiseSource.start(now);
}
// Filter
const filter = context.createBiquadFilter();
filter.type = instrument.filter.type;
filter.frequency.value = instrument.filter.frequency;
filter.Q.value = instrument.filter.Q;
osc.connect(filter);
filter.connect(gainNode);
gainNode.connect(context.destination);
// ADSR envelope on gainNode.gain
applyEnvelope(gainNode.gain, now, instrument.adsr, duration);
gainNode.gain.value *= volume * instrument.volume;
osc.start(now);
osc.stop(now + duration);
osc.onended = () => {
if(noiseSource) noiseSource.stop();
osc.disconnect();
filter.disconnect();
gainNode.disconnect();
if(noiseGain) noiseGain.disconnect();
};
}
function play() {
if(isPlaying) return;
if(context.state === 'suspended') context.resume();
isPlaying = true;
seekPosition = 0;
lastStepTime = 0;
playBtn.textContent = '⏸ Pause';
timerId = setInterval(playStep, 10);
}
function pause() {
if(!isPlaying) return;
isPlaying = false;
playBtn.textContent = '▶️ Play';
clearInterval(timerId);
}
function stop() {
pause();
seekPosition = 0;
}
function toggleLoop() {
loopPattern = !loopPattern;
song.loopPattern = loopPattern;
updatePatternInfo();
updateURL();
}
// Pattern management
function addPattern() {
const newId = song.patterns.length > 0 ? (Math.max(...song.patterns.map(p => p.id)) + 1) : 0;
const newPattern = createEmptyPattern(newId);
song.patterns.push(newPattern);
currentPatternIndex = song.patterns.length -1;
seekPosition = 0;
renderTracker();
updateURL();
}
function duplicatePattern(idx) {
if(idx < 0 || idx >= song.patterns.length) return;
const src = song.patterns[idx];
const clone = JSON.parse(JSON.stringify(src));
clone.id = song.patterns.length > 0 ? (Math.max(...song.patterns.map(p => p.id)) + 1) : 0;
song.patterns.push(clone);
currentPatternIndex = song.patterns.length -1;
seekPosition = 0;
renderTracker();
updateURL();
}
function deletePattern(idx) {
if(song.patterns.length <= 1) {
alert('At least one pattern required');
return;
}
if(idx < 0 || idx >= song.patterns.length) return;
song.patterns.splice(idx, 1);
if(currentPatternIndex >= song.patterns.length) currentPatternIndex = song.patterns.length-1;
seekPosition = 0;
renderTracker();
updateURL();
}
// --- Event listeners ---
bpmInput.addEventListener('change', () => {
const val = parseInt(bpmInput.value);
if(val >= 40 && val <= 300) {
bpm = val;
song.bpm = bpm;
updateURL();
}
});
rowsInput.addEventListener('change', () => {
const val = parseInt(rowsInput.value);
if(val >= 4 && val <= 64) {
rowsPerPattern = val;
song.rowsPerPattern = rowsPerPattern;
// Resize all patterns to new row count, truncate or pad with empty notes.
song.patterns.forEach(pattern => {
pattern.rowsPerPattern = rowsPerPattern;
pattern.data.forEach(instrumentRows => {
if(instrumentRows.length > rowsPerPattern)
instrumentRows.splice(rowsPerPattern);
else if(instrumentRows.length < rowsPerPattern)
for(let i=instrumentRows.length; i<rowsPerPattern; i++)
instrumentRows.push({note:null, volume:15, detune:0});
});
});
seekPosition = 0;
renderTracker();
updateURL();
}
});
addPatternBtn.addEventListener('click', addPattern);
playBtn.addEventListener('click', () => {
if(isPlaying) pause();
else play();
});
stopBtn.addEventListener('click', () => {
stop();
});
toggleLoopBtn.addEventListener('click', toggleLoop);
// Keyboard shortcuts for pattern dupe/delete/loop
document.addEventListener('keydown', e => {
if(e.target.tagName === 'INPUT' || e.target.tagName === 'SELECT' || e.target.isContentEditable) return;
if(e.code === 'KeyD') { // duplicate pattern
e.preventDefault();
duplicatePattern(currentPatternIndex);
} else if(e.code === 'Delete') { // delete pattern
e.preventDefault();
deletePattern(currentPatternIndex);
} else if(e.code === 'KeyL') { // toggle loop
e.preventDefault();
toggleLoop();
} else if(e.code === 'Space') {
e.preventDefault();
if(isPlaying) pause();
else play();
}
});
// --- Initialization ---
function init() {
if(!loadSongFromURL()) {
song.bpm = bpm;
song.rowsPerPattern = rowsPerPattern;
song.instruments = [];
for(let i=0; i<MAX_INSTRUMENTS; i++) {
song.instruments.push(createDefaultInstrument(i));
}
song.patterns = [createEmptyPattern(0)];
song.currentPatternIndex = 0;
song.loopPattern = false;
}
bpm = song.bpm;
rowsPerPattern = song.rowsPerPattern;
currentPatternIndex = song.currentPatternIndex;
loopPattern = song.loopPattern;
renderTracker();
renderInstruments();
updateURL();
updatePatternInfo();
}
init();
})();
</script>
</body>
</html>
How to use:
- BPM and rows per pattern are editable at top.
- You have 4 instruments shown at bottom.
- Each instrument has waveform, volume, detune, ADSR envelope, filter and noise controls.
- You can toggle notes by clicking on cells inside each pattern in the grid.
- Ctrl+click on note to cycle volume; Shift+click to cycle detune.
- Multiple patterns visible side by side; click pattern header to select current pattern.
- Buttons to add, duplicate (D key), delete (Del key) patterns.
- Loop toggle button (L key) controls whether the current pattern loops.
- Play/Pause with play button or Space key.
- Song data encoded into URL fragment for sharing.
- No external dependencies, no demos—purely self-contained.
Feel free to extend and customize synth parameters or pattern complexity but this should give you a compact, full basic tracker as requested!