html chiptune tracker bpm rows per tracks patterns rows per pattern osc volume adsr…
- User
html chiptune tracker bpm rows per tracks patterns rows per pattern osc volume adsr filter noise share "/#" no demo
- Assistant
html chiptune tracker bpm rows per tracks patterns rows per pattern osc volume adsr filter noise share "/#" no demo
It sounds like you want to create or get an HTML-based chiptune tracker with features such as:
A tracker is a type of music sequencer software that arranges music patterns in rows and channels (tracks) — often used for chiptune (8-bit style) music.
example.com/#someEncodedData.I can guide you to a lightweight custom HTML/JS chiptune tracker skeleton. Alternatively, point you toward existing open source projects that fit your criteria with simple adjustment.
Below is an ultra minimal skeleton that shows basic UI controls for BPM, rows, oscillator volume, with place-holders for patterns, ADSR, etc. It does not include audio, just UI scaffolding.
You can extend this with actual sound (like WebAudio API) later.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Mini Chiptune Tracker</title>
<style>
body { font-family: monospace; background: #222; color: #eee; margin: 1rem; }
label { display: block; margin: 0.5rem 0 0.2rem; }
input[type=range] { width: 100%; }
textarea { width: 100%; height: 150px; background: #111; color:#0f0; font-family: monospace; }
</style>
</head>
<body>
<h1>Mini Chiptune Tracker (UI only)</h1>
<label>BPM: <span id="bpmVal">120</span></label>
<input type="range" id="bpm" min="30" max="300" value="120" />
<label>Rows per Pattern: <span id="rowsVal">64</span></label>
<input type="range" id="rows" min="8" max="128" value="64" />
<label>Oscillator Volume: <span id="volVal">0.5</span></label>
<input type="range" id="volume" min="0" max="1" step="0.01" value="0.5" />
<label>ADSR Envelope (Attack, Decay, Sustain, Release)</label>
<div>
A: <input type="range" id="attack" min="0" max="1" step="0.01" value="0.1" />
D: <input type="range" id="decay" min="0" max="1" step="0.01" value="0.1" />
S: <input type="range" id="sustain" min="0" max="1" step="0.01" value="0.8" />
R: <input type="range" id="release" min="0" max="1" step="0.01" value="0.2" />
</div>
<label>Filter Cutoff: <span id="filterVal">1000</span> Hz</label>
<input type="range" id="filter" min="100" max="5000" step="10" value="1000" />
<label>Noise Volume: <span id="noiseVal">0.2</span></label>
<input type="range" id="noise" min="0" max="1" step="0.01" value="0.2" />
<label>Pattern Data (one pattern as simple text rows)</label>
<textarea id="patterns" placeholder="E.g. notes or hex data per row"></textarea>
<button id="shareBtn">Share URL</button>
<p id="shareURL"></p>
<script>
// Update displays
const bpm = document.getElementById('bpm');
const bpmVal = document.getElementById('bpmVal');
const rows = document.getElementById('rows');
const rowsVal = document.getElementById('rowsVal');
const volume = document.getElementById('volume');
const volVal = document.getElementById('volVal');
const attack = document.getElementById('attack');
const decay = document.getElementById('decay');
const sustain = document.getElementById('sustain');
const release = document.getElementById('release');
const filter = document.getElementById('filter');
const filterVal = document.getElementById('filterVal');
const noise = document.getElementById('noise');
const noiseVal = document.getElementById('noiseVal');
const patterns = document.getElementById('patterns');
const shareBtn = document.getElementById('shareBtn');
const shareURL = document.getElementById('shareURL');
function updateDisplays(){
bpmVal.textContent = bpm.value;
rowsVal.textContent = rows.value;
volVal.textContent = volume.value;
filterVal.textContent = filter.value;
noiseVal.textContent = noise.value;
}
[bpm, rows, volume, filter, noise].forEach(el => {
el.addEventListener('input', updateDisplays);
});
updateDisplays();
function encodeHash(){
// Simple JSON encode settings and base64 to URL-safe string
const data = {
bpm: bpm.value,
rows: rows.value,
volume: volume.value,
adsr: {
attack: attack.value,
decay: decay.value,
sustain: sustain.value,
release: release.value
},
filter: filter.value,
noise: noise.value,
patterns: patterns.value
};
const json = JSON.stringify(data);
const b64 = btoa(json);
return b64.replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, '');
}
function decodeHash(hash){
try {
hash = hash.replace(/-/g, '+').replace(/_/g, '/');
// Pad base64 string
while(hash.length % 4) hash += '=';
const json = atob(hash);
return JSON.parse(json);
} catch(e){
return null;
}
}
// Load from URL hash on start
window.addEventListener('load', () => {
if(location.hash.length > 1){
const state = decodeHash(location.hash.substring(1));
if(state){
bpm.value = state.bpm;
rows.value = state.rows;
volume.value = state.volume;
attack.value = state.adsr.attack;
decay.value = state.adsr.decay;
sustain.value = state.adsr.sustain;
release.value = state.adsr.release;
filter.value = state.filter;
noise.value = state.noise;
patterns.value = state.patterns || '';
updateDisplays();
}
}
});
// Share button builds URL with hash
shareBtn.addEventListener('click', () => {
const hash = encodeHash();
const fullUrl = location.origin + location.pathname + '#'+ hash;
shareURL.textContent = fullUrl;
navigator.clipboard.writeText(fullUrl).then(() => {
alert('URL copied to clipboard');
});
});
</script>
</body>
</html>
If you prefer ready-made tools:
BeepBox — https://beepbox.co
JSFXR / jsfxr.net
If you want me to help build something more complex or with playback audio engine, just ask!
Not yet included in a published release.