It looks like you want to create (or find) an HTML-based chiptune tracker with features like:
- BPM control
- Multiple tracks
- Patterns per track
- Rows per pattern
- Synth per instrument with:
- Custom oscillator settings
- Volume control
- Detune
- ADSR envelope
- Filter and noise controls
- Ability to share songs (probably encoding in URL or via shortcut keys)
- Looping
- No demo or extra fluff — a clean tracker interface
Are you asking for:
- A recommendation of an existing tool?
- A lightweight open-source project?
- Or a minimal example / boilerplate HTML + JS code to build such a tracker?
Quick Recommendations for Existing Tools
Several online chiptune trackers support many of these features:
-
BeepBox — very popular, browser based. It offers patterns, tracks, synth instruments, ADSR, filters, noise, volume, detune, BPM. It has URL sharing and looping.
- Pros: Full featured, intuitive, no installation, URL share.
- Cons: Some limitations on oscillator customization.
-
Jsfxr / jsfx (sound effect synth) — simpler, less tracker / pattern focused.
-
WebAudio Tracker / Lofi.js — code bases you can extend.
-
FamiTracker — Windows native heavy duty tracker but no HTML version.
If you want a custom minimal HTML + JS chiptune tracker starter
Here is a very minimal outline you could build on:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Minimal Chiptune Tracker</title>
<style>
body { font-family: monospace; background: #111; color: #eee; }
.tracker { display: grid; grid-template-columns: repeat(4, 1fr); }
input, select { width: 100%; margin: 2px 0; background: #222; color: #eee; border: none; }
</style>
</head>
<body>
<h1>Minimal Chiptune Tracker</h1>
<label>BPM: <input type="number" id="bpm" min="20" max="300" value="120"></label><br>
<div class="tracker" id="tracker"></div>
<button id="play">▶ Play</button>
<button id="stop">■ Stop</button>
<button id="loopToggle">Loop: Off</button>
<button id="share">Share URL</button>
<script>
// Simple tracker parameters
const BPM = document.getElementById('bpm');
const trackerDiv = document.getElementById('tracker');
const playBtn = document.getElementById('play');
const stopBtn = document.getElementById('stop');
const loopBtn = document.getElementById('loopToggle');
const shareBtn = document.getElementById('share');
const tracks = 4;
const patternLength = 16; // rows per pattern
// Store note data: for simplicity just note freq (or 0 = rest)
let patterns = [];
for(let t=0; t < tracks; t++){
let pattern = new Array(patternLength).fill(0);
patterns.push(pattern);
}
// Create tracker UI input grid
for(let t=0; t<tracks; t++){
let col = document.createElement('div');
col.style.border = "1px solid #444";
for(let r=0; r<patternLength; r++){
let inp = document.createElement('input');
inp.type = "text";
inp.maxLength = 3;
inp.size = 3;
inp.placeholder = "---";
inp.dataset.track = t;
inp.dataset.row = r;
inp.addEventListener('input', e => {
let val = e.target.value.toUpperCase();
// Simple note parsing - accept notes C D E F G A B plus octave 4-6
if(/^([CDEFGAB][4-6])$/.test(val)){
patterns[t][r] = val;
} else if(val === "" || val === "---"){
patterns[t][r] = 0;
} else {
// invalid, clear immediately
patterns[t][r] = 0;
e.target.value = "";
}
});
col.appendChild(inp);
}
trackerDiv.appendChild(col);
}
// Audio context setup
const AudioContext = window.AudioContext || window.webkitAudioContext;
const ac = new AudioContext();
function noteToFreq(note){
// Convert note string like C4, D#5 etc to freq
const notes = {C:0, 'C#':1, D:2, 'D#':3, E:4, F:5, 'F#':6, G:7, 'G#':8, A:9, 'A#':10, B:11};
// For simplicity only accept natural notes - skip sharps for now
if(!note || note.length<2) return 0;
let name = note[0];
let octave = parseInt(note[1]);
if (!(name in notes) && !(name + "#" in notes)) return 0;
let semitone = notes[name] !== undefined ? notes[name] : notes[name + "#"];
return 440 * Math.pow(2, (semitone - 9 + (octave - 4) * 12) / 12);
}
// Playback variables
let playing = false;
let timerId = null;
let currentRow = 0;
let loop = false;
function playNote(freq, startTime, duration){
if(freq === 0) return; // rest
let osc = ac.createOscillator();
let gainNode = ac.createGain();
osc.type = 'square'; // chiptune sound
osc.frequency.setValueAtTime(freq, startTime);
gainNode.gain.setValueAtTime(0.2, startTime);
gainNode.gain.exponentialRampToValueAtTime(0.001, startTime + duration);
osc.connect(gainNode);
gainNode.connect(ac.destination);
osc.start(startTime);
osc.stop(startTime + duration + 0.05);
}
function playStep(){
let startTime = ac.currentTime;
let beatDuration = 60 / BPM.value / 4; // 16th notes (4 steps per beat)
for(let t=0; t<tracks; t++){
let note = patterns[t][currentRow];
let freq = note === 0 ? 0 : noteToFreq(note);
playNote(freq, startTime, beatDuration*0.9);
}
currentRow++;
if(currentRow >= patternLength){
if(loop) currentRow = 0;
else {
stopPlaying();
return; // stop timer
}
}
}
function startPlaying(){
if(playing) return;
playing = true;
currentRow = 0;
const interval = (60 / BPM.value / 4) * 1000;
playStep();
timerId = setInterval(playStep, interval);
}
function stopPlaying(){
if(!playing) return;
playing = false;
clearInterval(timerId);
}
playBtn.onclick = () => {
ac.resume();
startPlaying();
};
stopBtn.onclick = () => {
stopPlaying();
};
loopBtn.onclick = () => {
loop = !loop;
loopBtn.textContent = loop ? "Loop: On" : "Loop: Off";
};
// Share function: encode pattern and BPM to URL hash
function serialize(){
// flatten patterns to a string with some separator
// pattern per track separated by |, notes separated by comma
// use "---" for rest
let data = {
bpm: BPM.value,
patterns: patterns.map(p => p.map(n => n === 0 ? "---" : n).join(",")).join("|")
};
return btoa(JSON.stringify(data));
}
function deserialize(str){
try{
let data = JSON.parse(atob(str));
BPM.value = data.bpm || 120;
let pats = data.patterns.split("|");
for(let t=0; t < pats.length; t++){
let notes = pats[t].split(",");
for(let r=0; r < notes.length; r++){
let n = notes[r] === "---" ? 0 : notes[r];
patterns[t][r] = n;
// Update UI
let col = trackerDiv.children[t];
let inp = col.children[r];
inp.value = (n===0) ? "" : n;
}
}
} catch(e){
console.log("Failed to load pattern", e);
}
}
shareBtn.onclick = () => {
let serialized = serialize();
let url = location.origin + location.pathname + "#/" + serialized;
navigator.clipboard.writeText(url).then(() => alert("URL copied!"));
};
// On load, check URL hash
window.addEventListener("load", () => {
if(location.hash.startsWith("#/")){
let data = location.hash.slice(2);
deserialize(data);
}
});
</script>
</body>
</html>
Explanation
- 4 tracks with 16 rows pattern each
- Inputs you can type notes like
C4, D5, etc.
- Simple square wave oscillator per note on each track
- BPM adjustable
- Play / Stop buttons
- Loop toggle button
- Share button copies a URL encoding the song state as base64 in URL hash (
#/ prefix)
- On page load, if URL hash contains data, it loads the pattern & BPM
Next Steps if you want more features:
- Add per-instrument synth options (oscillator type, detune)
- Implement ADSR envelopes for each instrument
- Add filter and noise options
- More complex pattern sequencing
- Keyboard shortcuts for navigating the tracker and inserting notes
- UI improvements
Summary
- For a full-blown tracker, BeepBox is your best bet right now on web.
- If you want a custom lightweight tracker, the above minimal example can be expanded.
- You can add more advanced synth features with Web Audio API oscillator detune, ADSR automation, and BiquadFilterNode.
- Sharing via URL hash is done with base64 encoded JSON state.
Feel free to ask for adding specific parts like ADSR envelopes, filter, or custom oscillator controls!