It sounds like you want to create (or find) an HTML-based chiptune music tracker that includes features like:
- BPM control
- Rows per track
- Patterns with multiple rows
- Synth parameters per instrument (custom oscillator settings, volume, detune, ADSR envelope, filter, noise)
- Ability to share songs (e.g. via URL with hash
/#)
- Keyboard shortcuts
- Looping patterns
- No demo or autoplay on load
Overview
A chiptune tracker is a kind of step sequencer specialized for retro-style music with synthesizer parameters per instrument and a pattern-based tracker UI.
Are you asking for:
- A recommendation of an existing open-source HTML chiptune tracker with these features?
- Or would you like a starting point code example to build such a tracker?
- Or maybe a minimal skeleton or outline of how to handle these features?
Existing Web Chiptune Trackers / Tools
Here are some existing web chiptune / tracker apps that you can check or fork:
- Hexachords/Orb Tracker — full-featured browser tracker, supports patterns, synths, effects, sharing URL, etc.
- BeepBox — simple but powerful chiptune tracker, with pattern editing, synth settings, sharing URL with hash, looping, keyboard shortcuts.
- Sonant-X — web-based tracker with ADSR, synth parameters, pattern editing.
- DX7 Web Editor — different synth style, but browser-based FM synth and editing.
BeepBox especially matches many of your requirements: custom synth parameters, easy sharing via URL hash, patterns and rows, BPM, shortcuts, looping, no forced demo autoplay.
If you want to build your own minimal HTML chiptune tracker piece:
Here is a rough set of points / components you would need:
Core Concepts of your tracker
- Data Model
- Global BPM (affects playback rate of rows)
- Number of rows per pattern
- Number of patterns per track
- Number of tracks (channels)
- Instruments with synth params: oscillator type (sine/square/triangle/noise/custom), volume, detune, ADSR (attack, decay, sustain, release), filter (cutoff, resonance), noise amount
- Patterns: matrix of notes/steps — per track
- Playback Engine
- Schedule note on/off with Web Audio API
- Implement ADSR envelopes with GainNodes
- Generate oscillators per instrument (OscillatorNode or custom ScriptProcessor or AudioWorklet for custom osc)
- Filter with BiquadFilterNode
- Noise with BufferSourceNode filled with white noise, modulated by volume/noise params
- UI
- Pattern editor grid — rows × tracks
- Synth editor per instrument
- Controls for BPM, patterns, looping toggle
- Keyboard shortcuts for play/pause, navigation, note entry
- Share
- Serialize song data (patterns, instruments, BPM, settings) into JSON
- Encode JSON base64 or compact string and append to URL hash:
/#<data>
- On load, parse URL hash to restore song
- No demo autoplay
- Load UI, wait for user play button press to start playback
Minimal Example Starting Point (code snippet)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Simple HTML Chiptune Tracker</title>
<style>
body { font-family: monospace; background: #222; color: #eee; }
#pattern { display: grid; grid-template-columns: repeat(4, 50px); gap: 2px; margin: 10px; }
.cell { background: #444; height: 30px; line-height: 30px; text-align: center; cursor: pointer; }
.cell.active { background: #6cf; }
</style>
</head>
<body>
<h2>Chiptune Tracker Demo</h2>
<div>
BPM: <input type="number" id="bpm" value="120" min="30" max="300" />
<button id="play">Play</button>
<button id="stop">Stop</button>
Loop: <input type="checkbox" id="loop" checked />
</div>
<div id="pattern"></div>
<script>
// Setup minimal pattern data: 4 tracks, 16 rows
const rows = 16;
const tracks = 4;
const pattern = []; // stores note info per cell
const patternDiv = document.getElementById("pattern");
patternDiv.style.gridTemplateColumns = `repeat(${tracks}, 50px)`;
for(let r=0; r<rows; r++) {
for(let t=0; t<tracks; t++) {
const cell = document.createElement("div");
cell.classList.add("cell");
cell.textContent = "-";
cell.dataset.row = r;
cell.dataset.track = t;
cell.addEventListener("click", () => {
// Toggle note on/off
if(cell.textContent === "-") {
cell.textContent = "C4"; // For simplicity, fixed note
cell.classList.add("active");
pattern[r * tracks + t] = "C4";
} else {
cell.textContent = "-";
cell.classList.remove("active");
pattern[r * tracks + t] = null;
}
});
patternDiv.appendChild(cell);
pattern.push(null);
}
}
const AudioContext = window.AudioContext || window.webkitAudioContext;
let audioCtx = null;
let isPlaying = false;
let playIndex = 0;
let timerId = null;
const bpmInput = document.getElementById("bpm");
const playBtn = document.getElementById("play");
const stopBtn = document.getElementById("stop");
const loopCheckbox = document.getElementById("loop");
function playNote(note) {
if(!audioCtx) return;
// Simple mapping for C4=261.63Hz
const freq = 261.63;
if(!note) return;
const osc = audioCtx.createOscillator();
osc.type = 'square'; // Simple chip osc, could customize
osc.frequency.value = freq;
const gainNode = audioCtx.createGain();
gainNode.gain.setValueAtTime(0.2, audioCtx.currentTime);
osc.connect(gainNode);
gainNode.connect(audioCtx.destination);
osc.start();
osc.stop(audioCtx.currentTime + 0.1);
}
function scheduleStep() {
if(!isPlaying) return;
// Play notes of current row
for(let t=0; t<tracks; t++) {
const note = pattern[playIndex * tracks + t];
if(note) {
playNote(note);
}
}
highlightRow(playIndex);
playIndex++;
if(playIndex >= rows) {
if(loopCheckbox.checked) {
playIndex = 0;
} else {
stop();
return;
}
}
// Calculate next step delay based on BPM
const interval = (60 / bpmInput.value) / 4 * 1000; // assuming 4 rows per beat
timerId = setTimeout(scheduleStep, interval);
}
function highlightRow(row) {
// Remove highlight
document.querySelectorAll(".cell").forEach(c=>c.style.border = "");
// Highlight all cells in given row
for(let t=0; t<tracks; t++) {
const idx = row * tracks + t;
patternDiv.children[idx].style.border = "1px solid #0ff";
}
}
function play() {
if(!audioCtx) audioCtx = new AudioContext();
if(isPlaying) return;
isPlaying = true;
playIndex = 0;
scheduleStep();
}
function stop() {
isPlaying = false;
clearTimeout(timerId);
highlightRow(-1);
}
playBtn.onclick = () => play();
stopBtn.onclick = () => stop();
</script>
</body>
</html>
This example features:
- 4 tracks, 16 rows pattern editor grid
- Clicking on a cell toggles a fixed note ("C4") on/off
- Square wave oscillator plays note on each active cell when playing
- BPM control adjusts timing
- Loop checkbox toggles looping
- Play/Stop buttons
- Simple highlight of current row
- No demo autoplay on load
Extending the Example
To add more chiptune features:
-
Add synth parameter editor for each instrument:
- Oscillator type selection
- Volume slider
- Detune in cents
- ADSR envelope controlling GainNode over time
- Filter node adjustable cutoff/resonance
- Noise volume overlay by mixing noise source
-
Support multiple instruments assigned per track or per note
-
Support patterns chain and multiple patterns per song
-
Serialize pattern and instruments data to JSON, compress and encode in URL hash
-
Parse URL hash on load to restore the song
-
Add keyboard shortcuts (space Play/Pause, arrows to navigate, keys for notes)
If you'd like, I can help you with code snippets for specific features (e.g. ADSR envelope implementation or URL share function) or recommend a project to fork or customize.
Please clarify if you want me to create a more advanced tracker demo or help with a particular technical detail.